[更新]修复微信菜单小程序编辑

This commit is contained in:
邹景立 2017-06-16 21:10:43 +08:00
parent 5241b24654
commit d5127fbc0f

View File

@ -241,7 +241,7 @@
case 'miniprogram':
var tpl = '<div>\
<div>appid<input data-appid="{appid}" style="display:block;margin-bottom:10px" class="form-control input-sm" value="{appid}" name="appid"></div>\
<div>url<input data-url="{url}" style="display:block;margin-bottom:10px" class="form-control input-sm" value="{url}" name="url"></div>\
<div>url<input data-url="{_url}" style="display:block;margin-bottom:10px" class="form-control input-sm" value="{_url}" name="url"></div>\
<div>pagepath<input data-pagepath="{pagepath}" style="display:block" name="pagepath" class="form-control input-sm" value={pagepath}></div>\
</div>';
var _appid = '', _pagepath = '', _url = '';
@ -250,7 +250,7 @@
_url = content.split(',')[1] || '';
_pagepath = content.split(',')[2] || '';
}
return tpl.replace(/\{appid\}/ig, _appid).replace(/\{url\}/ig, _url).replace(/\{pagepath\}/ig, _pagepath);
return tpl.replace(/\{appid\}/ig, _appid).replace(/\{_url\}/ig, _url).replace(/\{pagepath\}/ig, _pagepath);
case 'customservice':
case 'text':
return '<div>回复内容<textarea style="resize:none;height:225px" name="content" class="form-control input-sm">{content}</textarea></div>'.replace('{content}', content);