per_binding.blade.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. @extends('mobile.module.layouts.content')
  2. @push('meta')
  3. <meta name="csrf-token" content="{{ csrf_token() }}">
  4. @endpush
  5. @push('css')
  6. <link href="{{ theme_asset('mobile/css/company.css') }}" rel="stylesheet">
  7. @endpush
  8. @section('content')
  9. <div class="split-block-title">绑定第三方账号后,您可用于快速登录某某人才网,便于账号密码记忆。</div>
  10. @if(config('aix.system.oauth.qq.is_open_qq') == 1)
  11. <div mod="qq" class="list_height plist-txt" name="腾讯QQ">
  12. <div class="pic"></div>
  13. <div class="tit font14">腾讯QQ</div>
  14. <div class="describe font13 @if($qq) qq_unbind @else J_bind_qq @endif describe_qq">
  15. @if($qq)
  16. 解绑
  17. @else
  18. 未绑定
  19. @endif
  20. </div>
  21. <div class="arrow"></div>
  22. <div class="clear"></div>
  23. </div>
  24. @endif
  25. @if(subsite_config('aix.system.oauth.wechat_official.is_open') == 1 && is_weixin())
  26. <div mod="weixin" class="list_height plist-txt" name="微信">
  27. <div class="pic"></div>
  28. <div class="tit font14">微信</div>
  29. <div class="describe font13 @if($weixin) weixin_unbind @else J_bind_weixin @endif describe_weixin">
  30. @if($weixin)
  31. 解绑
  32. @else
  33. 未绑定
  34. @endif
  35. </div>
  36. <div class="arrow"></div>
  37. <div class="clear"></div>
  38. </div>
  39. @endif
  40. @endsection
  41. @section('script')
  42. @include('mobile.module.widgets.thirdlogin_bind', ['redirect_url'=>route($sub_site.'mobile.person.bind'), 'redirect_name'=>"账号安全"])
  43. <script type="text/javascript">
  44. $('.J_bind_weixin').click(function(){
  45. location.href=wechat_bind_url;
  46. });
  47. $('.J_bind_qq').click(function(){
  48. location.href=qq_bind_url;
  49. });
  50. $(".qq_unbind").click(function () {
  51. var popout = new QSpopout('账号解绑');
  52. popout.setContent('当前账号已绑定<腾讯QQ><br/>确定解绑吗?');
  53. popout.show();
  54. popout.getPrimaryBtn().on('click', function() {
  55. $.ajax({
  56. headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
  57. url: "{{ route($sub_site.'person.unbind') }}",
  58. type: 'POST',
  59. dataType: 'json',
  60. data: {
  61. type:'qq',
  62. },
  63. success: function (result) {
  64. qsToast({type:1,context: result.data});
  65. setTimeout(function () {
  66. window.location.reload();
  67. }, 2000);
  68. },
  69. error: function (errorData) {
  70. if(errorData.status==400) {//业务错误
  71. qsToast({type:2,context: JSON.parse(errorData.response).message});
  72. return false;
  73. }
  74. },
  75. })
  76. });
  77. return false;
  78. })
  79. $(".weixin_unbind").click(function () {
  80. var popout = new QSpopout('账号解绑');
  81. popout.setContent('当前账号已绑定<微信><br/>确定解绑吗?');
  82. popout.show();
  83. popout.getPrimaryBtn().on('click', function() {
  84. $.ajax({
  85. headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
  86. url: "{{ route($sub_site.'person.unbind') }}",
  87. type: 'POST',
  88. dataType: 'json',
  89. data: {
  90. type:'weixin',
  91. },
  92. success: function (result) {
  93. qsToast({type:1,context: result.data});
  94. setTimeout(function () {
  95. window.location.reload();
  96. }, 2000);
  97. },
  98. error: function (errorData) {
  99. if(errorData.status==400) {//业务错误
  100. qsToast({type:2,context: JSON.parse(errorData.response).message});
  101. return false;
  102. }
  103. },
  104. })
  105. });
  106. return false;
  107. })
  108. </script>
  109. @endsection