人人商城

manage.html 9.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. {template 'common/header'}
  2. <ol class="breadcrumb we7-breadcrumb">
  3. <a href="{php echo url('account/manage', array('account_type' => ACCOUNT_TYPE_APP_NORMAL))}"><i class="wi wi-back-circle"></i> </a>
  4. <li><a href="{php echo url('account/manage', array('account_type' => ACCOUNT_TYPE_APP_NORMAL))}">小程序管理</a></li>
  5. <li>小程序设置</li>
  6. </ol>
  7. <div class="media media-wechat-setting">
  8. <a class="media-left">
  9. <span class="icon"><i class="wi wi-wxapp"></i></span>
  10. <img src="{$account['logo']}" class="wechat-img">
  11. </a>
  12. <div class="media-body media-middle ">
  13. <h4 class="media-heading color-dark">{$account['name']}</h4>
  14. <span class="color-gray">小程序</span>
  15. </div>
  16. {if $state == ACCOUNT_MANAGE_NAME_FOUNDER || $state == ACCOUNT_MANAGE_NAME_OWNER}
  17. <div class="media-right media-middle">
  18. <a href="{php echo url('account/manage/delete', array('uniacid' => $account['uniacid'], 'acid' => $account['acid'], 'account_type' => ACCOUNT_TYPE_APP_NORMAL))}" class="btn btn-primary" onclick="return confirm('确认放入回收站吗?')">停 用</a>
  19. </div>
  20. {/if}
  21. </div>
  22. <div class="clearfix"></div>
  23. <div class="btn-group we7-btn-group wechat-edit-group">
  24. {if $state == ACCOUNT_MANAGE_NAME_FOUNDER || $state == ACCOUNT_MANAGE_NAME_OWNER || $state == ACCOUNT_MANAGE_NAME_VICE_FOUNDER}
  25. <a href="{php echo url('account/post/base', array('uniacid' => $account['uniacid'], 'acid' => $account['acid'], 'account_type' => ACCOUNT_TYPE_APP_NORMAL))}" class="btn btn-default {if $do == 'base'} active{/if}">基础信息</a>
  26. {/if}
  27. <a href="{php echo url('account/post-user/edit', array('uniacid' => $account['uniacid'], 'acid' => $account['acid'], 'account_type' => ACCOUNT_TYPE_APP_NORMAL))}" class="btn btn-default {if $action == 'post-user' && $do == 'edit'} active{/if}">使用者管理</a>
  28. <a href="{php echo url('wxapp/manage/display', array('uniacid' => $account['uniacid'], 'acid' => $account['acid'], 'account_type' => ACCOUNT_TYPE_APP_NORMAL))}" class="btn btn-default {if $action == 'manage' && $do == 'display'} active{/if}">版本管理</a>
  29. <a href="{php echo url('account/post/modules_tpl', array('uniacid' => $account['uniacid'], 'acid' => $account['acid'], 'account_type' => ACCOUNT_TYPE_APP_NORMAL))}" class="btn btn-default {if $action == 'post' && $do == 'modules_tpl'} active{/if}">可用应用模板/模块</a>
  30. </div>
  31. <div id="js-account-manage-wxapp" ng-controller="AccountManageWxappCtrl" ng-cloak>
  32. <!--版本管理-->
  33. <div class="text-right we7-margin-bottom">
  34. <a href="{php echo url('wxapp/post/design_method', array('uniacid' => $account['uniacid']))}" class="btn btn-primary" target="_blank">添加新版本</a>
  35. </div>
  36. <table class="table we7-table vertical-middle wxapp-version-table">
  37. <tr>
  38. <th class="text-left">版本号</th>
  39. <th class="text-left">应用</th>
  40. <th class="text-center">之前应用版本</th>
  41. <th class="text-center">最新应用版本</th>
  42. <th class="text-right">操作</th>
  43. </tr>
  44. <tr ng-if="version_exist" ng-repeat="item in wxapp_version_lists">
  45. <td class="text-left">
  46. <div class="version" ng-bind="item.version"></div>
  47. <div class="color-gray" ng-bind="item.description"></div>
  48. </td>
  49. <td class="clearfix">
  50. <div class="item col-sm-6" ng-if="item.module">
  51. <img ng-src="{{item.module.logo}}" class="icon"/>
  52. <div class="name" ng-bind="item.module.title"></div>
  53. </div>
  54. </td>
  55. <td class="text-center">
  56. <div ng-bind="item.last_modules.version"></div>
  57. </td>
  58. <td class="text-center">
  59. <div ng-bind="item.module.version"></div>
  60. <div class="color-red" ng-if="item.last_modules.version != item.module.version">
  61. <i class="wi wi-warning-sign"></i>
  62. <span style="font-size: 10px">需上传微信审核</span>
  63. </div>
  64. </td>
  65. <td class="text-right">
  66. <div class="link-group">
  67. <a href="./index.php?c=account&a=display&do=switch&uniacid={{item.uniacid}}&version_id={{item.id}}">进入</a>
  68. <a href="javascript:;" ng-click="showEditVersionInfoModal(item)" ng-show="item.type!=2">修改</a>
  69. <a ng-show="item.type == 2" href="./index.php?c=wxapp&a=post&do=post&design_method={{item.design_method}}&uniacid={{item.uniacid}}&version_id={{item.id}}&create_type={{item.type}}" >修改</a>
  70. <a href="javascript:;" class="del" ng-click="delWxappVersion(item.id)">删除</a>
  71. </div>
  72. </td>
  73. </tr>
  74. <tr ng-if="!version_exist">
  75. <td colspan="5" class="text-center">暂无数据</td>
  76. </tr>
  77. </table>
  78. <div class="modal fade" id="modal_edit_versioninfo" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  79. <div class="modal-dialog we7-modal-dialog" style="width:800px">
  80. <div class="modal-content">
  81. <div class="modal-header">
  82. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  83. <h4 class="modal-title">修改信息</h4>
  84. </div>
  85. <div class="modal-body">
  86. <table class="table we7-table table-hover table-form">
  87. <col width="120px">
  88. <col />
  89. <tr>
  90. <td class="table-label">模块版本</td>
  91. <td><input type="text" class="form-control" ng-model="activeVersion.version" disabled></td>
  92. </tr>
  93. <tr>
  94. <td class="table-label">模块描述</td>
  95. <td><input type="text" class="form-control" ng-model="activeVersion.description" disabled></td>
  96. </tr>
  97. <tr>
  98. <td class="table-label">应用模块</td>
  99. <td class="wxapp-module-list">
  100. <div class="col-sm-6" ng-if="activeVersion.modules" ng-repeat="module in activeVersion.modules">
  101. <div class="item">
  102. <img ng-src="{{module.logo}}" class="icon"/>
  103. <div class="name" ng-bind="module.title"></div>
  104. <div ng-bind="module.version"></div>
  105. <div class="cover-dark"><a href="javascript:;" class="cover-delect" ng-click="delModule(module);"><i class="fa fa-minus-circle"></i>删除</a></div>
  106. </div>
  107. </div>
  108. <div class="col-sm-6">
  109. <div class="add" ng-click="showEditModuleModal()" ng-style="{'display': 'none'}">+</div>
  110. </div>
  111. </td>
  112. </tr>
  113. </table>
  114. </div>
  115. <div class="modal-footer" ng-if="wxapp_modules">
  116. <button type="button" class="btn btn-primary" ng-click="editVersionInfo()">确定</button>
  117. <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="cancelVersionInfo()">取消</button>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. <div class="modal fade" id="modal_edit_module" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  123. <div class="modal-dialog we7-modal-dialog" style="width:800px">
  124. <div class="modal-content">
  125. <div class="modal-header">
  126. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  127. <h4 class="modal-title">选择小程序</h4>
  128. </div>
  129. <div class="modal-body">
  130. <div class="input-group" style="width: 400px">
  131. <input class="form-control" name="title" ng-model="search.moduleName" type="text" placeholder="名称">
  132. <span class="input-group-btn">
  133. <button ng-click="searchModuleName()" class="btn btn-default">
  134. <i class="fa fa-search" style="font-size: 16px"></i>
  135. </button>
  136. </span>
  137. </div>
  138. <div class="we7-margin-top">
  139. <div class="col-sm-2 text-center we7-margin-bottom select-module-wxapp" ng-repeat="module in modules" ng-if="modules">
  140. <a href="javascript:;" ng-click="selectedWxModule(module, $event)">
  141. <img ng-src="{{module.logo}}" style="width:50px;height:50px;">
  142. <p class="text-over">{{module.title}}</p>
  143. </a>
  144. <span id="module-{{module.name}}" class="selected hide" style="position:absolute;width:82%;height:100%;left:10px;top:0;opacity:0.8;cursor:pointer;background:#e7e8eb; vertical-align:middle;font-size:30px"><i class="wi wi-right-sign color-green" style="margin-top:25px"></i></span>
  145. </div>
  146. <div class="text-center" ng-if="!modules">
  147. <span>暂无可用模块</span>
  148. </div>
  149. </div>
  150. </div>
  151. <div class="modal-footer" ng-if="modules">
  152. <button type="button" class="btn btn-primary" ng-click="changeWxModules()">确定</button>
  153. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  154. </div>
  155. </div>
  156. </div>
  157. </div>
  158. <!--end 版本管理-->
  159. </div>
  160. <script>
  161. require(['underscore'], function() {
  162. angular.module('wxApp').value('config', {
  163. 'account': {php echo !empty($account) ? json_encode($account) : 'null'},
  164. 'wxapp_version_lists': {php echo !empty($wxapp_version_lists) ? json_encode($wxapp_version_lists) : 'null'},
  165. 'wxapp_modules' : {php echo !empty($wxapp_modules) ? json_encode($wxapp_modules) : 'null'},
  166. 'version_exist': {php echo !empty($version_exist) ? json_encode($version_exist) : 'null'},
  167. 'links': {
  168. 'edit_version': "{php echo url('wxapp/manage/edit_version', array('acid' => $account['acid'], 'uniacid' => $account['uniacid'], 'account_type' => ACCOUNT_TYPE_APP_NORMAL))}",
  169. 'del_version': "{php echo url('wxapp/manage/del_version', array('acid' => $account['acid'], 'uniacid' => $account['uniacid'], 'account_type' => ACCOUNT_TYPE_APP_NORMAL))}",
  170. },
  171. });
  172. angular.bootstrap($('#js-account-manage-wxapp'), ['wxApp']);
  173. });
  174. </script>
  175. {template 'common/footer'}