manage-base-xzapp.html 19 KB

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