[更新]修复微信菜单小程序二次发布异常

This commit is contained in:
Anyon 2017-06-16 19:22:43 +08:00
parent 5e69f6ed56
commit afc10f9a25
2 changed files with 2 additions and 7 deletions

View File

@ -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);

View File

@ -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;
}