manage-base-webapp.html 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. {template 'common/header'}
  2. {template 'account/account-header'}
  3. <div id="js-account-manage-base" ng-controller="AccountManageBase" ng-cloak>
  4. <table class="table we7-table table-hover table-form">
  5. <col width="140px" />
  6. <col />
  7. <col width="100px" />
  8. <tr>
  9. <th class="text-left" colspan="3">PC应用设置</th>
  10. </tr>
  11. <tr>
  12. <td class="table-label">头像</td>
  13. <td><img ng-src="{{other.headimgsrc}}" class="account-img" /></td>
  14. <td class="text-right">
  15. <div class="link-group">
  16. <a href="javascript:;" ng-click="changeImage('headimgsrc','{$uniacid}')">修改</a>
  17. </div>
  18. </td>
  19. </tr>
  20. <tr>
  21. <td class="table-label">PC名称</td>
  22. <td ng-bind="account.name"></td>
  23. <td class="text-right"><div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#name" ng-click="editInfo('name', account.name)">修改</a></div></td>
  24. </tr>
  25. <tr>
  26. <td class="table-label">到期时间</td>
  27. <td><span ng-bind="account.end"></span><span class="color-gray">(随该PC主管理员的到期时间,未设置主管理员时默认为创始人)</span></td>
  28. <td class="text-right">
  29. <div class="link-group" ng-if="founder || owner">
  30. <a href="javascript:;" data-toggle="modal" data-target="#endtime" ng-click="editInfo('endtype', account.endtype)">修改</a>
  31. </div>
  32. </td>
  33. </tr>
  34. <tr>
  35. <td class="table-label">月访问总次数</td>
  36. <td ng-if="account.highest_visit"><span ng-bind="account.highest_visit"></span><span class="color-gray"> 次 / 月</span></td>
  37. <td ng-if="!account.highest_visit">不限次数</span></td>
  38. <td class="text-right">
  39. {if user_is_founder($_W['uid'])}
  40. <div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#visit" ng-click="editInfo('highest_visit', account.highest_visit)">修改</a></div>
  41. {/if}
  42. </td>
  43. </tr>
  44. <tr>
  45. <td class="table-label">本地附件空间</td>
  46. <td>
  47. <span ng-if="account.attachment_limit != -1">{{account.attachment_limit}}M</span>
  48. <span ng-if="account.attachment_limit == -1">不限</span>
  49. </td>
  50. <td class="text-right">
  51. <div class="link-group" ng-if="founder || owner">
  52. <a href="javascript:;" data-toggle="modal" data-target="#attachment_limit" ng-click="editInfo('attachment_limit', account.attachment_limit)">修改</a>
  53. </div>
  54. </td>
  55. </tr>
  56. <tr>
  57. <td class="table-label">已用附件空间</td>
  58. <td><span ng-bind="account.attachment_size"></span><span>M</span></td>
  59. <td></td>
  60. </tr>
  61. </table>
  62. <div class="modal fade" id="attachment_limit" tabindex="-1" role="dialog" aria-hidden="true">
  63. <div class="we7-modal-dialog modal-dialog we7-form">
  64. <div class="modal-content">
  65. <div class="modal-header">
  66. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  67. <div class="modal-title">修改公众号附件空间大小</div>
  68. </div>
  69. <div class="modal-body">
  70. <div class="form-group">
  71. <input type="number" ng-model="middleAccount.attachment_limit" class="form-control"/>
  72. <span class="help-block">请输入单位为 M 的内存值,设置为 -1 时不限空间。</span>
  73. </div>
  74. </div>
  75. <div class="modal-footer">
  76. <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="httpChange('attachment_limit')">确定</button>
  77. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <div class="modal fade" id="name" tabindex="-1" role="dialog" aria-hidden="true">
  83. <div class="we7-modal-dialog modal-dialog">
  84. <div class="modal-content">
  85. <div class="modal-header">
  86. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  87. <div class="modal-title">修改PC名称</div>
  88. </div>
  89. <div class="modal-body">
  90. <div class="form-group">
  91. <input type="text" ng-model="middleAccount.name" class="form-control" placeholder="PC名称" />
  92. <span class="help-block"></span>
  93. </div>
  94. </div>
  95. <div class="modal-footer">
  96. <button type="button" class="btn btn-primary" ng-click="httpChange('name')">确定</button>
  97. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. <div class="modal fade" id="account" tabindex="-1" role="dialog" aria-hidden="true">
  103. <div class="we7-modal-dialog modal-dialog">
  104. <div class="modal-content">
  105. <div class="modal-header">
  106. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  107. <div class="modal-title">修改PC账号</div>
  108. </div>
  109. <div class="modal-body">
  110. <div class="form-group">
  111. <input type="text" ng-model="middleAccount.account" class="form-control" placeholder="公众号账号" />
  112. <span class="help-block"></span>
  113. </div>
  114. </div>
  115. <div class="modal-footer">
  116. <button type="button" class="btn btn-primary" ng-click="httpChange('account')">确定</button>
  117. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. <div class="modal fade" id="endtime" role="dialog">
  123. <div class="we7-modal-dialog modal-dialog we7-form">
  124. <div class="modal-content">
  125. <div class="modal-header">
  126. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  127. <div class="modal-title">设置到期时间</div>
  128. </div>
  129. <div class="modal-body">
  130. <div class="form-group" ng-if="middleAccount.endtype == 1 || founder">
  131. <input id="endtype-1" type="radio" name="endtype" value="2" ng-model="middleAccount.endtype" ng-checked="middleAccount.endtype == 2"><label for="endtype-1">设置期限</label>
  132. <input id="endtype-2" type="radio" name="endtype" value="1" ng-model="middleAccount.endtype" ng-checked="middleAccount.endtype == 1"><label for="endtype-2" class="hidden">永久</label>
  133. </div>
  134. <div class="form-group" ng-show="middleAccount.endtype == 2">
  135. {php echo tpl_form_field_date('endtime', $account['endtime']);}
  136. </div>
  137. </div>
  138. <div class="modal-footer">
  139. <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="httpChange('endtime')">确定</button>
  140. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  141. </div>
  142. </div>
  143. </div>
  144. </div>
  145. <div class="modal fade" id="visit" tabindex="-1" role="dialog" aria-hidden="true">
  146. <div class="we7-modal-dialog modal-dialog we7-form">
  147. <div class="modal-content">
  148. <div class="modal-header">
  149. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  150. <div class="modal-title">修改访问总次数(单位:月)</div>
  151. </div>
  152. <div class="modal-body">
  153. <div class="form-group">
  154. <input type="number" step="1" ng-model="middleAccount.highest_visit" class="form-control" placeholder="每月访问总次数" />
  155. <span class="help-block">设置为0,表示无任何限制</span>
  156. </div>
  157. </div>
  158. <div class="modal-footer">
  159. <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="httpChange('highest_visit')">确定</button>
  160. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  161. </div>
  162. </div>
  163. </div>
  164. </div>
  165. </div>
  166. <script>
  167. angular.module('accountApp').value('config', {
  168. founder : {if $_W['isfounder']}true{else}false{/if},
  169. owner : {if $state == 'owner'}true{else}false{/if},
  170. account: {php echo !empty($account) ? json_encode($account) : 'null'},
  171. uniaccount: {php echo !empty($uniaccount) ? json_encode($uniaccount) : 'null'},
  172. headimgsrc: "{php echo $headimgsrc}",
  173. qrcodeimgsrc: "{php echo $qrcodeimgsrc}",
  174. links: {
  175. basePost: "{php echo url('account/post/base', array('acid' => $acid, 'uniacid' => $uniacid, 'account_type' => ACCOUNT_TYPE_WEBAPP_NORMAL))}",
  176. siteroot: "{php echo str_replace('http://', 'https://', $_W['siteroot'])}",
  177. },
  178. });
  179. angular.bootstrap($('#js-account-manage-base'), ['accountApp']);
  180. </script>
  181. {template 'common/footer'}