diff --git a/application/wechat/controller/Menu.php b/application/wechat/controller/Menu.php index 3aac77e13..c4d928048 100644 --- a/application/wechat/controller/Menu.php +++ b/application/wechat/controller/Menu.php @@ -124,7 +124,7 @@ class Menu extends BasicAdmin { empty($row['content']) && $row['content'] = uniqid(); switch ($row['type']) { case 'miniprogram': - list($row['appid'], $row['pagepath'], $row['url']) = explode(',', $row['content'] . ',,'); + list($row['appid'], $row['url'], $row['pagepath']) = explode(',', $row['content'] . ',,'); break; case 'view': $row['url'] = preg_match('#^(\w+:)?//#i', $row['content']) ? $row['content'] : url($row['content'], '', true, true); diff --git a/application/wechat/view/menu.index.html b/application/wechat/view/menu.index.html index 990caf731..5a18884b0 100644 --- a/application/wechat/view/menu.index.html +++ b/application/wechat/view/menu.index.html @@ -300,12 +300,7 @@ var menudata = {}; menudata.name = $span.text(); menudata.type = $span.attr('data-type'); - // 小程序要特殊处理 - if (menudata.type === 'miniprogram') { - menudata.content = $span.data('appid') + ',' + $span.data('url') + ',' + $span.data('pagepath'); - } else { - menudata.content = $span.data('content') || ''; - } + menudata.content = $span.data('content') || ''; return menudata; }