manage.html 9.1 KB

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