manage.html 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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-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('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. <th class="text-center">之前应用版本</th>
  41. <th class="text-center">最新应用版本</th>
  42. <th class="text-right">操作</th>
  43. </tr>
  44. <tr ng-if="wxapp_version_lists" 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="!wxapp_version_lists">
  75. <td colspan="5" class="text-center">
  76. <div class="we7-empty-block">暂无数据</div>
  77. </td>
  78. </tr>
  79. </table>
  80. <div class="modal fade" id="modal_edit_versioninfo" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  81. <div class="modal-dialog we7-modal-dialog" style="width:800px">
  82. <div class="modal-content">
  83. <div class="modal-header">
  84. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  85. <h4 class="modal-title">修改信息</h4>
  86. </div>
  87. <div class="modal-body">
  88. <table class="table we7-table table-hover table-form">
  89. <col width="120px">
  90. <col />
  91. <tr>
  92. <td class="table-label">模块版本</td>
  93. <td><input type="text" class="form-control" ng-model="activeVersion.version" disabled></td>
  94. </tr>
  95. <tr>
  96. <td class="table-label">模块描述</td>
  97. <td><input type="text" class="form-control" ng-model="activeVersion.description" disabled></td>
  98. </tr>
  99. <tr>
  100. <td class="table-label">应用模块</td>
  101. <td class="wxapp-module-list">
  102. <div class="col-sm-6" ng-if="activeVersion.modules" ng-repeat="module in activeVersion.modules">
  103. <div class="item">
  104. <img ng-src="{{module.logo}}" class="icon"/>
  105. <div class="name" ng-bind="module.title"></div>
  106. <div ng-bind="module.version"></div>
  107. <div class="cover-dark"><a href="javascript:;" class="cover-delect" ng-click="delModule(module);"><i class="fa fa-minus-circle"></i>删除</a></div>
  108. </div>
  109. </div>
  110. <div class="col-sm-6">
  111. <div class="add" ng-click="showEditModuleModal()" ng-style="{'display': 'none'}">+</div>
  112. </div>
  113. </td>
  114. </tr>
  115. </table>
  116. </div>
  117. <div class="modal-footer" ng-if="wxapp_modules">
  118. <button type="button" class="btn btn-primary" ng-click="editVersionInfo()">确定</button>
  119. <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="cancelVersionInfo()">取消</button>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. <div class="modal fade" id="modal_edit_module" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  125. <div class="modal-dialog we7-modal-dialog" style="width:800px">
  126. <div class="modal-content">
  127. <div class="modal-header">
  128. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  129. <h4 class="modal-title">选择小程序</h4>
  130. </div>
  131. <div class="modal-body">
  132. <div class="input-group" style="width: 400px">
  133. <input class="form-control" name="title" ng-model="search.moduleName" type="text" placeholder="名称">
  134. <span class="input-group-btn">
  135. <button ng-click="searchModuleName()" class="btn btn-default">
  136. <i class="fa fa-search" style="font-size: 16px"></i>
  137. </button>
  138. </span>
  139. </div>
  140. <div class="we7-margin-top">
  141. <div class="col-sm-2 text-center we7-margin-bottom select-module-wxapp" ng-repeat="module in modules" ng-if="modules">
  142. <a href="javascript:;" ng-click="selectedWxModule(module, $event)">
  143. <img ng-src="{{module.logo}}" style="width:50px;height:50px;">
  144. <p class="text-over">{{module.title}}</p>
  145. </a>
  146. <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>
  147. </div>
  148. <div class="text-center" ng-if="!modules">
  149. <span>暂无可用模块</span>
  150. </div>
  151. </div>
  152. </div>
  153. <div class="modal-footer" ng-if="modules">
  154. <button type="button" class="btn btn-primary" ng-click="changeWxModules()">确定</button>
  155. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  156. </div>
  157. </div>
  158. </div>
  159. </div>
  160. <!--end 版本管理-->
  161. </div>
  162. <script>
  163. require(['underscore'], function() {
  164. angular.module('wxApp').value('config', {
  165. 'account': {php echo !empty($account) ? json_encode($account) : 'null'},
  166. 'wxapp_version_lists': {php echo !empty($wxapp_version_lists) ? json_encode($wxapp_version_lists) : 'null'},
  167. 'wxapp_modules' : {php echo !empty($wxapp_modules) ? json_encode($wxapp_modules) : 'null'},
  168. 'version_exist': {php echo !empty($version_exist) ? json_encode($version_exist) : 'null'},
  169. 'links': {
  170. 'edit_version': "{php echo url('wxapp/manage/edit_version', array('acid' => $account['acid'], 'uniacid' => $account['uniacid'], 'account_type' => ACCOUNT_TYPE_APP_NORMAL))}",
  171. 'del_version': "{php echo url('wxapp/manage/del_version', array('acid' => $account['acid'], 'uniacid' => $account['uniacid'], 'account_type' => ACCOUNT_TYPE_APP_NORMAL))}",
  172. },
  173. });
  174. angular.bootstrap($('#js-account-manage-wxapp'), ['wxApp']);
  175. });
  176. </script>
  177. {template 'common/footer'}