人人商城

manage-system-phoneapp.html 38KB

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