[更新]修改微信菜单小程序支持

This commit is contained in:
Anyon 2017-06-16 18:38:26 +08:00
parent 6436925093
commit f22d1a3c40
2 changed files with 2 additions and 2 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']) = explode(',', $row['content']);
list($row['appid'], $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

@ -239,7 +239,7 @@
var html = function () {
switch (type) {
case 'miniprogram':
var tpl = '<div><div>小程序APPID<input style="display:block;margin-bottom:10px" class="form-control input-sm" value="{appid}" name="appid"/></div>Pagepath<textarea style="resize:none;height:180px;" name="pagepath" class="form-control input-sm">{content}</textarea></div>';
var tpl = '<div><div>小程序APPID<input style="display:block;margin-bottom:10px" class="form-control input-sm" value="{appid}" name="appid"/></div>Pagepath<textarea style="resize:none;height:165px;" name="pagepath" class="form-control input-sm">{content}</textarea></div>';
var _appid = '', _content = '';
if (content.indexOf(',') > 0) {
_appid = content.split(',')[0];