人人商城

passport.html 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. {template 'common/header'}
  2. {template 'profile/common'}
  3. {if $do == 'oauth'}
  4. <div id="js-profile-passport" ng-controller="oauthCtrl" ng-cloak>
  5. <table class="table we7-table table-hover table-form">
  6. <col width="180px " />
  7. <col />
  8. <col width="100px" />
  9. <tr>
  10. <th class="text-left" colspan="3">公众平台oAuth设置</th>
  11. </tr>
  12. <tr>
  13. <td class="text-left">
  14. 选择公众号
  15. </td>
  16. <td class="text-left color-gray" ng-bind="oauthtitle"></td>
  17. <td class="text-left">
  18. <div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#oauth">修改</a></div>
  19. </td>
  20. </tr>
  21. <tr>
  22. <td class="text-left">
  23. oAuth独立域名
  24. </td>
  25. <td class="text-left color-gray" ng-bind="originalHost"></td>
  26. <td class="text-left">
  27. <div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#host">修改</a></div>
  28. </td>
  29. </tr>
  30. </table>
  31. <div class="modal fade" id="oauth" tabindex="-1" role="dialog" aria-hidden="true">
  32. <div class="we7-modal-dialog modal-dialog">
  33. <div class="modal-content">
  34. <div class="modal-header">
  35. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  36. <div class="modal-title">选择公众号</div>
  37. </div>
  38. <div class="modal-body">
  39. <div class="form-group">
  40. <select ng-model="oauthAccount" class="we7-select">
  41. <option value="" ng-selected="oauthAccount == ''">不借用任何权限</option>
  42. {loop $oauth_accounts $key $account}
  43. <option value="{php echo $key}">{php echo $account}</option>
  44. {/loop}
  45. </select>
  46. <span class="help-block">在微信公众号请求用户网页授权之前,开发者需要先到公众平台网站的【开发者中心】<b>网页服务</b>中配置授权回调域名.</span>
  47. </div>
  48. </div>
  49. <div class="modal-footer">
  50. <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="saveOauth('oauth')">确定</button>
  51. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="modal fade" id="host" tabindex="-1" role="dialog" aria-hidden="true">
  57. <div class="we7-modal-dialog modal-dialog">
  58. <div class="modal-content">
  59. <div class="modal-header">
  60. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  61. <div class="modal-title">oAuth独立域名</div>
  62. </div>
  63. <div class="modal-body">
  64. <div class="form-group we7-form">
  65. <input type="text" name="host" ng-model="oauthHost" class="form-control" placeholder="oAuth独立域名">
  66. <span class="help-block">适用于您的微站或是活动有多个域名的情况下,由此域名做统一的oauth授权用。例如:http://www.baidu.com 注意:结尾没有/ </span>
  67. </div>
  68. </div>
  69. <div class="modal-footer">
  70. <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="saveOauth('oauth')">确定</button>
  71. <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="recover()">取消</button>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. <table class="table we7-table table-hover table-form">
  77. <col width="180px " />
  78. <col />
  79. <col width="100px" />
  80. <tr>
  81. <th class="text-left" colspan="3">借用 JS 分享设置</th>
  82. </tr>
  83. <tr>
  84. <td class="text-left">
  85. 选择公众号
  86. </td>
  87. <td class="text-left color-gray" ng-bind="jsOauthtitle"></td>
  88. <td class="text-left ">
  89. <div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#jsauth_acid">修改</a></div>
  90. </td>
  91. </tr>
  92. </table>
  93. <div class="modal fade" id="jsauth_acid" tabindex="-1" role="dialog" aria-hidden="true">
  94. <div class="we7-modal-dialog modal-dialog">
  95. <div class="modal-content">
  96. <div class="modal-header">
  97. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  98. <div class="modal-title">选择公众号</div>
  99. </div>
  100. <div class="modal-body">
  101. <div class="form-group">
  102. <select name="jsauth_acid" ng-model="jsOauthAccount" class="we7-select">
  103. <option value="" ng-selected="jsOauthAccount == ''">不借用任何权限</option>
  104. {loop $jsoauth_accounts $key $jsaccount}
  105. <option value="{php echo $key}">{php echo $jsaccount}</option>
  106. {/loop}
  107. </select>
  108. <span class="help-block">在系统中使用微信分享接口前,开发者需要先到公众平台网站的【公众号设置】 / 【功能设置】中配置 【JS 接口安全域名】。<a href="http://www.we7.cc/manual/dev:v0.6:qa:jsauth" target="_black">查看详情</a></span>
  109. </div>
  110. </div>
  111. <div class="modal-footer">
  112. <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="saveOauth('jsoauth')">确定</button>
  113. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. <script>
  120. angular.module('profileApp').value('config', {
  121. 'oauthAccount' : "{$oauth['account']}",
  122. 'oauthHost' : "{$oauth['host']}",
  123. 'jsOauth' : "{$jsoauth}",
  124. 'oauthAccounts' : {php echo json_encode($oauth_accounts)},
  125. 'jsOauthAccounts' : {php echo json_encode($jsoauth_accounts)},
  126. 'oauth_url' : "{php echo url('profile/passport/save_oauth')}",
  127. 'get_setting_url' : "{php echo url('profile/passport/get_setting')}"
  128. });
  129. angular.bootstrap($('#js-profile-passport'), ['profileApp']);
  130. </script>
  131. {/if}
  132. {template 'common/footer'}