人人商城

oauth.html 3.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. {template 'common/header'}
  2. <div class="we7-page-title">
  3. 参数设置
  4. </div>
  5. <ul class="we7-page-tab">
  6. <li class="active">
  7. <a href="{php echo url('system/oauth')}">oauth全局设置</a>
  8. </li>
  9. </ul>
  10. <div id="js-system-oauth" ng-controller="systemOauthCtrl" ng-cloak>
  11. <table class="table we7-table table-hover table-form">
  12. <col width="180px " />
  13. <col />
  14. <col width="100px" />
  15. <tr>
  16. <th class="text-left" colspan="3">oAuth全局设置</th>
  17. </tr>
  18. <tr>
  19. <td class="text-left">
  20. 选择公众号
  21. </td>
  22. <td class="text-left color-gray" ng-bind="oauthtitle"></td>
  23. <td class="text-left">
  24. <div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#oauth">修改</a></div>
  25. </td>
  26. </tr>
  27. <tr>
  28. <td class="text-left">
  29. oAuth独立域名
  30. </td>
  31. <td class="text-left color-gray" ng-bind="originalHost"></td>
  32. <td class="text-left">
  33. <div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#host">修改</a></div>
  34. </td>
  35. </tr>
  36. </table>
  37. <div class="modal fade" id="oauth" tabindex="-1" role="dialog" aria-hidden="true">
  38. <div class="we7-modal-dialog modal-dialog">
  39. <div class="modal-content">
  40. <div class="modal-header">
  41. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  42. <div class="modal-title">选择公众号</div>
  43. </div>
  44. <div class="modal-body">
  45. <div class="form-group">
  46. <select ng-model="oauthAccount" class="we7-select">
  47. <option value="0" ng-selected="oauthAccount == '' || oauthAccount == 0">不借用任何权限</option>
  48. {loop $oauth_accounts $key $account}
  49. <option value="{php echo $key}">{php echo $account}</option>
  50. {/loop}
  51. </select>
  52. <span class="help-block">在微信公众号请求用户网页授权之前,开发者需要先到公众平台网站的【开发者中心】<b>网页服务</b>中配置授权回调域名.</span>
  53. </div>
  54. </div>
  55. <div class="modal-footer">
  56. <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="saveOauth('oauth')">确定</button>
  57. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. <div class="modal fade" id="host" tabindex="-1" role="dialog" aria-hidden="true">
  63. <div class="we7-modal-dialog modal-dialog">
  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">oAuth独立域名</div>
  68. </div>
  69. <div class="modal-body">
  70. <div class="form-group we7-form">
  71. <input type="text" name="host" ng-model="oauthHost" class="form-control" placeholder="oAuth独立域名">
  72. <span class="help-block">适用于您的微站或是活动有多个域名的情况下,由此域名做统一的oauth授权用。例如:http://www.baidu.com 注意:结尾没有/ </span>
  73. </div>
  74. </div>
  75. <div class="modal-footer">
  76. <button type="button" class="btn btn-primary" ng-click="saveOauth()">确定</button>
  77. <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="recover()">取消</button>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. <script type="text/javascript">
  84. angular.module('systemApp').value('config', {
  85. 'oauthAccount' : "{$oauth['oauth']['account']}",
  86. 'oauthHost' : "{$oauth['oauth']['host']}",
  87. 'oauthAccounts' : {php echo json_encode($oauth_accounts)},
  88. 'links': {
  89. 'oauth_link': "{php echo url('system/oauth/save_oauth')}",
  90. },
  91. });
  92. angular.bootstrap($('#js-system-oauth'), ['systemApp']);
  93. </script>
  94. {template 'common/footer'}