oauth.blade.php 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. @extends('admin/public/layout')
  2. @section('title')一键登录设置@endsection
  3. @section('css')
  4. <link href="{{ asset('/static/js/summernote/summernote.css')}}" rel="stylesheet">
  5. @endsection
  6. @section('content')
  7. <section class="content-header">
  8. <h1>一键登录设置</h1>
  9. </section>
  10. <section class="content">
  11. <div class="row">
  12. <div class="col-xs-12">
  13. <div class="box box-default">
  14. <form role="form" name="addForm" id="register_form" method="POST" action="{{ route('admin.setting.oauth') }}">
  15. {{ csrf_field() }}
  16. <div class="box-body">
  17. <div class="form-group">
  18. <label for="website_url">开启第三方平台账号登录</label>
  19. <span class="text-muted">(关闭后则不能使用QQ、微博等第三方平台账号登录系统)</span>
  20. <div class="radio">
  21. <label><input type="radio" name="oauth_open" value="1" @if(config('services.oauth_open')) checked @endif > 开启 </label>
  22. <label class="ml-20"><input type="radio" name="oauth_open" value="0" @if(!config('services.oauth_open')) checked @endif > 关闭 </label>
  23. </div>
  24. </div>
  25. <hr />
  26. <div class="form-group">
  27. <label for="website_url">开启QQ登陆</label>
  28. <span class="text-muted">(关闭后则不显示QQ登陆相关按钮)</span>
  29. <div class="radio">
  30. <label><input type="radio" name="oauth_qq_open" value="1" @if(config('services.qq.open')) checked @endif > 开启 </label>
  31. <label class="ml-20"><input type="radio" name="oauth_qq_open" value="0" @if(!config('services.qq.open')) checked @endif > 关闭 </label>
  32. </div>
  33. </div>
  34. <div class="form-group">
  35. <label for="oauth_qq_key">QQ互联平台 APP ID</label>
  36. <input type="text" class="form-control" name="oauth_qq_key" placeholder="APP ID" value="{{ old('oauth_qq_key',config('services.qq.client_id')) }}" />
  37. </div>
  38. <div class="form-group">
  39. <label for="oauth_qq_secret">QQ互联平台 APP key</label>
  40. <input type="text" class="form-control" name="oauth_qq_secret" placeholder="APP KEY" value="{{ old('oauth_qq_secret',config('services.qq.client_secret')) }}" />
  41. </div>
  42. <div class="form-group">
  43. <label for="oauth_qq_redirect">QQ互联平台回调地址</label>
  44. <input type="text" class="form-control" name="oauth_qq_redirect" placeholder="回调地址" value="{{ route('auth.oauth.callback',['type'=>'qq']) }}" />
  45. </div>
  46. <hr />
  47. <div class="form-group">
  48. <label for="website_url">开启微博登陆</label>
  49. <span class="text-muted">(关闭后则不显示微博登陆相关按钮)</span>
  50. <div class="radio">
  51. <label><input type="radio" name="oauth_weibo_open" value="1" @if(config('services.weibo.open')) checked @endif > 开启 </label>
  52. <label class="ml-20"><input type="radio" name="oauth_weibo_open" value="0" @if(!config('services.weibo.open')) checked @endif > 关闭 </label>
  53. </div>
  54. </div>
  55. <div class="form-group">
  56. <label for="oauth_weibo_key">微博开放平台 APP ID</label>
  57. <input type="text" class="form-control" name="oauth_weibo_key" placeholder="APP ID" value="{{ old('oauth_weibo_key',config('services.weibo.client_id')) }}" />
  58. </div>
  59. <div class="form-group">
  60. <label for="oauth_weibo_secret">微博开放平台 APP key</label>
  61. <input type="text" class="form-control" name="oauth_weibo_secret" placeholder="APP KEY" value="{{ old('oauth_weibo_secret',config('services.weibo.client_secret')) }}" />
  62. </div>
  63. <div class="form-group">
  64. <label for="oauth_weibo_redirect">微博开放平台回调地址</label>
  65. <input type="text" class="form-control" name="oauth_weibo_redirect" placeholder="回调地址" value="{{ route('auth.oauth.callback',['type'=>'weibo']) }}" />
  66. </div>
  67. <hr />
  68. <div class="form-group">
  69. <label for="website_url">开启微信扫码登陆</label>
  70. <span class="text-muted">(关闭后则不显示扫码登陆相关按钮)</span>
  71. <div class="radio">
  72. <label><input type="radio" name="oauth_weixinweb_open" value="1" @if(config('services.weixinweb.open')) checked @endif > 开启 </label>
  73. <label class="ml-20"><input type="radio" name="oauth_weixinweb_open" value="0" @if(!config('services.weixinweb.open')) checked @endif > 关闭 </label>
  74. </div>
  75. </div>
  76. <div class="form-group">
  77. <label for="oauth_weibo_key">微信开放平台 APP ID</label>
  78. <input type="text" class="form-control" name="oauth_weixinweb_key" placeholder="APP ID" value="{{ old('oauth_weixinweb_key',config('services.weixinweb.client_id')) }}" />
  79. </div>
  80. <div class="form-group">
  81. <label for="oauth_weibo_secret">微信开放平台 APP key</label>
  82. <input type="text" class="form-control" name="oauth_weixinweb_secret" placeholder="APP KEY" value="{{ old('oauth_weixinweb_secret',config('services.weixinweb.client_secret')) }}" />
  83. </div>
  84. <div class="form-group">
  85. <label for="oauth_weixinweb_redirect">微信开放平台回调地址</label>
  86. <input type="text" class="form-control" name="oauth_weixinweb_redirect" placeholder="回调地址" value="{{ route('auth.oauth.callback',['type'=>'weixinweb']) }}" />
  87. </div>
  88. </div>
  89. <div class="box-footer">
  90. <button type="submit" class="btn btn-primary">保存</button>
  91. </div>
  92. </form>
  93. </div>
  94. </div>
  95. </div>
  96. </section>
  97. @endsection
  98. @section('script')
  99. <script type="text/javascript">
  100. $(function(){
  101. set_active_menu('third_part',"{{ route('admin.setting.oauth') }}");
  102. });
  103. </script>
  104. @endsection