人人商城

module-wxapp.html 30KB

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