manage-system-welcome.html 33 KB

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