manage-system-wxapp.html 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720
  1. {template 'common/header'}
  2. {if $do == 'installed'}
  3. <div class="we7-page-title">
  4. 小程序管理
  5. </div>
  6. <div id="js-system-module" ng-controller="installedCtrl" ng-cloak>
  7. <ul class="we7-page-tab">
  8. <li class="active"><a href="{php echo url('module/manage-system/installed', array('account_type' => 4))}">已安装的小程序 </a></li>
  9. {if permission_check_account_user('see_module_manage_system_except_installed')}
  10. <li><a href="{php echo url('module/manage-system/not_installed', array('account_type' => 4))}" ng-if="isFounder == 1">未安装的小程序<span class="color-red"> ({$total_uninstalled}) </span></a></li>
  11. <li><a href="{php echo url('module/manage-system/not_installed', array('account_type' => 4, 'status' => 'recycle'))}" ng-if="isFounder == 1">已停用小程序</a></li>
  12. <li {if $status == 'uninstalled_recycle'}class="active"{/if}><a href="{php echo url('module/manage-system/not_installed', array('account_type' => 4, 'status' => 'uninstalled_recycle'))}" ng-if="isFounder == 1">小程序回收站<span class="color-red"> ({$total_uninstalled_recycle}) </span></a></li>
  13. {/if}
  14. </ul>
  15. <div class="we7-page-search clearfix">
  16. <!--<div class="pull-right">-->
  17. <!--<a href="添加.html" class="btn btn-danger">购买应用模块</a>-->
  18. <!--</div>-->
  19. <form action="" method="get" class="row">
  20. <div class="form-group we7-margin-bottom col-sm-4">
  21. <input type="hidden" name="letter" ng-model="activeLetter">
  22. <input type="hidden" name="c" value="module">
  23. <input type="hidden" name="a" value="manage-system">
  24. <input type="hidden" name="do" value="page">
  25. <input type="hidden" name="account_type" value="4">
  26. <div class="input-group">
  27. <input class="form-control" name="title" value="{$title}" type="text" placeholder="名称" >
  28. <span class="input-group-btn"><button class="btn btn-default" id="search"><i class="fa fa-search"></i></button></span>
  29. </div>
  30. </div>
  31. </form>
  32. </div>
  33. <div class="clearfix"></div>
  34. <ul class="letters-list">
  35. <li ng-class="activeLetter == letter ? 'active' : ''" ng-repeat="letter in letters"><a href="javascript:;" ng-click="searchLetter(letter)">{{ letter }}</a></li>
  36. </ul>
  37. <form action="" method="get">
  38. <table class="table we7-table table-hover vertical-middle table-manage table-manage-td">
  39. <col width="120px" />
  40. <col width="350px"/>
  41. <col width="230px" />
  42. <tr>
  43. <th colspan="2" class="text-left">小程序应用</th>
  44. <!--<th>公众号</th>-->
  45. <!--<th>数量</th>-->
  46. <th class="text-right">操作</th>
  47. </tr>
  48. <tr ng-repeat="module in module_list">
  49. <td class="text-left">
  50. <img ng-src="{{ module.logo }}" class="img-responsive icon"/>
  51. </td>
  52. <td class="text-left">
  53. <p>{{ module.title }}</p>
  54. {if permission_check_account_user('see_module_manage_system_newversion')}
  55. <span>版本:{{ module.version }} </span><span class="color-red" ng-if="module.upgrade && isFounder == 1">发现新版本</span>
  56. {/if}
  57. </td>
  58. <!--<td >{{ module.use_account }}</td>-->
  59. <!--<td >{{ module.enabled_use_account }}</td>-->
  60. <td class="text-left vertical-middle table-manage-td">
  61. <div class="link-group">
  62. {if permission_check_account_user('see_module_manage_system_ugrade')}
  63. <a ng-href="{{ './index.php?c=module&a=manage-system&do=upgrade&module_name='+module.name}}&account_type={ACCOUNT_TYPE}" class="color-red" ng-if="module.upgrade && module.from != 'cloud' && isFounder == 1">升级</a>
  64. <a href="{php echo url('module/manage-system/module_detail')}&name={{ module.name }}&show=upgrade" class="color-red del" ng-if="module.new_branch && module.from == 'cloud' && isFounder == 1">新分支</a>
  65. <a href="{php echo url('module/manage-system/module_detail')}&name={{ module.name }}&show=upgrade&account_type={ACCOUNT_TYPE}" class="color-red del" ng-if="module.upgrade && module.from == 'cloud' && isFounder == 1">升级</a>
  66. {/if}
  67. <a href="{php echo url('module/manage-system/module_detail')}&name={{ module.name }}&account_type={ACCOUNT_TYPE}" ng-if="isFounder == 1">管理设置</a>
  68. <!--<a href="javascript:;" ng-if="isFounder == 1" ng-click="editModule(module.mid)">编辑</a>-->
  69. </div>
  70. <div class="manage-option text-right">
  71. <a href="{php echo url('module/manage-system/module_detail')}&name={{ module.name }}&account_type={ACCOUNT_TYPE}" ng-if="isFounder == 1">基本信息</a>
  72. <a href="{php echo url('module/manage-system/module_detail')}&name={{ module.name }}&account_type={ACCOUNT_TYPE}&show=group" ng-if="isFounder == 1">应用权限组</a>
  73. <a href="{php echo url('module/manage-system/module_detail')}&name={{ module.name }}&account_type={ACCOUNT_TYPE}&show=subscribe" ng-if="isFounder == 1 && module.subscribes.length">订阅消息</a>
  74. {if permission_check_account_user('see_module_manage_system_stop')}
  75. <a href="{php echo url('module/manage-system/uninstall', array('account_type' => 4))}&name={{ module.name }}&account_type={ACCOUNT_TYPE}" ng-if="isFounder == 1" class="del" onclick="return confirm('确认要停用模块吗?')">停用</a>
  76. {/if}
  77. </div>
  78. </td>
  79. </tr>
  80. </table>
  81. <div class="select-all">
  82. <div class="we7-form text-right">
  83. {$pager}
  84. </div>
  85. </div>
  86. </form>
  87. <div class="modal fade" id="module-info" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  88. <div class="modal-dialog we7-modal-dialog" style="width:800px">
  89. <div class="modal-content">
  90. <form action="" method="post" enctype="multipart/form-data" class="form-horizontal form" id="form-info">
  91. <div class="modal-header">
  92. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  93. <h4 class="modal-title">编辑模块信息</h4>
  94. </div>
  95. <div class="modal-body">
  96. <div class="form-group">
  97. <label class="col-sm-2 control-label"> 模块标题</label>
  98. <div class="col-sm-10">
  99. <input type="text" name="title" ng-model="moduleinfo.title" class="form-control">
  100. <span class="help-block">模块的名称, 显示在用户的模块列表中. 不要超过10个字符</span>
  101. </div>
  102. </div>
  103. <div class="form-group">
  104. <label class="col-sm-2 control-label"> 模块简述</label>
  105. <div class="col-sm-10">
  106. <input type="text" name="ability" ng-model="moduleinfo.ability" class="form-control">
  107. <span class="help-block">模块功能描述, 使用简单的语言描述模块的作用, 来吸引用户</span>
  108. </div>
  109. </div>
  110. <div class="form-group">
  111. <label class="col-sm-2 control-label"> 模块介绍</label>
  112. <div class="col-sm-10">
  113. <textarea type="text" name="description" ng-model="moduleinfo.description" class="form-control" rows="5">{{ moduleinfo.description }}</textarea>
  114. <span class="help-block">模块详细描述, 详细介绍模块的功能和使用方法</span>
  115. </div>
  116. </div>
  117. <div class="form-group">
  118. <label class="col-sm-2 control-label"> 模块缩略图</label>
  119. <div class="col-sm-10">
  120. <div class="we7-input-img" ng-class="{ 'active' : moduleinfo.logo }" style="width: 100px;height: 100px; font-size: 45px;">
  121. <img ng-src="{{ moduleinfo.logo }}" ng-if="moduleinfo.logo">
  122. <a href="javascript:;" class="input-addon" ng-hide="moduleinfo.logo" ng-click="changePicture('logo')"><span>+</span></a>
  123. <input type="hidden" name="thumb">
  124. <div class="cover-dark">
  125. <a href="javascript:;" class="cut" ng-click="changePicture('logo')">更换</a>
  126. <a href="javascript:;" class="del" ng-click="delPicture('logo')"><i class="fa fa-times text-danger"></i></a>
  127. </div>
  128. </div>
  129. <span class="help-block">用 48*48 的图片来让你的模块更吸引眼球吧。仅支持jpg格式</span>
  130. </div>
  131. </div>
  132. <div class="form-group">
  133. <label class="col-sm-2 control-label"> 模块封面</label>
  134. <div class="col-sm-10">
  135. <div class="we7-input-img" ng-class="{ 'active' : moduleinfo.logo}" style="width: 100px;height: 100px; font-size: 45px;">
  136. <img ng-src="{{ moduleinfo.preview }}">
  137. <a href="javascript:;" class="input-addon" ng-click="changePicture('preview')"><span>+</span></a>
  138. <input type="hidden" name="thumb">
  139. <div class="cover-dark">
  140. <a href="javascript:;" class="cut" ng-click="changePicture('preview')">更换</a>
  141. <a href="javascript:;" class="del" ng-click="delPicture('preview')"><i class="fa fa-times text-danger"></i></a>
  142. </div>
  143. </div>
  144. <span class="help-block">模块封面, 大小为 600*350, 更好的设计将会获得官方推荐位置。仅支持jpg格式</span>
  145. </div>
  146. </div>
  147. </div>
  148. <div class="modal-footer">
  149. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  150. <button class="btn btn-primary" type="text" name="submit" ng-click="save()" data-dismiss="modal">保存</button>
  151. <input type="hidden" name="token" value="c781f0df">
  152. </div>
  153. </form>
  154. </div>
  155. </div>
  156. </div>
  157. <div class="modal fade" id="upgrade-info" tabindex="-1" role="dialog" aria-labelledby="myModalLabels" aria-hidden="true">
  158. <div class="modal-dialog we7-modal-dialog" style="width:800px">
  159. <div class="modal-content">
  160. <div class="modal-header">
  161. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  162. <h4 class="modal-title">模块分支版本信息</h4>
  163. </div>
  164. <div class="modal-body">
  165. <div style="margin:-30px -30px 30px;" class="modal-alert">
  166. <div class="alert alert-info">
  167. <p><i class="wi wi-info-sign"></i> 应用分支按照等级顺序排列。</p>
  168. <p><i class="wi wi-info-sign"></i> 如果要升级到其它分支最新版本,需要花费对应分支价格数量的交易币。</p>
  169. <p><i class="wi wi-info-sign"></i> 已购买的模块分支可以免费升级到该分支的最新版本。</p>
  170. </div>
  171. </div>
  172. <table class="table we7-table vertical-middle">
  173. <col width="">
  174. <col width="180px">
  175. <col width="400px">
  176. <tr>
  177. <th colspan="3" class="text-left">{{ module_list[upgradeInfo.name].title }}---模块分支信息</th>
  178. </tr>
  179. <tr>
  180. <td class="text-left">
  181. 分支名称
  182. </td>
  183. <td class="text-center">
  184. 升级价格
  185. </td>
  186. <td class="text-center">
  187. 操作
  188. </td>
  189. </tr>
  190. <tr ng-repeat="branch in upgradeInfo.branches">
  191. <td class="text-left"> {{ branch.name }}</td>
  192. <td class="text-center"> {{ branch.id > upgradeInfo.site_branch.id ? branch.upgrade_price : 0 }}元</td>
  193. <td class="text-right">
  194. <div class="link-group">
  195. <a tabindex="2" href="javascript:;" role="button" data-toggle="popover" title="{{ module_list[upgradeInfo.name].title }}升级说明" data-container="#upgrade-info" data-placement="bottom" data-trigger="focus" data-html="true" data-content="{{ branch.version.description }}">升级说明</a>
  196. <a ng-href="{{ './index.php?c=cloud&a=process&m='+upgradeInfo.name+'&is_upgrade=1' }}&account_type={ACCOUNT_TYPE}" onclick="return confirm('确定要升级到此分之的最新版吗?')" ng-if="branch.id == upgradeInfo.site_branch.id">免费升级到【{{branch.name}}】最新版本</a>
  197. <a ng-href="{{ './index.php?c=cloud&a=redirect&do=buybranch&m='+upgradeInfo.name+'&branch='+branch.id+'&is_upgrade=1' }}&account_type={ACCOUNT_TYPE}" ng-click="upgrade(branch.upgrade_price)" ng-if="branch.id > upgradeInfo.site_branch.id">付费升级到【{{branch.name}}】最新版本</a>
  198. </div>
  199. </td>
  200. <script>
  201. $('[data-toggle="popover"]').popover();
  202. </script>
  203. </tr>
  204. </table>
  205. </div>
  206. <div class="modal-footer">
  207. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  208. </div>
  209. </div>
  210. </div>
  211. </div>
  212. </div>
  213. <script>
  214. require(['fileUploader'], function() {
  215. angular.module('moduleApp').value('config', {
  216. 'isFounder' : '{if $_W['isfounder']}1{else}2{/if}',
  217. 'letters': {php echo json_encode($letters)},
  218. 'module_list': {php echo json_encode($module_list)},
  219. 'editModuleUrl': "{php echo url('module/manage-system/get_module_info')}",
  220. 'saveModuleUrl' : "{php echo url('module/manage-system/save_module_info')}",
  221. 'checkUpgradeUrl' : "{php echo url('module/manage-system/check_upgrade')}",
  222. 'get_upgrade_info_url' : "{php echo url('module/manage-system/get_upgrade_info')}"
  223. });
  224. angular.bootstrap($('#js-system-module'), ['moduleApp']);
  225. });
  226. </script>
  227. {elseif $do == 'not_installed'}
  228. <div class="we7-page-title">
  229. 应用管理
  230. </div>
  231. <ul class="we7-page-tab">
  232. <li><a href="{php echo url('module/manage-system/installed', array('account_type' => 4))}">已安装的小程序 </a></li>
  233. <li {if $status == 'uninstalled'}class="active"{/if}><a href="{php echo url('module/manage-system/not_installed', array('account_type' => 4))}">未安装的小程序<span class="color-red"> ({$total_uninstalled}) </span></a></li>
  234. <li {if $status == 'recycle'}class="active"{/if}><a href="{php echo url('module/manage-system/not_installed', array('account_type' => 4, 'status' => 'recycle'))}">已停用小程序</a></li>
  235. <li {if $status == 'uninstalled_recycle'}class="active"{/if}><a href="{php echo url('module/manage-system/not_installed', array('account_type' => 4, 'status' => 'uninstalled_recycle'))}" ng-if="isFounder == 1">小程序回收站<span class="color-red"> ({$total_uninstalled_recycle}) </span></a></li>
  236. </ul>
  237. <div id="js-system-module-not_installed" ng-controller="notInstalledCtrl" ng-cloak>
  238. <div class="we7-page-search clearfix">
  239. <!--<div class="pull-right">-->
  240. <!--<a href="添加.html" class="btn btn-danger">购买应用模块</a>-->
  241. <!--</div>-->
  242. <form action="" method="get" class="row">
  243. <div class="form-group col-sm-4">
  244. <div class="input-group we7-margin-bottom">
  245. <input type="hidden" name="c" value="module">
  246. <input type="hidden" name="a" value="manage-system">
  247. <input type="hidden" name="do" value="{$do}">
  248. <input type="hidden" name="type" value="{$type}">
  249. <input type="hidden" name="support" value="{$module_support_name}">
  250. <input type="hidden" name="letter" value="{$letter}">
  251. <input class="form-control" name="title" value="{$title}" type="text" placeholder="名称" >
  252. <span class="input-group-btn"><button id="search" class="btn btn-default"><i class="fa fa-search"></i></button></span>
  253. </div>
  254. </div>
  255. </form>
  256. </div>
  257. <div class="clearfix"> </div>
  258. <ul class="letters-list">
  259. <li ng-repeat="letter in letters"><a href="javascript:;" ng-click="searchLetter(letter)">{{ letter }}</a></li>
  260. </ul>
  261. <table class="table we7-table table-hover vertical-middle table-manage">
  262. <tr>
  263. <th colspan="2" class="text-left">小程序应用</th>
  264. <th class="text-left">操作</th>
  265. </tr>
  266. {if $status == 'uninstalled'}
  267. <tr ng-repeat="module in module_list" ng-show="!module.is_delete">
  268. {elseif $status == 'uninstalled_recycle'}
  269. <tr ng-repeat="module in module_list" ng-show="module.is_delete">
  270. {elseif $status == 'recycle'}
  271. <tr ng-repeat="module in module_list">
  272. {/if}
  273. <td class="text-left">
  274. <img ng-src="{{ module.logo }}" class="img-responsive" style="width: 50px;height: 50px;"/>
  275. </td>
  276. <td class="text-left">
  277. <p>{{ module.title }}</p>
  278. <span>版本:{{ module.version }} </span>
  279. </td>
  280. <td class="text-left">
  281. {if permission_check_account_user('see_module_manage_system_install')}
  282. <a href="{php echo url('module/manage-system/upgrade', array('account_type' => 4))}&module_name={{ module.name }}" ng-if="module.upgrade_support == true" class="btn btn-primary">{if $_GPC['status'] == 'recycle'}启用{else}安装应用模块{/if}</a>
  283. <a href="{php echo url('module/manage-system/install', array('account_type' => 4))}&module_name={{ module.name }}" ng-if="module.upgrade_support != true" class="btn btn-primary">{if $_GPC['status'] == 'recycle'}启用{else}安装应用模块{/if}</a>
  284. {if $status == 'uninstalled' && permission_check_account_user('see_module_manage_system_stop')}
  285. <a href="{php echo url('module/manage-system/uninstalled_recycle', array('account_type' => ACCOUNT_TYPE))}&module_name={{ module.name }}&opt=0" class="btn btn-primary" onclick="return confirm('确认要删除模块吗?')">删除</a>
  286. {/if}
  287. {if $_GPC['status'] == 'uninstalled_recycle' && permission_check_account_user('see_module_manage_system_stop')}
  288. <a href="{php echo url('module/manage-system/uninstalled_recycle', array('account_type' => ACCOUNT_TYPE))}&module_name={{ module.name }}&opt=1" class="btn btn-primary">恢复</a>
  289. {/if}
  290. {if $_GPC['status'] == 'recycle'}
  291. <a href="{php echo url('module/manage-system/recycle_uninstall', array('account_type' => ACCOUNT_TYPE))}&module_name={{ module.name }}" ng-if="module.upgrade_support != true" class="btn btn-primary">卸载模块</a>
  292. {/if}
  293. {/if}
  294. </td>
  295. </tr>
  296. </table>
  297. </form>
  298. <div class="text-right">
  299. {$pager}
  300. </div>
  301. </div>
  302. <script>
  303. angular.module('moduleApp').value('config', {
  304. 'letters' : {php echo json_encode($letters)},
  305. 'module_list' : {php echo json_encode($uninstall_modules)}
  306. });
  307. angular.bootstrap($('#js-system-module-not_installed'), ['moduleApp']);
  308. </script>
  309. {elseif $do == 'module_detail'}
  310. <div class="js-system-module-detail" ng-controller="detailCtrl" ng-cloak>
  311. <ol class="breadcrumb we7-breadcrumb">
  312. <a href="{php echo referer()}"><i class="wi wi-back-circle"></i> </a>
  313. <li>
  314. 应用列表
  315. </li>
  316. <li>
  317. 应用管理
  318. </li>
  319. </ol>
  320. <div class="user-head-info we7-padding-bottom">
  321. <span class="icon pull-left" ng-if="moduleinfo.{MODULE_SUPPORT_ACCOUNT_NAME} == 2"><i class="wi wi-wx-apply"></i></span>
  322. <span class="icon pull-left" ng-if="moduleinfo.wxapp_support == 2 && moduleinfo.{MODULE_SUPPORT_ACCOUNT_NAME} != 2"><i class="wi wi-wxapp-apply"></i></span>
  323. <div class="img pull-left" ng-if="moduleinfo.main_module != ''">
  324. <img alt="子应用icon" class="plugin-img" ng-src="{{ moduleinfo.logo }}"/>
  325. <img alt="主应用icon" class="module-img" ng-src="{{ moduleinfo.main_module_logo }}"/>
  326. </div>
  327. <img ng-src="{{ moduleinfo.logo }}" class="user-avatar img-rounded pull-left" ng-if="moduleinfo.main_module == ''">
  328. <h3 class="pull-left">{{ moduleinfo.title }}</h3>
  329. </div>
  330. <div class="btn-group we7-btn-group we7-margin-bottom">
  331. <a href="javascript:;" ng-click="changeShow('base')" class="btn " ng-class="{'active' : show == 'base' || show == ''}">基本信息</a>
  332. <a href="javascript:;" ng-click="changeShow('group')" class="btn " ng-class="{'active' : show == 'group'}">应用权限组</a>
  333. {if permission_check_account_user('see_module_manage_system_ugrade')}
  334. <a href="javascript:;" ng-click="changeShow('upgrade')" class="btn " ng-class="{'active' : show == 'upgrade'}" ng-show="checkupgrade == 1">升级</a>
  335. {/if}
  336. </div>
  337. <table class="table we7-table table-hover table-form" ng-show="show == 'base' || show == ''">
  338. <col width="140px">
  339. <col />
  340. <col width="100px">
  341. <tr>
  342. <th class="text-left" colspan="3">编辑模块基本信息</th>
  343. </tr>
  344. <tr>
  345. <td class="table-label">模块标题</td>
  346. <td>{{ moduleinfo.title }}</td>
  347. {if permission_check_account_user('see_module_manage_system_info_edit')}
  348. <td class="text-right">
  349. <div class="link-group"><a href="javascript:;" ng-click="editModule('title', moduleinfo.title)">修改</a></div>
  350. </td>
  351. {/if}
  352. </tr>
  353. {if permission_check_account_user('see_module_manage_system_detailinfo')}
  354. <tr>
  355. <td class="table-label">模块作者</td>
  356. <td colspan="2">{{ moduleinfo.author }}</td>
  357. </tr>
  358. <tr>
  359. <td class="table-label">模块版本</td>
  360. <td colspan="2">{{ moduleinfo.version }}</td>
  361. </tr>
  362. {/if}
  363. <tr>
  364. <td class="table-label">模块简述</td>
  365. <td>{{ moduleinfo.ability }}</td>
  366. {if permission_check_account_user('see_module_manage_system_info_edit')}
  367. <td class="text-right">
  368. <div class="link-group"><a href="javascript:;" ng-click="editModule('ability', moduleinfo.ability)">修改</a></div>
  369. </td>
  370. {/if}
  371. </tr>
  372. <tr>
  373. <td class="table-label">模块介绍</td>
  374. <td>{{ moduleinfo.description }}</td>
  375. {if permission_check_account_user('see_module_manage_system_info_edit')}
  376. <td class="text-right">
  377. <div class="link-group"><a href="javascript:;" ng-click="editModule('description', moduleinfo.description)">修改</a></div>
  378. </td>
  379. {/if}
  380. </tr>
  381. <tr>
  382. <td class="table-label">模块缩略图</td>
  383. <td><img ng-src="{{ moduleinfo.logo }}" alt="" style="width:65px; height:65px;" class="img-rounded"/></td>
  384. {if permission_check_account_user('see_module_manage_system_info_edit')}
  385. <td class="text-right">
  386. <div class="link-group"><a href="javascript:;" ng-click="editModule('logo', moduleinfo.logo)">修改</a></div>
  387. </td>
  388. {/if}
  389. </tr>
  390. <tr>
  391. <td class="table-label">模块封面</td>
  392. <td><img ng-src="{{ moduleinfo.preview }}" alt="" style="width:65px; height:65px;" class="img-rounded"/></td>
  393. {if permission_check_account_user('see_module_manage_system_info_edit')}
  394. <td class="text-right">
  395. <div class="link-group"><a href="javascript:;" ng-click="editModule('preview', moduleinfo.preview)">修改</a></div>
  396. </td>
  397. {/if}
  398. </tr>
  399. </table>
  400. {if !empty($module_info['is_relation'])}
  401. <table class="table we7-table table-hover vertical-middle table-manage" ng-show="show != 'workorder'">
  402. <col width="150px"/>
  403. <col />
  404. <col />
  405. <tr>
  406. <th colspan="3" class="text-left">可关联</th>
  407. </tr>
  408. <tr>
  409. <td class="text-left">
  410. {{ moduleinfo.relation_name }}
  411. </td>
  412. <td class="text-left">
  413. <img ng-src="{{ moduleinfo.logo }}" class="img-responsive pull-left" style="width: 50px;height: 50px; margin-right: 10px;"/>
  414. <p>{{ moduleinfo.title }}</p>
  415. <span class="color-gray">版本:{{ moduleinfo.version }} </span>
  416. </td>
  417. <td class="text-right">
  418. <div class="link-group"><a href="{php echo url('module/manage-system/module_detail')}name={{moduleinfo.name}}&account_type={{moduleinfo.account_type}}&type={{moduleinfo.type}}">查看</a></div>
  419. </td>
  420. </tr>
  421. </table>
  422. {/if}
  423. <table class="table we7-table table-hover vertical-middle" ng-show="show == 'upgrade'" ng-if="isFounder == 1 && upgradeInfo.from == 'local'">
  424. <col width="300px"/>
  425. <col />
  426. <col />
  427. <col />
  428. <col width="200px;"/>
  429. <tr>
  430. <th>目前版本</th>
  431. <th>最新版本</th>
  432. <th class="text-right">操作</th>
  433. </tr>
  434. <tr>
  435. <td>{{ moduleinfo.version }}</td>
  436. <td>{{ upgradeInfo.best_version }}</td>
  437. <td class="text-right">
  438. {if permission_check_account_user('see_module_manage_system_ugrade')}
  439. <a href="{php echo url('module/manage-system/upgrade')}module_name={{ moduleinfo.name }}&account_type={ACCOUNT_TYPE}" class="btn btn-danger">升级</a>
  440. {/if}
  441. </td>
  442. </tr>
  443. </table>
  444. <table class="table we7-table table-hover vertical-middle" ng-show="show == 'upgrade'" ng-if="isFounder == 1 && upgradeInfo.from == 'cloud' && branch.displayorder >= upgradeInfo.site_branch.displayorder" ng-repeat="branch in upgradeInfo.branches">
  445. <col width="300px"/>
  446. <col />
  447. <col />
  448. <col />
  449. <col width="200px"/>
  450. <tr>
  451. <th class="text-left">分支名称</th>
  452. <th>分支价格</th>
  453. <th>目前版本</th>
  454. <th>最新版本</th>
  455. <th class="text-right">操作</th>
  456. </tr>
  457. <tbody>
  458. <tr>
  459. <td class="text-left">{{ branch.name }}</td>
  460. <td class="color-red">{{ branch.displayorder > upgradeInfo.site_branch.displayorder || (branch.displayorder == upgradeInfo.site_branch.displayorder && branch.id > upgradeInfo.site_branch.id) ? branch.upgrade_price : ''}}<span class="label label-success" ng-if="branch.id == upgradeInfo.site_branch.id">当前分支</span></td>
  461. <td>{{ upgradeInfo.site_branch.id == branch.id ? moduleinfo.version : ''}}</td>
  462. <td>{{ branch.version.version }}</td>
  463. <td class="text-right">
  464. <span class="text text-success" ng-if="branch.id == upgradeInfo.site_branch.id && branch.version.version == moduleinfo.version">无需升级</span>
  465. {if permission_check_account_user('see_module_manage_system_ugrade')}
  466. <a ng-href="{{ module.service_expire ? 'http://s.we7.cc/module-' +upgradeInfo.id + '.html' : './index.php?c=cloud&a=process&m='+upgradeInfo.name+'&is_upgrade=1' }}&account_type={ACCOUNT_TYPE}" ng-click="notice(service_expire)" ng-if="branch.id == upgradeInfo.site_branch.id && branch.version.version != moduleinfo.version" class="btn btn-primary">升级</a>
  467. {/if}
  468. <a href="javascript:;" ng-click="upgrade(branch.upgrade_price, upgradeInfo.name, upgradeInfo.id)" ng-if="branch.displayorder > upgradeInfo.site_branch.displayorder || (branch.displayorder == upgradeInfo.site_branch.displayorder && branch.id > upgradeInfo.site_branch.id)" class="btn btn-danger">购买</a>
  469. </td>
  470. </tr>
  471. <tr>
  472. <td class="text-left">{{ branch.id == upgradeInfo.site_branch.id ? '版本更新内容' : ''}}</td>
  473. <td colspan="4" class="text-right">
  474. <a class="color-default view-detail" ng-if="branch.id == upgradeInfo.site_branch.id && branch.version.version != moduleinfo.version" href="javascript:;" data-id="{{ branch.id }}" onclick="change($(this))">查看详情 <i class="wi wi-angle-down"></i></a>
  475. <a href="http://yuanbao.beitog.cn/module-{{upgradeInfo.id}}.html" ng-if="branch.displayorder > upgradeInfo.site_branch.displayorder || (branch.displayorder == upgradeInfo.site_branch.displayorder && branch.id > upgradeInfo.site_branch.id)" class="color-default view-detail" target="_blank">查看分支详情</a>
  476. </td>
  477. </tr>
  478. <tr id="version-detail-{{ branch.id }}" style="display:none">
  479. <td colspan="5" class="details-versions">
  480. <div class="js-version-lists">
  481. <div class="details-version">
  482. <div class="details-version-time">
  483. <p class="time-d">{{ branch.day }}</p>
  484. <p class="time-y-m">{{ branch.month }}</p>
  485. </div>
  486. <i class="fa fa-circle-o"></i>
  487. <div class="details-version-content">
  488. <div class="panel panel-version">
  489. <div class="panel-heading">
  490. 版本号:{{ branch.version.version }} - {{ branch.name }} <span class="time-h" ng-bind="branch.hour"></span>
  491. </div>
  492. <div class="panel-body" ng-bind-html="branch.version.description">
  493. </div>
  494. </div>
  495. </div>
  496. </div>
  497. </div>
  498. {if $recent_versions['total'] > 10}
  499. <div class="text-center">
  500. <a href="javascript:;" class="btn c-blue js-versions-more">加载更多<i class="fa fa-angle-down"></i></a>
  501. </div>
  502. {/if}
  503. </td>
  504. </tr>
  505. </tbody>
  506. </table>
  507. <div class="module-group" ng-if="isFounder == 1">
  508. <table class="table we7-table table-hover" ng-show="show == 'group'">
  509. <col />
  510. <col width="100px" />
  511. <tr>
  512. <th class="text-left">
  513. 应用权限组
  514. </th>
  515. <th class="text-right">
  516. {if permission_check_account_user('see_module_manage_system_group_add')}
  517. <a href="{php echo url('module/group')}" class="color-default">添加</a>
  518. {/if}
  519. </th>
  520. </tr>
  521. <tr>
  522. <td class="text-left">
  523. <span>所有服务</span>
  524. </td>
  525. <td>
  526. </td>
  527. </tr>
  528. {loop $module_group $group}
  529. <tr>
  530. <td class="text-left">
  531. <span>{$group['name']}</span>
  532. </td>
  533. <td class="text-right">
  534. {if permission_check_account_user('see_module_manage_system_group_add')}
  535. <div class="link-group"><a href="{php echo url('module/group/post', array('id' => $group['id']))}">设置</a></div>
  536. {/if}
  537. </td>
  538. </tr>
  539. {/loop}
  540. </table>
  541. </div>
  542. <table class="table we7-table table-hover" ng-if="isFounder == 1">
  543. <col width="255px"/>
  544. <col width="130px"/>
  545. <col width="250px"/>
  546. <col width="122px"/>
  547. <col />
  548. </table>
  549. <div class="modal fade" id="module-info" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  550. <div class="modal-dialog we7-modal-dialog" style="width:800px">
  551. <div class="modal-content">
  552. <div class="modal-header">
  553. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  554. <h4 class="modal-title">编辑模块信息</h4>
  555. </div>
  556. <div class="modal-body">
  557. <div class="form-group" ng-show="editType == 'title'">
  558. <label class="col-sm-2 control-label"> 模块标题</label>
  559. <div class="col-sm-10">
  560. <input type="text" name="title" ng-model="moduleOriginal.title" class="form-control">
  561. <span class="help-block">模块的名称, 显示在用户的模块列表中. 不要超过10个字符</span>
  562. </div>
  563. </div>
  564. <div class="form-group" ng-show="editType == 'ability'">
  565. <label class="col-sm-2 control-label"> 模块简述</label>
  566. <div class="col-sm-10">
  567. <input type="text" name="ability" ng-model="moduleOriginal.ability" class="form-control">
  568. <span class="help-block">模块功能描述, 使用简单的语言描述模块的作用, 来吸引用户</span>
  569. </div>
  570. </div>
  571. <div class="form-group" ng-show="editType == 'description'">
  572. <label class="col-sm-2 control-label"> 模块介绍</label>
  573. <div class="col-sm-10">
  574. <textarea type="text" name="description" ng-model="moduleOriginal.description" class="form-control" rows="5">{{ moduleinfo.description }}</textarea>
  575. <span class="help-block">模块详细描述, 详细介绍模块的功能和使用方法</span>
  576. </div>
  577. </div>
  578. <div class="form-group" ng-show="editType == 'logo'">
  579. <label class="col-sm-2 control-label"> 模块缩略图</label>
  580. <div class="col-sm-10">
  581. <div class="we7-input-img" ng-class="{ 'active' : moduleOriginal.logo }" style="width: 100px;height: 100px;">
  582. <img ng-src="{{ moduleOriginal.logo }}" ng-if="moduleOriginal.logo">
  583. <a href="javascript:;" class="input-addon" ng-hide="moduleOriginal.logo" ng-click="changePicture('logo')"><span>+</span></a>
  584. <input type="hidden" name="thumb">
  585. <div class="cover-dark">
  586. <a href="javascript:;" class="cut" ng-click="changePicture('logo')">更换</a>
  587. <a href="javascript:;" class="del" ng-click="delPicture('logo')"><i class="fa fa-times text-danger"></i></a>
  588. </div>
  589. </div>
  590. <span class="help-block">用 48*48 的图片来让你的模块更吸引眼球吧。仅支持jpg格式</span>
  591. </div>
  592. </div>
  593. <div class="form-group" ng-show="editType == 'preview'">
  594. <label class="col-sm-2 control-label"> 模块封面</label>
  595. <div class="col-sm-10">
  596. <div class="we7-input-img" ng-class="{ 'active' : moduleOriginal.preview}" style="width: 100px;height: 100px;">
  597. <img ng-src="{{ moduleOriginal.preview }}">
  598. <a href="javascript:;" class="input-addon" ng-click="changePicture('preview')"><span>+</span></a>
  599. <input type="hidden" name="thumb">
  600. <div class="cover-dark">
  601. <a href="javascript:;" class="cut" ng-click="changePicture('preview')">更换</a>
  602. <a href="javascript:;" class="del" ng-click="delPicture('preview')"><i class="fa fa-times text-danger"></i></a>
  603. </div>
  604. </div>
  605. <span class="help-block">模块封面, 大小为 600*350, 更好的设计将会获得官方推荐位置。仅支持jpg格式</span>
  606. </div>
  607. </div>
  608. </div>
  609. <div class="modal-footer">
  610. <button class="btn btn-primary" type="text" name="submit" ng-click="save()" data-dismiss="modal">保存</button>
  611. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  612. <input type="hidden" name="token" value="c781f0df">
  613. </div>
  614. </div>
  615. </div>
  616. </div>
  617. </div>
  618. <script>
  619. require(['fileUploader'], function() {
  620. angular.module('moduleApp').value('config', {
  621. 'isFounder' : "{if $_W['isfounder']}1{else}2{/if}",
  622. 'receive_ban' : "{$receive_ban}",
  623. 'show' : "{$_GPC['show']}",
  624. 'moduleInfo' : {php echo json_encode($module_info)},
  625. 'url' : "{php echo url('module/manage-system/change_receive_ban')}",
  626. 'modulename' : "{$module_info['name']}",
  627. 'editModuleUrl' : "{php echo url('module/manage-system/get_module_info')}",
  628. 'saveModuleUrl' : "{php echo url('module/manage-system/save_module_info')}",
  629. 'checkReceiveUrl' : "{php echo url('module/manage-system/check')}",
  630. 'checkUpgradeUrl' : "{php echo url('module/manage-system/check_upgrade')}",
  631. 'get_upgrade_info_url' : "{php echo url('module/manage-system/get_upgrade_info')}"
  632. });
  633. angular.bootstrap($('.js-system-module-detail'), ['moduleApp']);
  634. });
  635. if(window.addEventListener) {
  636. window.addEventListener('message', function(e){
  637. $('#workorderiframe').height(e.data.height+200); //选中图片导致高度又变高了
  638. });
  639. }
  640. $.getJSON("{php echo url('system/workorder/module')}name={$module_info['name']}", function(data){
  641. if(data.errno == 0) {
  642. $('#workorderiframe').attr('src',data.data.url);
  643. }
  644. });
  645. </script>
  646. {elseif $do == 'install_success'}
  647. <div class="steps">
  648. <div class="steps-item steps-status-wait">
  649. <div class="steps-line"><span class="steps-num">1</span></div>
  650. <div class="steps-state">安装应用</div>
  651. </div>
  652. <div class="steps-item steps-status-wait">
  653. <div class="steps-line"><span class="steps-num">2</span></div>
  654. <div class="steps-state">分配应用权限</div>
  655. </div>
  656. <div class="steps-item steps-status-finish">
  657. <div class="steps-line"><span class="steps-num">3</span></div>
  658. <div class="steps-state">安装成功</div>
  659. </div>
  660. </div>
  661. <div class="distribution-steps">
  662. <div class="we7-margin-bottom-sm font-lg">应用分配到公众号使用的流程说明</div>
  663. <div class="steps-container">
  664. <div>
  665. <div class="num">1</div>
  666. <div class="title">
  667. <span class="wi wi-appjurisdiction"></span>添加应用权限组
  668. </div>
  669. <div class="content">
  670. 设置应用权限组名称,选择需要添加的公众号应用、小程序应用、微站模板,保存提交。
  671. <div><a href="{php echo url('module/group/post')}" class="color-default">去添加应用组 ></a></div>
  672. </div>
  673. </div>
  674. <div>
  675. <div class="num">2</div>
  676. <div class="title">
  677. <span class="wi wi-userjurisdiction"></span>添加用户权限组
  678. </div>
  679. <div class="content">
  680. 设置用户权限组名称,选择可以添加的的公众号,小程序数量、有效期并选择应用权限组,然后保存提交。
  681. <div><a href="{php echo url('user/group/post')}" class="color-default">去添加用户权限组 ></a></div>
  682. </div>
  683. </div>
  684. <div>
  685. <div class="num">3</div>
  686. <div class="title">
  687. <span class="wi wi-user-group"></span>分配用户权限组
  688. </div>
  689. <div class="content">
  690. 改用户组权限,分配成功后此用户组即可使用该应用组的所有应用。
  691. <div><a href="{php echo url('user/group')}" class="color-default">去分配用户组 ></a></div>
  692. </div>
  693. </div>
  694. </div>
  695. </div>
  696. <div class="we7-margin-bottom">
  697. <a class="btn btn-primary" href="{php echo url('module/manage-system/installed', array('account_type' => ACCOUNT_TYPE))}">返回已安装应用列表</a>
  698. </div>
  699. {/if}
  700. {template 'common/footer'}