人人商城

platform.tpl.php 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <?php defined('IN_IA') or exit('Access Denied');?><?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('common/header', TEMPLATE_INCLUDEPATH)) : (include template('common/header', TEMPLATE_INCLUDEPATH));?>
  2. <div class="we7-page-title">
  3. 微信开放平台设置
  4. </div>
  5. <ul class="we7-page-tab"></ul>
  6. <div id="js-system-platform" ng-controller="SystemPlatform" ng-cloak>
  7. <table class="table we7-table table-hover table-form we7-form">
  8. <col width="220px " />
  9. <col />
  10. <col width="230px" />
  11. <tr>
  12. <th class="text-left" colspan="2">微信开放平台开发信息</th>
  13. <th class="we7-padding-right">
  14. <a id="auth" href="<?php echo $authurl;?>" class="btn btn-success"><i class="fa fa-wechat"></i>微信公众号登录授权</a>
  15. </th>
  16. </tr>
  17. <tr>
  18. <td colspan="3" class="bg-info text-info">开发信息需开放平台审核通过后才可以看到,填写完后才可以使用授权登录功能</td>
  19. </tr>
  20. <tr>
  21. <td class="table-label" colspan="2">是否启用微信公众号登录授权</td>
  22. <td>
  23. <label>
  24. <div class="switch" ng-class="{'switchOn' : platform.authstate}" ng-click="httpChange('authstate')"></div>
  25. </label>
  26. </td>
  27. </tr>
  28. <tr>
  29. <td class="table-label">AppID</td>
  30. <td>
  31. <input type="text" name="appid" ng-model="platform.appid" readonly class="form-control">
  32. <div class="help-block">在微信开放平台注册且审核通过后可以获取到AppId</div>
  33. </td>
  34. <td>
  35. <div class="link-group">
  36. <a href="javascript:;" data-toggle="modal" data-target="#AppID">修改</a>
  37. </div>
  38. </td>
  39. </tr>
  40. <tr>
  41. <td class="table-label">AppSecret</td>
  42. <td>
  43. <input type="text" name="appsecret" ng-model="platform.appsecret" readonly class="form-control">
  44. <div class="help-block">在微信开放平台注册且审核通过后可以获取到AppSecret</div>
  45. </td>
  46. <td>
  47. <div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#AppSecret">修改</a></div>
  48. </td>
  49. </tr>
  50. </table>
  51. <div class="modal fade" id="AppID" tabindex="-1" role="dialog" aria-hidden="true">
  52. <div class="we7-modal-dialog modal-dialog">
  53. <div class="modal-content">
  54. <div class="modal-header">
  55. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  56. <div class="modal-title">修改AppID</div>
  57. </div>
  58. <div class="modal-body">
  59. <div class="form-group">
  60. <input type="text" id="newappid" class="form-control" placeholder="请填写新的AppID" />
  61. <span class="help-block">在微信开放平台注册且审核通过后可以获取到AppId</span>
  62. </div>
  63. </div>
  64. <div class="modal-footer">
  65. <button type="button" class="btn btn-primary" ng-click="httpChange('appid')">确定</button>
  66. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. <div class="modal fade" id="AppSecret" tabindex="-1" role="dialog" aria-hidden="true">
  72. <div class="we7-modal-dialog modal-dialog">
  73. <div class="modal-content">
  74. <div class="modal-header">
  75. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  76. <div class="modal-title">修改AppSecret</div>
  77. </div>
  78. <div class="modal-body">
  79. <div class="form-group">
  80. <input type="text" id="newappsecret" class="form-control" placeholder="请填写新的AppSecret" />
  81. <span class="help-block">在微信开放平台注册且审核通过后可以获取到AppSecret</span>
  82. </div>
  83. </div>
  84. <div class="modal-footer">
  85. <button type="button" class="btn btn-primary" ng-click="httpChange('appsecret')">确定</button>
  86. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. <table class="table we7-table table-hover table-form we7-form">
  92. <col width="220px " />
  93. <col />
  94. <col width="230px"/>
  95. <tr>
  96. <th class="text-left" colspan="3">微信开放平台接入配置项</th>
  97. </tr>
  98. <tr>
  99. <td class="table-label">登录授权的发起页域名</td>
  100. <td>
  101. <span ng-bind="url.host"></span>
  102. </td>
  103. <td>
  104. <div class="link-group"><a href="javascript:;" id="copy-0" clipboard supported="supported" text="url.host" on-copied="success('0')">点击复制</a></div>
  105. </td>
  106. </tr>
  107. <tr>
  108. <td class="table-label">发起授权页的体验URL</td>
  109. <td>
  110. <span><?php echo $siteroot_parse_array['host'];?><?php echo $siteroot_parse_array['path'];?>web/index.php?c=account&a=auth&do=test</span>
  111. </td>
  112. <td><div class="link-group"><a href="javascript:;" id="copy-1" clipboard supported="supported" text="url.host+url.path+'web/index.php?c=account&a=auth&do=test'" on-copied="success('1')">点击复制</a></div></td>
  113. </tr>
  114. <tr>
  115. <td class="table-label">授权事件接受URL</td>
  116. <td>
  117. <span><?php echo $siteroot_parse_array['host'];?><?php echo $siteroot_parse_array['path'];?>web/index.php?c=account&a=auth&do=ticket</span>
  118. </td>
  119. <td><div class="link-group"><a href="javascript:;" id="copy-2" clipboard supported="supported" text="url.host+url.path+'web/index.php?c=account&a=auth&do=ticket'" on-copied="success('2')">点击复制</a></div></td>
  120. </tr>
  121. <tr>
  122. <td class="color-red">公众号消息校验Token</td>
  123. <td>
  124. <input type="text" class="form-control" ng-model="platform.token" readonly>
  125. <div class="help-block">与公众平台接入设置值一致,必须为英文或者数字,长度为3到32个字符. 请妥善保管, Token 泄露将可能被窃取或篡改平台的操作数据.</div>
  126. </td>
  127. <td>
  128. <div class="link-group">
  129. <a href="javascript:;" data-toggle="modal" data-target="#token">修改</a>
  130. <a href="javascript:;" ng-click="httpChange('token')">生成新的</a>
  131. <a href="javascript:;" id="copy-3" clipboard supported="supported" text="platform.token" on-copied="success('3')">点击复制</a>
  132. </div>
  133. </td>
  134. </tr>
  135. <tr>
  136. <td class="color-red">公众号消息加解密Key</td>
  137. <td>
  138. <input type="text" class="form-control" ng-model="platform.encodingaeskey" readonly>
  139. <div class="help-block">与公众平台接入设置值一致,必须为英文或者数字,长度为43个字符. 请妥善保管, EncodingAESKey 泄露将可能被窃取或篡改平台的操作数据.</div>
  140. </td>
  141. <td>
  142. <div class="link-group">
  143. <a href="javascript:;" data-toggle="modal" data-target="#encodingaeskey">修改</a>
  144. <a href="javascript:;" ng-click="httpChange('encodingaeskey')">生成新的</a>
  145. <a href="javascript:;" id="copy-4" clipboard supported="supported" text="platform.encodingaeskey" on-copied="success('4')">点击复制</a>
  146. </div>
  147. </td>
  148. </tr>
  149. <tr>
  150. <td class="table-label">公众号消息与事件接受URL</td>
  151. <td>
  152. <input type="text" readonly value="<?php echo $siteroot_parse_array['host'];?><?php echo $siteroot_parse_array['path'];?>api.php?appid=/$APPID$" class="form-control">
  153. </td>
  154. <td><div class="link-group"><a href="javascript:;" id="copy-5" clipboard supported="supported" text="url.host+url.path+'api.php?appid=/$APPID$'" on-copied="success('5')">点击复制</a></div></td>
  155. </tr>
  156. <tr>
  157. <td class="table-label">网页开发域名</td>
  158. <td>
  159. <input type="text" readonly ng-model="url.host" class="form-control">
  160. </td>
  161. <td><div class="link-group"><a href="javascript:;" id="copy-6" clipboard supported="supported" text="url.host" on-copied="success('6')">点击复制</a></div></td>
  162. </tr>
  163. </table>
  164. <div class="modal fade" id="token" tabindex="-1" role="dialog" aria-hidden="true">
  165. <div class="we7-modal-dialog modal-dialog">
  166. <div class="modal-content">
  167. <div class="modal-header">
  168. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  169. <div class="modal-title">修改token</div>
  170. </div>
  171. <div class="modal-body">
  172. <div class="form-group">
  173. <input type="text" id="newtoken" class="form-control" placeholder="请填写新的公众号消息校验Token" />
  174. <span class="help-block">在微信开放平台注册且审核通过后可以获取到<span class="color-red">公众号消息校验Token</span></span>
  175. </div>
  176. </div>
  177. <div class="modal-footer">
  178. <button type="button" class="btn btn-primary" ng-click="httpChange('token', 'edit')">确定</button>
  179. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  180. </div>
  181. </div>
  182. </div>
  183. </div>
  184. <div class="modal fade" id="encodingaeskey" tabindex="-1" role="dialog" aria-hidden="true">
  185. <div class="we7-modal-dialog modal-dialog">
  186. <div class="modal-content">
  187. <div class="modal-header">
  188. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  189. <div class="modal-title">修改EncodingAESKey</div>
  190. </div>
  191. <div class="modal-body">
  192. <div class="form-group">
  193. <input type="text" id="newencodingaeskey" class="form-control" placeholder="请填写新的公众号消息加解密Key" />
  194. <span class="help-block">在微信开放平台注册且审核通过后可以获取到<span class="color-red">公众号消息加解密Key</span></span>
  195. </div>
  196. </div>
  197. <div class="modal-footer">
  198. <button type="button" class="btn btn-primary" ng-click="httpChange('encodingaeskey', 'edit')">确定</button>
  199. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  200. </div>
  201. </div>
  202. </div>
  203. </div>
  204. </div>
  205. <script type="text/javascript">
  206. angular.module('accountApp').value('config', {
  207. platform: <?php echo !empty($_W['setting']['platform']) ? json_encode($_W['setting']['platform']) : 'null'?>,
  208. url: <?php echo !empty($siteroot_parse_array) ? json_encode($siteroot_parse_array) : 'null'?>,
  209. links: {
  210. platformPost: "<?php echo url('system/platform')?>",
  211. },
  212. });
  213. angular.bootstrap($('#js-system-platform'), ['accountApp']);
  214. </script>
  215. <?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('common/footer', TEMPLATE_INCLUDEPATH)) : (include template('common/footer', TEMPLATE_INCLUDEPATH));?>