人人商城

module.html 30KB

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