manage-base-wxapp.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  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">小程序应用设置</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">二维码</td>
  22. <td><img ng-src="{{ other.qrcodeimgsrc }}" ng-if="other" width="75px" height="75px"></td>
  23. <td class="text-right"><div class="link-group"><a href="javascript:;" ng-click="changeImage('qrcodeimgsrc','{$uniacid}')">修改</a></div></td>
  24. </tr>
  25. <tr>
  26. <td class="table-label">小程序名称</td>
  27. <td ng-bind="account.name"></td>
  28. <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>
  29. </tr>
  30. <tr>
  31. <td class="table-label">小程序帐号</td>
  32. <td ng-bind="account.account"></td>
  33. <td class="text-right"><div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#account" ng-click="editInfo('account', account.account)">修改</a></div></td>
  34. </tr>
  35. <tr>
  36. <td class="table-label">原始ID</td>
  37. <td ng-bind="account.original"></td>
  38. <td class="text-right"><div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#original" ng-click="editInfo('original', account.original)">修改</a></div></td>
  39. </tr>
  40. <tr>
  41. <td class="table-label">接入方式</td>
  42. <td ng-if="account.type == 4">普通接入</td>
  43. <td ng-if="account.type == 7">授权接入</td>
  44. <td class="text-right" ng-if="authstate && authurl">
  45. <div class="link-group">
  46. <a href="javascript:;" data-toggle="modal" data-target="#jointype" ng-click="editInfo('type', account.type)">修改</a>
  47. </div>
  48. </td>
  49. <td ng-if="!authstate"></td>
  50. </tr>
  51. <tr>
  52. <td class="table-label">到期时间</td>
  53. <td>
  54. <span ng-bind="account.start"></span><span class="color-gray"></span> ~
  55. <span ng-bind="account.end"></span><span class="color-gray">(随该公众号主管理员的到期时间,未设置主管理员时默认为创始人)</span></td>
  56. <td class="text-right">
  57. <div class="link-group" ng-if="founder || owner">
  58. <a href="javascript:;" data-toggle="modal" data-target="#endtime" ng-click="editInfo('endtype', account.endtype)">修改</a>
  59. <a href="{php echo url('site/entry/goodsbuyer', array('direct' => 1, 'm' => 'store', 'type' => STORE_TYPE_WXAPP_RENEW))}">续费</a>
  60. </div>
  61. </td>
  62. </tr>
  63. <tr>
  64. <td class="table-label">本地附件空间</td>
  65. <td>
  66. <span ng-if="account.attachment_limit != -1">{{account.attachment_limit}}M</span>
  67. <span ng-if="account.attachment_limit == -1">不限</span>
  68. </td>
  69. <td class="text-right">
  70. <div class="link-group" ng-if="founder || owner">
  71. <a href="javascript:;" data-toggle="modal" data-target="#attachment_limit" ng-click="editInfo('attachment_limit', account.attachment_limit)">修改</a>
  72. </div>
  73. </td>
  74. </tr>
  75. <tr>
  76. <td class="table-label">已用附件空间</td>
  77. <td><span ng-bind="account.attachment_size"></span><span>M</span></td>
  78. <td class="text-right"></td>
  79. </tr>
  80. </table>
  81. <div class="modal fade" id="attachment_limit" tabindex="-1" role="dialog" aria-hidden="true">
  82. <div class="we7-modal-dialog modal-dialog we7-form">
  83. <div class="modal-content">
  84. <div class="modal-header">
  85. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  86. <div class="modal-title">修改公众号附件空间大小</div>
  87. </div>
  88. <div class="modal-body">
  89. <div class="form-group">
  90. <input type="number" ng-model="middleAccount.attachment_limit" class="form-control"/>
  91. <span class="help-block">请输入单位为 M 的内存值,设置为 -1 时不限空间。</span>
  92. </div>
  93. </div>
  94. <div class="modal-footer">
  95. <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="httpChange('attachment_limit')">确定</button>
  96. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. <div class="modal fade" id="name" tabindex="-1" role="dialog" aria-hidden="true">
  102. <div class="we7-modal-dialog modal-dialog">
  103. <div class="modal-content">
  104. <div class="modal-header">
  105. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  106. <div class="modal-title">修改小程序名称</div>
  107. </div>
  108. <div class="modal-body">
  109. <div class="form-group">
  110. <input type="text" ng-model="middleAccount.name" class="form-control" placeholder="公众号名称" />
  111. <span class="help-block"></span>
  112. </div>
  113. </div>
  114. <div class="modal-footer">
  115. <button type="button" class="btn btn-primary" ng-click="httpChange('name')">确定</button>
  116. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. <div class="modal fade" id="account" tabindex="-1" role="dialog" aria-hidden="true">
  122. <div class="we7-modal-dialog modal-dialog">
  123. <div class="modal-content">
  124. <div class="modal-header">
  125. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  126. <div class="modal-title">修改小程序账号</div>
  127. </div>
  128. <div class="modal-body">
  129. <div class="form-group">
  130. <input type="text" ng-model="middleAccount.account" class="form-control" placeholder="公众号账号" />
  131. <span class="help-block"></span>
  132. </div>
  133. </div>
  134. <div class="modal-footer">
  135. <button type="button" class="btn btn-primary" ng-click="httpChange('account')">确定</button>
  136. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. <div class="modal fade" id="original" tabindex="-1" role="dialog" aria-hidden="true">
  142. <div class="we7-modal-dialog modal-dialog">
  143. <div class="modal-content">
  144. <div class="modal-header">
  145. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  146. <div class="modal-title">修改小程序原始ID</div>
  147. </div>
  148. <div class="modal-body">
  149. <div class="form-group">
  150. <input type="text" ng-model="middleAccount.original" class="form-control" placeholder="小程序原始ID" />
  151. <span class="help-block"></span>
  152. </div>
  153. </div>
  154. <div class="modal-footer">
  155. <button type="button" class="btn btn-primary" ng-click="httpChange('original')">确定</button>
  156. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  157. </div>
  158. </div>
  159. </div>
  160. </div>
  161. <div class="modal fade" id="jointype" role="dialog">
  162. <div class="we7-modal-dialog modal-dialog we7-form">
  163. <div class="modal-content">
  164. <div class="modal-header">
  165. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  166. <div class="modal-title">修改接入方式</div>
  167. </div>
  168. <div class="modal-body text-center">
  169. <input id="type-1" type="radio" name="jointype" value="4" ng-model="middleAccount.type" ng-checked="middleAccount.type == 4">
  170. <label class="radio-inline" for="type-1">普通接入</label>
  171. <input id="type-2" type="radio" name="jointype" value="7" ng-model="middleAccount.type" ng-checked="middleAccount.type == 7">
  172. <label class="radio-inline" for="type-2">授权接入</label>
  173. </div>
  174. <div class="modal-footer">
  175. <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="httpChange('jointype')">确定</button>
  176. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. <table class="table we7-table table-hover table-form wechat-menu">
  182. <col width="140px " />
  183. <col />
  184. <col width="100px" />
  185. <tr><th class="text-left" colspan="3">开发者ID</th></tr>
  186. <tr>
  187. <td class="table-label">AppId</td>
  188. <td ng-bind="account.key"></td>
  189. <td><div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#key" ng-click="editInfo('key', account.key)">修改</a></div></td>
  190. </tr>
  191. <tr>
  192. <td class="table-label">AppSecret</td>
  193. <td ng-bind="account.secret"></td>
  194. <td><div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#secret" ng-click="editInfo('secret', account.secret)">修改</a></div></td>
  195. </tr>
  196. </table>
  197. <div class="modal fade" id="key" tabindex="-1" role="dialog" aria-hidden="true">
  198. <div class="we7-modal-dialog modal-dialog">
  199. <div class="modal-content">
  200. <div class="modal-header">
  201. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  202. <div class="modal-title">修改小程序AppId</div>
  203. </div>
  204. <div class="modal-body">
  205. <div class="form-group">
  206. <input type="text" ng-model="middleAccount.key" class="form-control" placeholder="小程序AppId" />
  207. <span class="help-block"></span>
  208. </div>
  209. </div>
  210. <div class="modal-footer">
  211. <button type="button" class="btn btn-primary" ng-click="httpChange('key')">确定</button>
  212. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  213. </div>
  214. </div>
  215. </div>
  216. </div>
  217. <div class="modal fade" id="secret" tabindex="-1" role="dialog" aria-hidden="true">
  218. <div class="we7-modal-dialog modal-dialog">
  219. <div class="modal-content">
  220. <div class="modal-header">
  221. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  222. <div class="modal-title">修改小程序AppSecret</div>
  223. </div>
  224. <div class="modal-body">
  225. <div class="form-group">
  226. <input type="text" ng-model="middleAccount.secret" class="form-control" placeholder="小程序AppSecret" />
  227. <span class="help-block"></span>
  228. </div>
  229. </div>
  230. <div class="modal-footer">
  231. <button type="button" class="btn btn-primary" ng-click="httpChange('secret')">确定</button>
  232. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  233. </div>
  234. </div>
  235. </div>
  236. </div>
  237. <table class="table wechat-communication">
  238. <col width="160px " />
  239. <col />
  240. <col />
  241. <tr><th class="text-left" colspan="3">服务器配置信息</th></tr>
  242. <tr>
  243. <td class="table-label">request合法域名</td>
  244. <td>
  245. <a href="javascript:;" class="we7-padding-right" ng-bind="other.siteurl"></a>
  246. </td>
  247. <td>
  248. <div class="link-group"><a href="javascript:;" id="copy-0" clipboard supported="supported" text="other.siteurl" on-copied="success('0')">点击复制</a></div>
  249. </td>
  250. </tr>
  251. <tr>
  252. <td class="table-label">socket合法域名</td>
  253. <td>
  254. <a href="javascript:;" class="we7-padding-right" ng-bind="other.siteurl"></a>
  255. </td>
  256. <td>
  257. <div class="link-group"><a href="javascript:;" id="copy-1" clipboard supported="supported" text="other.siteurl" on-copied="success('1')">点击复制</a></div>
  258. </td>
  259. </tr>
  260. <tr>
  261. <td class="table-label">uploadFile合法域名</td>
  262. <td>
  263. <a href="javascript:;" class="we7-padding-right" ng-bind="other.siteurl"></a>
  264. </td>
  265. <td>
  266. <div class="link-group"><a href="javascript:;" id="copy-2" clipboard supported="supported" text="other.siteurl" on-copied="success('2')">点击复制</a></div>
  267. </td>
  268. </tr>
  269. <tr>
  270. <td class="table-label">downloadFile合法域名</td>
  271. <td>
  272. <a href="javascript:;" class="we7-padding-right" ng-bind="other.siteurl"></a>
  273. </td>
  274. <td>
  275. <div class="link-group"><a href="javascript:;" id="copy-3" clipboard supported="supported" text="other.siteurl" on-copied="success('3')">点击复制</a></div>
  276. </td>
  277. </tr>
  278. </table>
  279. <table class="table wechat-communication">
  280. <col width="160px" />
  281. <col />
  282. <col width="230px"/>
  283. <tr><th class="text-left" colspan="3">消息推送配置</th></tr>
  284. <tr>
  285. <td class="table-label">URL<p>(服务器地址)</p></td>
  286. <td>
  287. <a href="javascript:;" class="we7-padding-right" ng-bind="other.serviceUrl"></a>
  288. </td>
  289. <td>
  290. <div class="link-group"><a href="javascript:;" id="copy-4" clipboard supported="supported" text="other.serviceUrl" on-copied="success('4')">点击复制</a></div>
  291. </td>
  292. </tr>
  293. <tr>
  294. <td class="table-label">Token<p>(令牌)</p></td>
  295. <td>
  296. <a href="javascript:;" class="we7-padding-right" ng-bind="account.token"></a>
  297. </td>
  298. <td>
  299. <div class="link-group">
  300. <a href="javascript:;" data-toggle="modal" data-target="#token">修改</a>
  301. <a href="javascript:;" data-dismiss="modal" ng-click="httpChange('token')">生成新的</a>
  302. <a href="javascript:;" id="copy-5" clipboard supported="supported" text="account.token" on-copied="success('5')">点击复制</a>
  303. </div>
  304. </td>
  305. </tr>
  306. <tr>
  307. <td class="table-label">EncodingAESKey<p>(消息加解密密钥)</p> </td>
  308. <td>
  309. <a href="javascript:;" class="we7-padding-right" ng-bind="account.encodingaeskey"></a>
  310. </td>
  311. <td>
  312. <div class="link-group">
  313. <a href="javascript:;" data-toggle="modal" data-target="#encodingaeskey">修改</a>
  314. <a href="javascript:;" data-dismiss="modal" ng-click="httpChange('encodingaeskey')">生成新的</a>
  315. <a href="javascript:;" id="copy-6" clipboard supported="supported" text="account.encodingaeskey" on-copied="success('6')">点击复制</a>
  316. </div>
  317. </td>
  318. </tr>
  319. </table>
  320. <div class="modal fade" id="token" tabindex="-1" role="dialog" aria-hidden="true">
  321. <div class="we7-modal-dialog modal-dialog we7-form">
  322. <div class="modal-content">
  323. <div class="modal-header">
  324. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  325. <div class="modal-title">修改token</div>
  326. </div>
  327. <div class="modal-body">
  328. <div class="form-group">
  329. <input type="text" id="newtoken" class="form-control" placeholder="请填写新的公众号消息校验Token" />
  330. <span class="help-block">与公众平台接入设置值一致,必须为英文或者数字,长度为3到32个字符. 请妥善保管, Token 泄露将可能被窃取或篡改平台的操作数据.</span>
  331. </div>
  332. </div>
  333. <div class="modal-footer">
  334. <button type="button" class="btn btn-primary" ng-click="httpChange('token', 'edit')">确定</button>
  335. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  336. </div>
  337. </div>
  338. </div>
  339. </div>
  340. <div class="modal fade" id="endtime" role="dialog">
  341. <div class="we7-modal-dialog modal-dialog we7-form">
  342. <div class="modal-content">
  343. <div class="modal-header">
  344. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  345. <div class="modal-title">设置到期时间</div>
  346. </div>
  347. <div class="modal-body">
  348. <div class="form-group" ng-if="middleAccount.endtype == 1 || founder">
  349. <input id="endtype-1" type="radio" name="endtype" value="2" ng-model="middleAccount.endtype" ng-checked="middleAccount.endtype == 2"><label for="endtype-1">设置期限</label>
  350. <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>
  351. </div>
  352. <div class="form-group" ng-show="middleAccount.endtype == 2">
  353. {php echo tpl_form_field_date('endtime', $account['endtime']);}
  354. </div>
  355. </div>
  356. <div class="modal-footer">
  357. <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="httpChange('endtime')">确定</button>
  358. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  359. </div>
  360. </div>
  361. </div>
  362. </div>
  363. <div class="modal fade" id="encodingaeskey" tabindex="-1" role="dialog" aria-hidden="true">
  364. <div class="we7-modal-dialog modal-dialog we7-form">
  365. <div class="modal-content">
  366. <div class="modal-header">
  367. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  368. <div class="modal-title">修改EncodingAESKey</div>
  369. </div>
  370. <div class="modal-body">
  371. <div class="form-group">
  372. <input type="text" id="newencodingaeskey" class="form-control" placeholder="请填写新的公众号消息加解密Key" />
  373. <span class="help-block">与公众平台接入设置值一致,必须为英文或者数字,长度为43个字符. 请妥善保管, EncodingAESKey 泄露将可能被窃取或篡改平台的操作数据.</span>
  374. </div>
  375. </div>
  376. <div class="modal-footer">
  377. <button type="button" class="btn btn-primary" ng-click="httpChange('encodingaeskey', 'edit')">确定</button>
  378. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  379. </div>
  380. </div>
  381. </div>
  382. </div>
  383. </div>
  384. <script>
  385. angular.module('accountApp').value('config', {
  386. founder : {if $_W['isfounder']}true{else}false{/if},
  387. owner : {if $state == 'owner'}true{else}false{/if},
  388. account: {php echo !empty($account) ? json_encode($account) : 'null'},
  389. uniaccount: {php echo !empty($uniaccount) ? json_encode($uniaccount) : 'null'},
  390. headimgsrc: "{php echo $headimgsrc}",
  391. qrcodeimgsrc: "{php echo $qrcodeimgsrc}",
  392. authstate: "{php echo $_W['setting']['platform']['authstate']}",
  393. authurl: {php echo !empty($authurl) ? json_encode($authurl) : 'null'},
  394. links: {
  395. basePost: "{php echo url('account/post/base', array('acid' => $acid, 'uniacid' => $uniacid, 'account_type' => ACCOUNT_TYPE_APP_NORMAL))}",
  396. siteroot: "{php echo str_replace('http://', 'https://', $_W['siteroot'])}",
  397. },
  398. });
  399. angular.bootstrap($('#js-account-manage-base'), ['accountApp']);
  400. </script>
  401. {template 'common/footer'}