人人商城

wxapp-edit.html 26KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
  1. {template 'common/header'}
  2. <div id="js-wxapp-edit" ng-controller="WxappEditCtrl" ng-cloak>
  3. <div class="container">
  4. <div class="caret-wxapp">
  5. <div class="panel panel-app">
  6. <div class="wxapp-head panel-heading">
  7. <!--头部信息-->
  8. <img src="./resource/images/9.png" alt="公众号头像" class="">
  9. <span class="wxapp-name">{$wxapp_info['name']}</span>
  10. <span class="wxapp-version">{$version_info['version']}</span>
  11. <div class="pull-right">
  12. <a href="{php echo url('wxapp/version/switch_version', array('uniacid' => $_GPC['uniacid']))}" class="color-default"><i class="wi wi-cut"></i>切换版本</a>
  13. <a href="{php echo url('wxapp/post', array('uniacid' => $_GPC['uniacid']))}" class="color-default"><i class="wi wi-text"></i>设计新版本</a>
  14. <a href="{php echo url('wxapp/display/display')}" class="color-default"><i class="wi wi-small-routine"></i>切换小程序</a>
  15. </div>
  16. <!--end头部信息-->
  17. </div>
  18. <div class="panel-body">
  19. <div class="left-menu">
  20. <!--菜单列表-->
  21. {if $version_info['design_method'] == 2}
  22. <div class="panel panel-menu">
  23. <div class="panel-heading">
  24. 首页设置<span class="fa fa-cog pull-right"></span>
  25. </div>
  26. <ul class="list-group">
  27. <li class="list-group-item" ng-class="{active : wxapp == 'slide'}" ng-click="wxapp = 'slide'">
  28. <a href=""><i class="wi wi-img"></i>幻灯片 </a>
  29. </li>
  30. <li class="list-group-item" ng-class="{active : wxapp == 'nav'}" ng-click="wxapp = 'nav'">
  31. <a href=""><i class="wi wi-template"></i>导航图标</a>
  32. </li>
  33. <li class="list-group-item" ng-class="{active : wxapp == 'recommend'}" ng-click="wxapp = 'recommend'">
  34. <a href=""><i class="wi wi-appmsg"></i>推荐图片</a>
  35. </li>
  36. </ul>
  37. </div>
  38. {/if}
  39. <div class="panel panel-menu">
  40. <div class="panel-heading">
  41. 模块
  42. </div>
  43. <ul class="list-group">
  44. {loop $module_connections $module}
  45. <a href="{php echo url('home/welcome/ext', array('m' => $module['name'], 'uniacid_source' => 'wxapp', 'uniacid' => !empty($connection[$module['name']]) ? $connection[$module['name']] : $_GPC['uniacid']))}" target="_blank" onclick="if(!confirm('您当前操作的公众号与该模块关联的公众号不一致,确定要切换并前往{$module['link_name']}公众号下的{$module['title']}模块')) return false;">
  46. <li class="list-group-item">
  47. <i class="fa fa-adjust"></i>{$module['title']}
  48. </li>
  49. </a>
  50. {/loop}
  51. </ul>
  52. </div>
  53. <!--end菜单列表-->
  54. <div class="panel panel-menu">
  55. <div class="panel-heading">
  56. 基础设置
  57. </div>
  58. <ul class="list-group">
  59. <li class="list-group-item" ng-class="{active : wxapp == 'setting'}" ng-click="wxapp = 'setting'">
  60. <i class="wi wi-appsetting"></i>关联设置
  61. </li>
  62. </a>
  63. </ul>
  64. </div>
  65. </div>
  66. <div class="right-content">
  67. <div class="wxapp-slide-project">
  68. <!--预览-->
  69. <div class="wxapp-phone" ng-show="wxapp != 'setting'">
  70. <img src="./resource/images/iphone6.png" alt="" class="wxapp-phone-bg" />
  71. <!--预览内容-->
  72. <div class="wxapp-home-preview">
  73. <img src="./resource/images/173.png"/>
  74. </div>
  75. <!--end预览内容-->
  76. </div>
  77. <!--end预览-->
  78. {if $version_info['design_method'] == 2}
  79. <div class="wxapp-slide" ng-show="wxapp != 'setting'">
  80. <!--列表-->
  81. <div class="wxapp-slide-list" ng-show="wxapp == 'slide'">
  82. <div class="slide-heading">
  83. 幻灯片
  84. </div>
  85. <ul>
  86. {loop $slides $slide}
  87. <li>
  88. <div class="wxapp-slide-detail media">
  89. <div class="media-left media-middle slide-sort">
  90. {$slide['displayorder']}
  91. </div>
  92. <div class="media-left media-middle slide-img">
  93. <img src="{php echo tomedia($slide['thumb'])}"/>
  94. </div>
  95. <div class="media-body">
  96. <div class="slide-title">
  97. {$slide['title']}
  98. </div>
  99. <div class="slide-alter">
  100. <a href="" ng-click="slideedit({$slide['id']})" class="color-default">编辑</a>
  101. <a href="{php echo url('wxapp/version/edit', array('id' => $slide['id'], 'operate' => 'delete', 'type' => 'slide', 'multiid' => $multiid, 'version_id' => $_GPC['version_id'], 'uniacid' => $_GPC['uniacid']))}" onclick="return confirm('确认删除幻灯片吗');" class="color-default">删除</a>
  102. </div>
  103. </div>
  104. </div>
  105. </li>
  106. {/loop}
  107. <li class="slide-list-more">
  108. <a href="" class="slide-add" ng-click="slideedit('add')">+</a>
  109. </li>
  110. </ul>
  111. </div>
  112. <div class="wxapp-slide-list" ng-show="wxapp == 'nav'">
  113. <div class="slide-heading">
  114. 导航图标
  115. </div>
  116. <ul>
  117. {loop $navs $nav}
  118. <li>
  119. <div class="wxapp-slide-detail media">
  120. <div class="media-left media-middle slide-sort">
  121. {$nav['displayorder']}
  122. </div>
  123. <div class="media-left media-middle slide-img">
  124. <image src="{php echo tomedia($nav['icon'])}"></image>
  125. <icon class="{if !empty($nav['css'])}{$nav['css']['icon']['icon']}{/if}"></icon>
  126. </div>
  127. <div class="media-body">
  128. <div class="slide-title">
  129. {$nav['name']}
  130. </div>
  131. <div class="slide-alter">
  132. <a href="" class="color-default" ng-click="navedit({$nav['id']})">编辑</a>
  133. <a href="{php echo url('wxapp/version/edit', array('type' => 'nav', 'id' => $nav['id'], 'operate' => 'delete', 'multiid' => $multiid, 'version_id' => $_GPC['version_id'], 'uniacid' => $_GPC['uniacid']))}" onclick="return confirm('确认删除导航吗?');" class="color-default slide-del">删除</a>
  134. </div>
  135. </div>
  136. </div>
  137. </li>
  138. {/loop}
  139. <li class="slide-list-more">
  140. <a href="" class="slide-add" ng-click="navedit('add')">+</a>
  141. </li>
  142. </ul>
  143. </div>
  144. <div class="wxapp-slide-list" ng-show="wxapp == 'recommend'">
  145. <div class="slide-heading">
  146. 推荐
  147. </div>
  148. <ul>
  149. {loop $recommends $recommend}
  150. <li>
  151. <div class="wxapp-slide-detail media">
  152. <div class="media-left media-middle slide-sort">
  153. {$recommend['displayorder']}
  154. </div>
  155. <div class="media-left media-middle slide-img">
  156. <img src="{php echo tomedia($recommend['thumb'])}"/>
  157. </div>
  158. <div class="media-body">
  159. <div class="slide-title">
  160. {$recommend['title']}
  161. </div>
  162. <div class="slide-alter">
  163. <a href="" class="color-default" ng-click="recommendedit({$recommend['id']}, '{$recommend['pcate']}')">编辑</a>
  164. <a href="{php echo url('wxapp/version/edit', array('operate' => 'delete', 'type' => 'article', 'id' => $recommend['id'], 'multiid' => $multiid, 'uniacid' => $_GPC['uniacid'], 'version_id' => $_GPC['version_id']))}" onclick="return confirm('确认删除推荐吗?')" class="color-default slide-del">删除</a>
  165. </div>
  166. </div>
  167. </div>
  168. </li>
  169. {/loop}
  170. <li class="slide-list-more">
  171. <a href="javascript:void(0)" class="slide-add" ng-click="recommendedit('add')">+</a>
  172. </li>
  173. </ul>
  174. </div>
  175. <div class="wxapp-slide-edit" ng-show="wxapp == 'slideedit'">
  176. <div class="edit-heading">
  177. <a href="" class="go-back">
  178. <i class="fa fa fa-chevron-circle-left"></i>
  179. </a>
  180. <span class="color-gray">幻灯片列表 / </span>
  181. <span class="color-dark">新建幻灯片</span>
  182. </div>
  183. <form action="{php echo url('wxapp/version/edit', array('multiid' => $multiid, 'uniacid' => $_GPC['uniacid'], 'version_id' => $_GPC['version_id']))}" method="post" class="form we7-form" enctype="multipart/form-data">
  184. <div class="form we7-form" ng-if="slideid == 'add'">
  185. <div class="form-group" >
  186. <label for="" class="control-label col-sm-2">标题</label>
  187. <div class="form-controls col-sm-10">
  188. <input type="text" required name="slide[title]" class="form-control input-slide-title" placeholder="">
  189. </div>
  190. </div>
  191. <div class="form-group">
  192. <label for="" class="control-label col-sm-2">排序</label>
  193. <div class="form-controls col-sm-10">
  194. <input type="text" name="slide[displayorder]" class="form-control input-slide-sort" id="" placeholder="">
  195. </div>
  196. </div>
  197. <div class="form-group">
  198. <label for="" class="control-label col-sm-2">图片</label>
  199. <div class="form-controls col-sm-10">
  200. {php echo tpl_form_field_image('slide[thumb]', '')}
  201. </div>
  202. </div>
  203. <div class="form-group">
  204. <label for="" class="control-label col-sm-2">链接</label>
  205. <div class="form-controls col-sm-10">
  206. <input type="text" name="slide[url]" class="form-control input-slide-link" required placeholder="">
  207. </div>
  208. </div>
  209. <input type="submit" name="submit" value="添加" class="btn btn-primary" />
  210. <input type="hidden" name="token" value="{$_W['token']}" />
  211. </div>
  212. {loop $slides $slide}
  213. <div class="form we7-form" ng-if="slideid == {$slide['id']}">
  214. <div class="form-group" >
  215. <label for="" class="control-label col-sm-2">标题</label>
  216. <div class="form-controls col-sm-10">
  217. <input type="text" name="slide[title]" class="form-control input-slide-title" required value="{$slide['title']}" placeholder="">
  218. </div>
  219. </div>
  220. <div class="form-group">
  221. <label for="" class="control-label col-sm-2">排序</label>
  222. <div class="form-controls col-sm-10">
  223. <input type="text" name="slide[displayorder]" class="form-control input-slide-sort" id="" value="{$slide['displayorder']}" placeholder="">
  224. </div>
  225. </div>
  226. <div class="form-group">
  227. <label for="" class="control-label col-sm-2">图片</label>
  228. <div class="form-controls col-sm-10">
  229. {php echo tpl_form_field_image('slide[thumb]', $slide['thumb'])}
  230. </div>
  231. </div>
  232. <div class="form-group">
  233. <label for="" class="control-label col-sm-2">链接</label>
  234. <div class="form-controls col-sm-10">
  235. <input type="text" name="slide[url]" class="form-control input-slide-link" required value="{$slide['url']}" id="" placeholder="">
  236. </div>
  237. </div>
  238. <input type="submit" name="submit" value="提交" class="btn btn-primary" />
  239. <input type="hidden" name="token" value="{$_W['token']}">
  240. <input type="hidden" name="id" value="{$slide['id']}">
  241. </div>
  242. {/loop}
  243. </form>
  244. </div>
  245. <div class="wxapp-slide-edit" ng-show="wxapp == 'navedit'">
  246. <div class="edit-heading">
  247. <a href="" class="go-back">
  248. <i class="fa fa fa-chevron-circle-left"></i>
  249. </a>
  250. <span class="color-gray">导航列表 / </span>
  251. <span class="color-dark">新建导航图标</span>
  252. </div>
  253. <form action="{php echo url('wxapp/version/edit', array('multiid' => $multiid, 'uniacid' => $_GPC['uniacid'], 'version_id' => $_GPC['version_id']))}" method="post" class="form we7-form" enctype="multipart/form-data">
  254. <div class="form we7-form" ng-if="navid == 'add'">
  255. <div class="form-group" >
  256. <label for="" class="control-label col-sm-2">标题</label>
  257. <div class="form-controls col-sm-10">
  258. <input type="text" name="nav[name]" required class="form-control input-slide-title" placeholder="">
  259. </div>
  260. </div>
  261. <div class="form-group">
  262. <label for="" class="control-label col-sm-2">排序</label>
  263. <div class="form-controls col-sm-10">
  264. <input type="text" name="nav[displayorder]" class="form-control input-slide-sort" placeholder="">
  265. </div>
  266. </div>
  267. <div class="form-group">
  268. <label for="" class="control-label col-sm-2">图片</label>
  269. <div class="form-controls col-sm-10">
  270. {php echo tpl_form_field_image('nav[icon]', '')}
  271. </div>
  272. </div>
  273. <div class="form-group">
  274. <label for="" class="control-label col-sm-2">链接</label>
  275. <div class="form-controls col-sm-10">
  276. <input type="text" name="nav[url]" required class="form-control input-slide-link" id="" placeholder="">
  277. </div>
  278. </div>
  279. <input type="submit" name="submit" value="添加" class="btn btn-primary" />
  280. <input type="hidden" name="token" value="{$_W['token']}" />
  281. </div>
  282. {loop $navs $nav}
  283. <div class="form we7-form" ng-if="navid == {php echo $nav['id']}">
  284. <div class="form-group" >
  285. <label for="" class="control-label col-sm-2">标题</label>
  286. <div class="form-controls col-sm-10">
  287. <input type="text" name="nav[name]" required class="form-control input-slide-title" value="{$nav['name']}" placeholder="">
  288. </div>
  289. </div>
  290. <div class="form-group">
  291. <label for="" class="control-label col-sm-2">排序</label>
  292. <div class="form-controls col-sm-10">
  293. <input type="text" name="nav[displayorder]" class="form-control input-slide-sort" id="" value="{$nav['displayorder']}" placeholder="">
  294. </div>
  295. </div>
  296. <div class="form-group">
  297. <label for="" class="control-label col-sm-2">图片</label>
  298. <div class="form-controls col-sm-10">
  299. {php echo tpl_form_field_image('nav[icon]', $nav['icon'])}
  300. </div>
  301. </div>
  302. <div class="form-group">
  303. <label for="" class="control-label col-sm-2">链接</label>
  304. <div class="form-controls col-sm-10">
  305. <input type="text" name="nav[url]" required class="form-control input-slide-link" value="{$nav['url']}" id="" placeholder="">
  306. </div>
  307. </div>
  308. <input type="submit" name="submit" id="" value="提交" class="btn btn-primary" />
  309. <input type="hidden" name="token" value="{$_W['token']}">
  310. <input type="hidden" name="id" value="{$nav['id']}">
  311. </div>
  312. {/loop}
  313. </form>
  314. </div>
  315. <div class="wxapp-slide-edit" ng-show="wxapp == 'recommendedit'">
  316. <div class="edit-heading">
  317. <a href="" class="go-back">
  318. <i class="fa fa fa-chevron-circle-left"></i>
  319. </a>
  320. <span class="color-gray">导航列表 / </span>
  321. <span class="color-dark">新建导航图标</span>
  322. </div>
  323. <form action="{php echo url('wxapp/version/edit', array('multiid' => $multiid, 'uniacid' => $_GPC['uniacid'], 'version_id' => $_GPC['version_id']))}" method="post" class="form we7-form" enctype="multipart/form-data">
  324. <div class="form we7-form" ng-if="recommendid == 'add'">
  325. <div class="form-group" >
  326. <label for="" class="control-label col-sm-2">标题</label>
  327. <div class="form-controls col-sm-10">
  328. <input type="text" required name="recommend[title]" class="form-control input-slide-title" placeholder="">
  329. </div>
  330. </div>
  331. <div class="form-group">
  332. <label for="" class="control-label col-sm-2">排序</label>
  333. <div class="form-controls col-sm-10">
  334. <input type="text" name="recommend[displayorder]" class="form-control input-slide-sort" id="" placeholder="">
  335. </div>
  336. </div>
  337. <div class="form-group form-inline">
  338. <label for="" class="control-label col-sm-2">分类</label>
  339. <div class="form-controls col-sm-10">
  340. <select class="form-control we7-select" name="recommend[pcate]">
  341. <option>选择分类</option>
  342. <option ng-repeat="category in categorys" value="{{ category.id }}">{{ category.name }}</option>
  343. </select>
  344. <a class="btn btn-default" data-toggle="modal" data-target="#myModal" ng-click="get_categorys()">设置分类</a>
  345. </div>
  346. </div>
  347. <div class="form-group">
  348. <label for="" class="control-label col-sm-2">图片</label>
  349. <div class="form-controls col-sm-10">
  350. {php echo tpl_form_field_image('recommend[thumb]')}
  351. </div>
  352. </div>
  353. <div class="form-group">
  354. <label for="" class="control-label col-sm-2">链接</label>
  355. <div class="form-controls col-sm-10">
  356. <input type="text" name="recommend[source]" required class="form-control input-slide-link" id="" placeholder="">
  357. </div>
  358. </div>
  359. <input type="submit" name="submit" value="添加" class="btn btn-primary" />
  360. <input type="hidden" name="token" value="{$_W['token']}" />
  361. </div>
  362. {loop $recommends $recommend}
  363. <div class="form we7-form" ng-if="recommendid == {$recommend['id']}">
  364. <div class="form-group" >
  365. <label for="" class="control-label col-sm-2">标题</label>
  366. <div class="form-controls col-sm-10">
  367. <input type="text" name="recommend[title]" required class="form-control input-slide-title" value="{$recommend['title']}" placeholder="">
  368. </div>
  369. </div>
  370. <div class="form-group">
  371. <label for="" class="control-label col-sm-2">排序</label>
  372. <div class="form-controls col-sm-10">
  373. <input type="text" name="recommend[displayorder]" class="form-control input-slide-sort" id="" value="{$recommend['displayorder']}" placeholder="">
  374. </div>
  375. </div>
  376. <div class="form-group form-inline">
  377. <label for="" class="control-label col-sm-2">分类</label>
  378. <div class="form-controls col-sm-10">
  379. <select class="form-control" name="recommend[pcate]">
  380. <option>选择分类</option>
  381. <option ng-repeat="category in categorys" value="{{ category.id }}" ng-selected="category.id == {$recommend['pcate']}">{{ category.name }}</option>
  382. </select>
  383. <a class="btn btn-default" data-toggle="modal" data-target="#myModal" ng-click="get_categorys()">设置分类</a>
  384. </div>
  385. </div>
  386. <div class="form-group">
  387. <label for="" class="control-label col-sm-2">图片</label>
  388. <div class="form-controls col-sm-10">
  389. {php echo tpl_form_field_image('recommend[thumb]', $recommend['thumb'])}
  390. </div>
  391. </div>
  392. <div class="form-group">
  393. <label for="" class="control-label col-sm-2">链接</label>
  394. <div class="form-controls col-sm-10">
  395. <input type="text" name="recommend[source]" required class="form-control input-slide-link" value="{$recommend['source']}" id="" placeholder="">
  396. </div>
  397. </div>
  398. <input type="submit" name="submit" id="" value="提交" class="btn btn-primary" />
  399. <input type="hidden" name="token" value="{$_W['token']}">
  400. <input type="hidden" name="id" value="{$recommend['id']}">
  401. </div>
  402. {/loop}
  403. </form>
  404. <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  405. <div class="modal-dialog modal-dialog-default modal-lg">
  406. <div class="modal-content">
  407. <div class="modal-header">
  408. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  409. <h4 class="modal-title" id="myModalLabel">分类设置</h4>
  410. </div>
  411. <div class="modal-body">
  412. <table class="table we7-table we7-form">
  413. <tr>
  414. <th>类名</th>
  415. <th>排序</th>
  416. <th>链接</th>
  417. <th>操作</th>
  418. </tr>
  419. <tbody>
  420. <tr ng-repeat="category in categorys">
  421. <td><input ng-model="category.name" class="form-control" size="15"></td>
  422. <td><input ng-model="category['displayorder']" class="form-control"></td>
  423. <td><input ng-model="category['linkurl']" class="form-control"></td>
  424. <td><a href="" ng-click="del_category($index)">删除</a></td>
  425. </tr>
  426. <tr>
  427. <td colspan="4"><a href="javascript:;" class="buttom-add color-default" ng-click="edit_category()" style="text-decoration: none;">添加分类</a></td>
  428. </tr>
  429. </tbody>
  430. </table>
  431. <!--<button type="button" class="btn btn-primary" ng-click="edit_category()">添加分类</button>-->
  432. <button type="button" class="btn btn-primary" ng-click="save_category()" style="margin-left: 0px;">保存</button>
  433. </div>
  434. </div>
  435. </div>
  436. </div>
  437. </div>
  438. <!--end列表-->
  439. </div>
  440. {/if}
  441. <div class="we7-page-title" ng-show="wxapp != 'setting'">关联设置</div>
  442. <div class="we7-padding" ng-show="wxapp != 'setting'">
  443. <table class="table we7-table table-hover vertical-middle">
  444. <col width="180px" />
  445. <col width="140px"/>
  446. <col width="140px" />
  447. <tr>
  448. <th class="text-left">关联设置</th>
  449. <th class="text-left">公众号</th>
  450. <th class="text-left">操作</th>
  451. </tr>
  452. {loop $module_connections $module $connection}
  453. <tr >
  454. <td class="text-left">
  455. <img src="{$connection['logo']}" style="width:50px;height:50px;">
  456. {$connection['title']}
  457. </td>
  458. <td class="text-left">
  459. <img src="{$connection['connection']['thumb']}" style="width:50px;height:50px;" class="js-connection-img-{$module}">
  460. <span class="js-connection-name-{$module}">{$connection['connection']['name']}</span>
  461. </td>
  462. <td class="text-left">
  463. <div class="link-group">
  464. <a href="javascript:;" class="color-default js-unfold" data-toggle="table-collapse" ng-click="showAccount('{$connection['link_name']}')">修改</a>
  465. </div>
  466. </td>
  467. </tr>
  468. {/loop}
  469. </table>
  470. <div class="modal fade" id="show_account" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  471. <div class="modal-dialog we7-modal-dialog" style="width:800px">
  472. <div class="modal-content">
  473. <div class="modal-header">
  474. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  475. <h4 class="modal-title">选择公众号(点击选择)</h4>
  476. </div>
  477. <div class="modal-body">
  478. <div class="panel-body we7-padding">
  479. <div class="row">
  480. <div ng-if="!account_list.length">
  481. 暂无可选公众号
  482. </div>
  483. <div class="col-sm-2 text-center we7-margin-bottom" style="overflow: hidden" ng-repeat="account in account_list" ng-click="selectAccount(current_module, account.uniacid)">
  484. <a href="javascript:;">
  485. <img src="{{account.thumb}}" alt="" style="width:50px;height:50px;">
  486. <p class="text-over">{{account.name}}</p>
  487. </a>
  488. </div>
  489. </div>
  490. </div>
  491. </div>
  492. </div>
  493. </div>
  494. </div>
  495. </div>
  496. </div>
  497. </div>
  498. </div>
  499. </div>
  500. </div>
  501. </div>
  502. </div>
  503. <script>
  504. angular.module('wxApp').value('config', {
  505. uniacid : "{php echo $_GPC['uniacid']}",
  506. multiid : "{php echo $multiid}",
  507. wxapp : "{php echo $_GPC['wxapp']}" == '' ? 'slide' : "{php echo $_GPC['wxapp']}",
  508. success_url : "{php echo url('wxapp/version/edit', array('multiid' => $_GPC['multiid'], 'uniacid' => $_GPC['uniacid'], 'version_id' => $_GPC['version_id']))}",
  509. showAccount_url : "{php echo url('wxapp/version/account_list')}",
  510. selectAccount_url : "{php echo url('wxapp/version/save_connection', array('version_id' => $versionid))}",
  511. get_categorys_url : "{php echo url('wxapp/version/get_categorys')}",
  512. del_category_url : "{php echo url('wxapp/version/del_category')}",
  513. save_category_url : "{php echo url('wxapp/version/save_category')}",
  514. links: {
  515. accountList: "{php echo url('wxapp/version/account_list')}",
  516. saveConnection: "{php echo url('wxapp/version/save_connection', array('version_id' => $versionid))}",
  517. getCategorys: "{php echo url('wxapp/version/get_categorys')}",
  518. delCategory: "{php echo url('wxapp/version/del_category')}",
  519. saveCategory: "{php echo url('wxapp/version/save_category')}",
  520. }
  521. });
  522. angular.bootstrap($('#js-wxapp-edit'), ['wxApp']);
  523. change_category = function (element) {
  524. $.post("{php echo url('wxapp/version/edit', array('operate' => 'change_category'))}", {'categoryid' : element.val()}, function(data) {
  525. var data = $.parseJSON(data);
  526. var html = '<option value="">二级分类</option>';
  527. var categorys = data.message.message;
  528. for (var i = 0; i < categorys.length; i++) {
  529. html += '<option value='+categorys[i]['id']+'>'+categorys[i]['name']+'</option>';
  530. }
  531. element.next().html(html);
  532. });
  533. };
  534. </script>
  535. </body>
  536. </html>