人人商城

menu.html 30KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543
  1. {template 'common/header'}
  2. <div id="wechat_menu">
  3. <div class="we7-page-title hide">自定义菜单</div>
  4. <ul class="we7-page-tab">
  5. {loop $active_sub_permission $active_menu}
  6. {if permission_check_account_user($active_menu['permission_name'], false) && (empty($active_menu['is_display']) || is_array($active_menu['is_display']) && in_array($_W['account']['type'], $active_menu['is_display']))}
  7. <li {if $do == $active_menu['active']}class="active"{/if}><a href="{$active_menu['url']}">{$active_menu['title']}</a></li>
  8. {/if}
  9. {/loop}
  10. </ul>
  11. {if $do == 'display'}
  12. <div class="clearfix" ng-controller="menuDisplay" id="menuDisplay">
  13. <div class="we7-margin-bottom clearfix">
  14. {if $type != MENU_CONDITIONAL}
  15. <ul class="btn-group we7-btn-group" style="margin-bottom: 0;">
  16. <a href="{url 'platform/menu/post'}" class="btn">当前默认菜单</a>
  17. <a href="{url 'platform/menu/display'}" class="btn active">历史菜单列表</a>
  18. </ul>
  19. {/if}
  20. <div class="pull-right">
  21. {if $type == MENU_CURRENTSELF}
  22. <a href="{php echo url('platform/menu/post', array('type' => MENU_CURRENTSELF));}" class="btn btn-primary we7-padding-horizontal">+添加新菜单</a>
  23. {elseif $type == MENU_CONDITIONAL}
  24. <a href="{php echo url('platform/menu/post', array('type' => MENU_CONDITIONAL));}" class="btn btn-primary we7-padding-horizontal">+添加个性化菜单</a>
  25. {/if}
  26. </div>
  27. <form action="./index.php" method="get" class="form-horizontal col-sm-4 pull-right" role="form">
  28. <div class="input-group">
  29. <input type="hidden" name="c" value="platform">
  30. <input type="hidden" name="a" value="menu">
  31. <input type="hidden" name="type" value="{$_GPC['type']}">
  32. <input type="hidden" name="token" value="{$_W['token']}"/>
  33. <input type="text" name="keyword" id="" value="{$_GPC['keyword']}" class="form-control" placeholder="搜索关键字"/>
  34. <span class="input-group-btn"><button class="btn btn-default"><i class="fa fa-search"></i></button></span>
  35. </div>
  36. </form>
  37. </div>
  38. <table class="table we7-table table-hover vertical-middle we7-form">
  39. <col width="200px"/>
  40. <col />
  41. <col width="180px"/>
  42. <col width="220px"/>
  43. <tr>
  44. <th class="text-left">菜单组名</th>
  45. <th class="text-left">显示对象</th>
  46. <th>
  47. 是否在微信生效
  48. {if $type == MENU_CURRENTSELF}<div class="color-gray">(只能生效一个默认菜单)</div>{/if}
  49. </th>
  50. <th class="text-right">操作</th>
  51. </tr>
  52. {loop $data $da}
  53. {if $da['type'] == MENU_CURRENTSELF && $da['status'] == STATUS_ON}{php continue;}{/if}
  54. <tr>
  55. <td class="text-left">
  56. {if empty($da['title'])}
  57. {if $da['type'] == MENU_CURRENTSELF}
  58. 默认菜单
  59. {elseif $da['type'] == MENU_HISTORY}
  60. 默认菜单(历史记录)
  61. {else}
  62. 个性化菜单
  63. {/if}
  64. {else}
  65. {$da['title']}
  66. {/if}
  67. </td>
  68. <td class="text-left">
  69. {if $da['type'] == MENU_CONDITIONAL}
  70. {if $da['sex'] > 0}性别:{$names['sex'][$da['sex']]} ;{/if}
  71. {if $da['group_id'] != -1}粉丝分组:{if $da['group_id'] == -1}不限{else}{$groups[$da['group_id']]['name']}{/if} ;{/if}
  72. {if $da['client_platform_type'] > 0}客户端:{$names['client_platform_type'][$da['client_platform_type']]} ;{/if}
  73. {if !empty($da['area'])}地区:{$da['area']}{/if}
  74. {else}
  75. 所有粉丝
  76. {/if}
  77. </td>
  78. <td>
  79. {if $da['type'] == MENU_CURRENTSELF}
  80. {if $da['status'] == STATUS_OFF}
  81. <a href="javascript:;" class="js-switch-{$da['id']} color-default" data-id="{$da['id']}" data-status="{$da['status']}" ng-click="changeStatus({$da['id']}, {$da['status']}, {$da['type']})">点击生效</a>
  82. {/if}
  83. {else}
  84. <label style="margin: 0; vertical-align: middle;">
  85. <input name="js-checkbox-{$da['id']}" id="" class="form-control" type="checkbox" style="display: none;" data-id="{$da['id']}" data-status="{$da['status']}" ng-click="changeStatus({$da['id']}, {$da['status']}, {$da['type']})">
  86. <div class="switch js-switch-{$da['id']} {if intval($da['status'] == STATUS_ON)}switchOn{/if}"></div>
  87. {/if}
  88. </label>
  89. </td>
  90. <td>
  91. <div class="link-group">
  92. {if $da['type'] == MENU_CURRENTSELF}
  93. <a href="{php echo url('platform/menu/post', array('id' => $da['id'], 'type'=> 1));}">编辑</a>
  94. {else}
  95. <a href="{php echo url('platform/menu/post', array('id' => $da['id'], 'type'=> $da['type']));}">查看</a>
  96. {/if}
  97. {if $da['type'] == MENU_CONDITIONAL}
  98. {if $_GPC['status'] != 'history'}
  99. <a href="{php echo url('platform/menu/copy', array('id' => $da['id']));}" onclick="if(!confirm('确定复制吗')) return false;">复制</a>
  100. {/if}
  101. {/if}
  102. {if $da['type'] != MENU_CURRENTSELF || ($da['type'] == MENU_CURRENTSELF && $da['status'] == STATUS_OFF)}
  103. <a href="{php echo url('platform/menu/delete', array('id' => $da['id']));}" class="del" onclick="if(!confirm('{if $da['type'] == MENU_CURRENTSELF}删除默认菜单会清空所有菜单记录,确定吗?{else}确定删除菜单?{/if}')) return false;">删除</a>
  104. {/if}
  105. </div>
  106. </td>
  107. </tr>
  108. {/loop}
  109. </table>
  110. <div class="text-right">
  111. {$pager}
  112. </div>
  113. </div>
  114. {/if}
  115. {if $do == 'post'}
  116. {if $type != MENU_CONDITIONAL && !empty($default_menu)}
  117. <ul class="btn-group we7-btn-group we7-margin-bottom">
  118. <a href="{url 'platform/menu/post'}" class="btn active">当前默认菜单</a>
  119. <a href="{url 'platform/menu/display'}" class="btn">历史菜单列表</a>
  120. </ul>
  121. <a href="{php echo url('platform/menu/post', array('type' => MENU_CURRENTSELF));}" class="btn btn-primary pull-right"><span>+</span>添加新菜单</a>
  122. {/if}
  123. <div class="conditionMenu" ng-controller="conditionMenuDesigner" id="conditionMenuDesigner" ng-cloak>
  124. <div class="new">
  125. {if empty($default_menu)}
  126. <ol class="breadcrumb we7-breadcrumb">
  127. <a href="{php echo url('platform/menu', array('type' => $_GPC['type']))}"><i class="wi wi-back-circle"></i></a>
  128. <li>
  129. <a href="{php echo url('platform/menu', array('type' => $_GPC['type']))}">自定义菜单</a>
  130. </li>
  131. <li>
  132. {if !empty($id)}
  133. 编辑菜单
  134. {else}
  135. 新建菜单
  136. {/if}
  137. </li>
  138. </ol>
  139. {/if}
  140. <div class="we7-form">
  141. <div class="form-group">
  142. <label for="" class="control-label col-sm-2">菜单组名称</label>
  143. <div class="form-controls col-sm-8">
  144. <input type="text" style="width: 600px" class="form-control" ng-model="context.group.title" ng-disabled="context.group.disabled">
  145. <span class="help-block">给菜单组起个名字吧!以便查找</span>
  146. </div>
  147. </div>
  148. {if $type != 1}
  149. <div class="form-group">
  150. <label for="" class="control-label col-sm-2">菜单显示对象</label>
  151. <div class="form-controls col-sm-8">
  152. <select class="we7-select" ng-model="context.group.matchrule.sex" ng-disabled="context.group.disabled" {if $params['matchrule']['sex'] == 0}ng-init="context.group.matchrule.sex = '0'"{/if}>
  153. <option value="0" ng-disabled="context.group.disabled" ng-selected="context.group.matchrule.sex == 0">性别不限</option>
  154. <option value="1" ng-disabled="context.group.disabled" ng-selected="context.group.matchrule.sex == 1">男</option>
  155. <option value="2" ng-disabled="context.group.disabled" ng-selected="context.group.matchrule.sex == 2">女</option>
  156. </select>
  157. <select class="we7-select" ng-model="context.group.matchrule.group_id" ng-disabled="context.group.disabled" {if $params['matchrule']['group_id'] == -1 || empty($params)}ng-init="context.group.matchrule.group_id = '-1'"{/if}>
  158. <option value="-1" ng-disabled="context.group.disabled" ng-selected="context.group.matchrule.group_id == -1">粉丝分组不限</option>
  159. {loop $groups $group}
  160. <option value="{$group['id']}" ng-disabled="context.group.disabled" ng-selected="context.group.matchrule.group_id == {$group['id']}">{$group['name']}</option>
  161. {/loop}
  162. </select>
  163. <select class="we7-select" ng-model="context.group.matchrule.client_platform_type" ng-disabled="context.group.disabled" {if $params['matchrule']['client_platform_type'] == 0}ng-init="context.group.matchrule.client_platform_type = '0'"{/if}>
  164. <option value="0" ng-disabled="context.group.disabled" ng-selected="context.group.matchrule.client_platform_type == 0" >手机系统不限</option>
  165. <option value="1" ng-disabled="context.group.disabled" ng-selected="context.group.matchrule.client_platform_type == 1">IOS(苹果)</option>
  166. <option value="2" ng-disabled="context.group.disabled" ng-selected="context.group.matchrule.client_platform_type == 2">Android(安卓)</option>
  167. <option value="3" ng-disabled="context.group.disabled" ng-selected="context.group.matchrule.client_platform_type == 3">Others(其他)</option>
  168. </select>
  169. </div>
  170. </div>
  171. <div class="form-group">
  172. <label for="" class="control-label col-sm-2"></label>
  173. <div class="form-controls col-sm-8">
  174. <select class="we7-select" ng-model="context.group.matchrule.language" ng-disabled="context.group.disabled">
  175. <option value="" ng-selected="context.group.matchrule.language == ''">语言不限</option>
  176. {loop $languages $language}
  177. <option value="{$language['en']}" ng-disabled="context.group.disabled" ng-selected="context.group.matchrule.language == '{$language['en']}'">{$language['ch']}</option>
  178. {/loop}
  179. </select>
  180. <span class="tpl-district-container">
  181. <select data-value="{$menu['data']['matchrule']['province']}" ng-model="context.group.matchrule.province" ng-disabled="context.group.disabled" class="tpl-province we7-select">
  182. </select>
  183. <select data-value="{$menu['data']['matchrule']['city']}" ng-model="context.group.matchrule.city" ng-disabled="context.group.disabled" class="tpl-city we7-select">
  184. </select>
  185. </span>
  186. <span class="help-block"> 根据条件对显示对象进行筛选</span>
  187. </div>
  188. </div>
  189. {/if}
  190. <div class="menu-setting-area">
  191. <div class="menu-preview-area">
  192. <div class="mobile-menu-preview">
  193. <div class="mobile-hd">{{context.group.type == 3 ? "个性化菜单" : "默认菜单"}}</div>
  194. <div class="mobile-bd">
  195. <div class="js-quickmenu nav-menu-wx clearfix" ng-class="{0 : 'has-nav-0', 1 : 'has-nav-1', 2: 'has-nav-2', 3: 'has-nav-3', 4 : 'has-nav-3'}[context.group.button.length + 1]">
  196. <ul class="designer-x pre-menu-list">
  197. <li class="js-sortable pre-menu-item" ng-repeat="but in context.group.button" ng-class="{0 : '', 1 : 'active'}[context.activeItem == but ? 1 : 0 ]">
  198. <input type="hidden" data-role="parent" data-hash="{{but.$$hashKey}}"/>
  199. <a href="javascript:void(0);" title="拖动排序" class="pre-menu-link" ng-click="context.editBut('', but, {$id});">
  200. <i class="icon-menu-dot" ng-show="but.sub_button.length > 0"></i>
  201. {{but.name}}
  202. </a>
  203. <div class="sub-pre-menu-box">
  204. <ul class="sub-pre-menu-list sub-designer-y">
  205. <li ng-repeat="subBut in but.sub_button" class='sub-js-sortable'>
  206. <input type="hidden" data-role="sub" data-hash="{{subBut.$$hashKey}}"/>
  207. <span class="sub-pre-menu-inner" ng-click="context.editBut(subBut, but, {$id});">
  208. <span>{{subBut.name}}</span>
  209. </span>
  210. </li>
  211. <li ng-if="but.sub_button.length < 5" ng-click="context.addSubBut(but);" class="sub-js-not-sortable"><i class="fa fa-plus"></i></li>
  212. </ul>
  213. </div>
  214. </li>
  215. <li class="pre-menu-item grid-item js-not-sortable" ng-if="context.group.button.length < 3" ng-hide="context.group.disabled">
  216. <a href="javascript:void(0);" ng-click="context.addBut();" class="pre-menu-link">
  217. <i class="icon14-menu-add"></i>
  218. <span class="">添加菜单</span>
  219. </a>
  220. </li>
  221. </ul>
  222. </div>
  223. </div>
  224. </div>
  225. </div>
  226. <div class="menu-form-area">
  227. <div class="menu-initial-tips tips-global" style="display: none;">点击左侧菜单进行编辑操作</div>
  228. <div class="portable-editor to-left" style="display: block;">
  229. <div class="editor-inner">
  230. <div class="menu-form-hd">
  231. <span class="pull-left font-defalut">当前菜单</span>
  232. <div class="text-right">
  233. <a href="javascript:void(0);" class="color-default" ng-click="context.removeBut(context.activeItem, context.activeType)">删除菜单</a>
  234. </div>
  235. </div>
  236. <div style="display: none;" class="we7-padding-top color-gray">已添加子菜单,仅可设置菜单名称。</div>
  237. <div class="we7-form we7-padding-top">
  238. <div class="form-group">
  239. <label for="" class="control-label col-sm-2">菜单名称</label>
  240. <div class="form-controls col-sm-8">
  241. <div class="input-group">
  242. <input type="text" name="" class="form-control" placeholder="" id="title" ng-model="context.activeItem.name" ng-disabled="context.group.disabled">
  243. <span ng-if="!context.group.disabled" class="input-group-addon bg-default color-default" ng-click="context.selectEmoji();"><a href="">添加表情</a></span>
  244. </div>
  245. <span class="help-block">字数不超过4个汉字或8个字母</span>
  246. </div>
  247. </div>
  248. <div class="form-group" ng-show="context.activeItem.forceHide == 0">
  249. <label for="" class="control-label col-sm-2">菜单内容</label>
  250. <div class="form-controls col-sm-10">
  251. <input id="radio-1" type="radio" name="ipt" ng-checked="context.activeItem.type == 'media_id' || context.activeItem.type == 'click'" ng-model="context.activeItem.type" value="click" ng-disabled="context.group.disabled">
  252. <label for="radio-1">发送消息 </label>
  253. <input id="radio-2" type="radio" name="ipt" ng-model="context.activeItem.type" value="view" ng-disabled="context.group.disabled">
  254. {if in_array($_W['account']['type'], array(ACCOUNT_TYPE_XZAPP_NORMAL, ACCOUNT_TYPE_XZAPP_AUTH)) || $_W['account']['level'] != ACCOUNT_SUBSCRIPTION}
  255. <label for="radio-2">跳转网页 </label>
  256. <input id="radio-3" type="radio" name="ipt" ng-model="context.activeItem.type" value="scancode_push" ng-disabled="context.group.disabled">
  257. {/if}
  258. {if !in_array($_W['account']['type'], array(ACCOUNT_TYPE_XZAPP_NORMAL, ACCOUNT_TYPE_XZAPP_AUTH))}
  259. <label for="radio-3">扫码 </label>
  260. <input id="radio-4" type="radio" name="ipt" ng-model="context.activeItem.type" value="scancode_waitmsg" ng-disabled="context.group.disabled">
  261. <label for="radio-4">扫码(等待信息) </label>
  262. <input id="radio-5" type="radio" name="ipt" ng-model="context.activeItem.type" value="location_select" ng-disabled="context.group.disabled">
  263. <label for="radio-5">地理位置 </label>
  264. <input id="radio-6" type="radio" name="ipt" ng-model="context.activeItem.type" value="pic_sysphoto" ng-disabled="context.group.disabled">
  265. <label for="radio-6">拍照发图 </label>
  266. <input id="radio-7" type="radio" name="ipt" ng-model="context.activeItem.type" value="pic_photo_or_album" ng-disabled="context.group.disabled">
  267. <label for="radio-7">拍照相册</label>
  268. <input id="radio-8" type="radio" name="ipt" ng-model="context.activeItem.type" value="pic_weixin" ng-disabled="context.group.disabled">
  269. <label for="radio-8">相册发图 </label>
  270. <input id="radio-9" type="radio" name="ipt" ng-model="context.activeItem.type" value="miniprogram" ng-disabled="context.group.disabled">
  271. <label for="radio-9">关联小程序</label>
  272. {/if}
  273. </div>
  274. </div>
  275. <div class="menu-content" ng-show="(context.activeItem.type == 'view' || context.activeItem.type == 'miniprogram') && context.activeItem.forceHide == 0">
  276. <div class="form-group">
  277. <p class="color-gray" ng-show="context.activeItem.type == 'view'">订阅者点击该子菜单会跳转到以下链接</p>
  278. <p class="color-gray" ng-show="context.activeItem.type == 'miniprogram'">点击该菜单跳转到关联的小程序</p>
  279. <label for="" class="control-label col-sm-2" ng-show="context.activeItem.type == 'view'">页面地址</label>
  280. <div class="form-controls col-sm-8" ng-show="context.activeItem.type == 'view'">
  281. <input type="text" class="form-control" id="ipt-url" type="text" ng-model="context.activeItem.url" ng-disabled="context.group.disabled">
  282. <span ng-if="!context.group.disabled" class="form-control-addon color-default" id="search" ng-click="context.select_link()">选择地址</span>
  283. <span class="help-block">指定点击此菜单时要跳转的链接(注:链接需加http://)</span>
  284. </div>
  285. <!-- 小程序 -->
  286. <div class="form-controls col-sm-12" ng-show="context.activeItem.type == 'miniprogram'">
  287. <label for="ipt-url-appid" class="control-label col-sm-2">APPID</label>
  288. <div class="form-controls col-sm-7">
  289. <input type="text" class="form-control" id="ipt-url-appid" ng-model="context.activeItem.appid" ng-disabled="context.group.disabled" placeholder="请确保小程序与公众号已关联,填写小程序的APPID">
  290. <span class="help-block">
  291. <a href="http://weixiao.qq.com/notice/view?mid=0&cid=2&id=274" target="_blank">如何获取</a>
  292. </span>
  293. </div>
  294. </div>
  295. <div class="form-controls col-sm-12" ng-show="context.activeItem.type == 'miniprogram'">
  296. <label for="ipt-url-pagepath" class="control-label col-sm-2">页面</label>
  297. <div class="form-controls col-sm-7">
  298. <input type="text" class="form-control" id="ipt-url-pagepath" ng-model="context.activeItem.pagepath" ng-disabled="context.group.disabled" placeholder="请填写跳转页面的小程序访问路径">
  299. <span class="help-block"><a href="http://weixiao.qq.com/notice/view?mid=0&cid=2&id=275" target="_blank">填写指引</a></span>
  300. </div>
  301. </div>
  302. <div class="form-controls col-sm-12" ng-show="context.activeItem.type == 'miniprogram'">
  303. <label for="ipt-url-url" class="control-label col-sm-2">备用网页</label>
  304. <div class="form-controls col-sm-10">
  305. <input type="text" class="form-control" id="ipt-url-url" ng-model="context.activeItem.url" ng-disabled="context.group.disabled" placeholder="写入要跳转的链接">
  306. <span class="help-block">旧版微信客户端不支持小程序,用户点击菜单时会打开该网页</span>
  307. </div>
  308. </div>
  309. </div>
  310. </div>
  311. <div class="panel we7-panel" ng-show="context.activeItem.type != 'view' && context.activeItem.type != 'click' && context.activeItem.type != 'miniprogram' && context.activeItem.forceHide == 0" style="width:100%;">
  312. <div class="panel-heading">
  313. 回复内容
  314. </div>
  315. <!--<label for="" class="control-label">选择</label>-->
  316. <div class="panel-body we7-padding">
  317. <p class="color-gray" ng-show="context.activeItem.type == 'location_select'">菜单内容为地理位置,那么点击这个菜单是,系统发送当前地理位置</p>
  318. <p class="color-gray" ng-show="context.activeItem.type == 'pic_sysphoto' || context.activeItem.type == 'pic_photo_or_album'">菜单内容为系统拍照发图/拍照或者相册发图,那么点击这个菜单是,系统拍照</p>
  319. <p class="color-gray" ng-show="context.activeItem.type == 'pic_weixin'">菜单内容为微信相册发图,那么点击这个菜单是,选择图片发送</p>
  320. <p class="color-gray" ng-show="context.activeItem.type == 'scancode_push' || context.activeItem.type == 'scancode_waitmsg'">菜单内容为扫码,那么点击这个菜单是,手机扫描二维码</p>
  321. <ul class="keywords-list">
  322. <li ng-if="context.activeItem.material[0].etype == 'click'">
  323. <div>
  324. <div class="desc">
  325. <div class="media-content">
  326. <a class="title-wrp" href="javascript:;">
  327. <span class="title">[关键字]{{context.activeItem.material[0].name}}</span>
  328. </a>
  329. <p class="desc"><a href="javascript:;" class="appmsg-desc">{{context.activeItem.material[0].content}}</a></p>
  330. </div>
  331. </div>
  332. </div>
  333. </li>
  334. <li ng-if="context.activeItem.material[0].etype == 'module'">
  335. <div class="">
  336. <div class="desc">
  337. <div class="media-content">
  338. <div class="appmsgSendedItem">
  339. <a class="title-wrp" href="javascript:;">
  340. <span class="icon cover" style="background-image:url({{context.activeItem.material[0].icon}});"></span>
  341. <span class="title">[模块]{{context.activeItem.material[0].title}}</span>
  342. </a>
  343. <p class="desc"><a href="javascript:;" class="appmsg-desc">{{context.activeItem.material[0].name}}</a></p>
  344. </div>
  345. </div>
  346. </div>
  347. </div>
  348. </li>
  349. </ul>
  350. <div class="we7-select-msg we7-padding-vertical-max" ng-show="context.activeItem.type == 'scancode_push' || context.activeItem.type == 'scancode_waitmsg' || context.activeItem.type == 'pic_photo_or_album' || context.activeItem.type == 'pic_weixin'">
  351. <ul class="tab-navs">
  352. <li class="tab-nav tab-cardmsg" ng-click="context.select_mediaid('keyword', '1');">
  353. <a href="javascript:void(0);">&nbsp;<i class="icon-msg-sender "></i><span class="msg-tab-title">触发关键字</span></a>
  354. </li>
  355. </ul>
  356. </div>
  357. </div>
  358. </div>
  359. <div class="panel we7-panel" style="width: 100%;" ng-show="context.activeItem.type == 'click' && context.activeItem.forceHide == 0">
  360. <div class="panel-heading">
  361. 回复内容
  362. </div>
  363. <div class="panel-body we7-padding">
  364. <ul class="keywords-list">
  365. <li ng-if="context.activeItem.material[0].type == 'keyword' || (context.activeItem.type == 'click' && context.activeItem.key)">
  366. <div>
  367. <div class="desc">
  368. <div class="media-content">
  369. <a class="title-wrp" href="javascript:;">
  370. <span class="title">[关键字]{{context.activeItem.material[0].content ? context.activeItem.material[0].content : context.activeItem.key}}</span>
  371. </a>
  372. </div>
  373. </div>
  374. </div>
  375. </li>
  376. <li ng-if="context.activeItem.material[0].type == 'news'">
  377. <div class="">
  378. <div class="desc">
  379. <div class="media-content">
  380. <div class="appmsgSendedItem">
  381. <a class="title-wrp" href="javascript:;">
  382. <span class="icon cover" style="background-image:url({{context.activeItem.material[0].items[0].thumb_url}});"></span>
  383. <span class="title">[图文消息]{{context.activeItem.material[0].items[0].title}}</span>
  384. </a>
  385. <p class="desc"><a href="javascript:;" class="appmsg-desc">{{context.activeItem.material[0].items[0].digest}}</a></p>
  386. </div>
  387. </div>
  388. </div>
  389. </div>
  390. </li>
  391. <li ng-if="context.activeItem.material[0].type == 'image'">
  392. <div>
  393. <div class="desc">
  394. <div class="media-content">
  395. <div class="appmsgSendedItem">
  396. <a class="title-wrp" href="javascript:;">
  397. <span class="icon cover" style="background-image:url({{context.activeItem.material[0].url}})"></span>
  398. <span class="title">[图片]</span>
  399. </a>
  400. </div>
  401. </div>
  402. </div>
  403. </div>
  404. </li>
  405. <li ng-if="context.activeItem.material[0].type == 'voice'">
  406. <div>
  407. <div class="desc">
  408. <div class="media-content">
  409. <div class="audio-msg">
  410. <div class="icon-audio-wrp">
  411. <span class="icon-audio-msg"></span>
  412. </div>
  413. <div class="audio-content">
  414. <div class="audio-title">[语音]{{context.activeItem.material[0].filename}}</div>
  415. </div>
  416. </div>
  417. </div>
  418. </div>
  419. </div>
  420. </li>
  421. <li ng-if="context.activeItem.material[0].type == 'video'">
  422. <div>
  423. <div class="desc">
  424. <div class="media-content">
  425. <div class="appmsgSendedItem">
  426. <a class="title-wrp" href="javascript:;">
  427. <span class="icon cover" data-contenturl="'+material.tag.down_url+'"></span>
  428. <span class="title">[视频]{{context.activeItem.material[0].tag.title}}</span>
  429. <p class="desc"><a href="javascript:;" class="appmsg-desc">{{context.activeItem.material[0].tag.description}}</a></p>
  430. </a>
  431. </div>
  432. </div>
  433. </div>
  434. </div>
  435. </li>
  436. </ul>
  437. <div class="we7-select-msg we7-padding-vertical-max">
  438. <ul class="tab-navs">
  439. <li class="tab-nav tab-appmsg" ng-click="context.select_mediaid('news', 'wx');">
  440. <a href="javascript:void(0);">&nbsp;<i class="wi wi-appmsg"></i><span class="msg-tab-title">图文</span></a>
  441. </li>
  442. {if !in_array($_W['account']['type'], array(ACCOUNT_TYPE_XZAPP_NORMAL, ACCOUNT_TYPE_XZAPP_AUTH))}
  443. <li class="tab-nav tab-img" ng-click="context.select_mediaid('image');">
  444. <a href="javascript:void(0);">&nbsp;<i class="wi wi-img"></i><span class="msg-tab-title">图片</span></a>
  445. </li>
  446. <li class="tab-nav tab-audio" ng-click="context.select_mediaid('voice');">
  447. <a href="javascript:void(0);">&nbsp;<i class="wi wi-radio"></i><span class="msg-tab-title">语音</span></a>
  448. </li>
  449. <li class="tab-nav tab-video" ng-click="context.select_mediaid('video');">
  450. <a href="javascript:void(0);">&nbsp;<i class="wi wi-video "></i><span class="msg-tab-title">视频</span></a>
  451. </li>
  452. <li class="tab-nav tab-cardmsg" ng-click="context.select_mediaid('keyword', '1');">
  453. <a href="javascript:void(0);">&nbsp;<i class="wi wi-file "></i><span class="msg-tab-title">触发关键字</span></a>
  454. </li>
  455. {/if}
  456. </ul>
  457. </div>
  458. </div>
  459. </div>
  460. </div>
  461. </div>
  462. <span class="editor-arrow-wrp">
  463. <i class="editor-arrow editor-arrow-out"></i>
  464. <i class="editor-arrow editor-arrow-in"></i>
  465. </span>
  466. </div>
  467. </div>
  468. </div>
  469. <div class="menu-submit">
  470. {if empty($default_menu) && $type == 1}
  471. <input type="submit" name="" value="仅&nbsp;&nbsp;&nbsp;保&nbsp;&nbsp;&nbsp;存" class="btn btn-primary" style="padding: 6px 50px;" ng-if="{php echo ($type == 1 || empty($id) || $copy == 1)}" ng-click="context.submit('save');"/>
  472. {/if}
  473. <input type="submit" name="" value="发&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;布" class="btn btn-primary" style="padding: 6px 50px;" ng-if="{php echo ($type == 1 || empty($id) || $copy == 1)}" ng-click="context.submit('publish');"/>
  474. <input type="button" name="" value="预&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;览" class="btn btn-primary" style="padding: 6px 50px;" data-toggle="modal" data-target="#mobileDiv"/>
  475. </div>
  476. <div class="modal fade" id="mobileDiv" role="dialog" aria-hidden="true">
  477. <div class="mobile-preview" >
  478. <div class="mobile-preview-hd">
  479. <strong class="nickname">{{context.group.type == 3 ? "个性化菜单" : "默认菜单"}}</strong>
  480. </div>
  481. <div class="mobile-preview-bd">
  482. <ul id="viewShow" class="show-list"></ul>
  483. </div>
  484. <div class="mobile-preview-ft">
  485. <ul class="pre-menu-list grid-line" id="viewList">
  486. <li class="pre-menu-item grid-item" ng-repeat="but in context.group.button" id="menu-0">
  487. <a href="javascript:void(0);" class="pre-menu-link" title="菜单名称">
  488. <i class="icon-menu-dot"></i>
  489. {{but.name}}
  490. </a>
  491. <div class="sub-pre-menu-box" style="display: block;">
  492. <ul class="sub-pre-menu-list">
  493. <li ng-repeat="subBut in but.sub_button">
  494. <a href="javascript:void(0);" class="" title="{{subBut.name}}">{{subBut.name}}</a>
  495. </li>
  496. </ul>
  497. <i class="arrow arrow-out"></i>
  498. <i class="arrow arrow-in"></i>
  499. </div>
  500. </li>
  501. </ul>
  502. </div>
  503. <a href="javascript:void(0);" class="mobile-preview-closed btn btn-default" id="viewClose" data-dismiss="modal">退出预览</a>
  504. </div>
  505. </div>
  506. </div>
  507. </div>
  508. </div>
  509. {/if}
  510. </div>
  511. <script type="text/javascript">
  512. $(function(){
  513. var push_url = "{php echo url('platform/menu/push')}";
  514. type = "{$type}";
  515. group = {php echo !empty($params) ? json_encode($params) : "null"};
  516. id = "{$id}";
  517. status = "{$params['status']}";
  518. delete_url = "{php echo url('platform/menu/delete', array('id' => $id));}";
  519. success_url = "{php echo url('platform/menu/display');}";
  520. site_url = "{$_W['siteroot']}";
  521. current_menu_url = "{php echo url('platform/menu/current_menu')}";
  522. angular.module('menuApp').value('config', {
  523. 'id' : id,
  524. 'status' : status,
  525. 'group' : group,
  526. 'type' : type,
  527. 'delete_url' : delete_url,
  528. 'success_url' : success_url,
  529. 'site_url' : site_url,
  530. 'push_url' : push_url,
  531. 'current_menu_url' : current_menu_url
  532. });
  533. angular.bootstrap($('#wechat_menu'), ['menuApp']);
  534. });
  535. </script>
  536. {template 'common/footer'}