mzt.blade.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. @extends('mobile.module.layouts.content')
  2. @push('meta')
  3. @endpush
  4. @push('css')
  5. <style>
  6. .output{
  7. display: flex;
  8. justify-content: center;
  9. align-items: center;
  10. height: 100vh;
  11. font-size: 24px;
  12. }
  13. </style>
  14. @endpush
  15. @push('js')
  16. <script>
  17. var u = navigator.userAgent;
  18. if (u.indexOf('mPaaSClient') > -1) {
  19. document.write('<script src="https://mztapp.fujian.gov.cn:8190/mztAppWeb/app/js/mPaasHybrid.js"></scr' + 'ipt>')
  20. } else if (u.indexOf('mzt') > -1) {
  21. if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) {
  22. document.write('<script src="/themes/default/assets/mobile/js/AndroidCordova.js"></scr' + 'ipt>')
  23. document.write('<script src="/themes/default/assets/mobile/js/AndroidCordovaInit.js"></scr' + 'ipt>')
  24. } else if (u.indexOf('iPhone') > -1 || u.indexOf('iPad') > -1) {
  25. document.write('<script src="/themes/default/assets/mobile/js/iOSBridge.js"></scr' + 'ipt>')
  26. document.write('<script src="/themes/default/assets/mobile/js/iOSBridgeInit.js"></scr' + 'ipt>')
  27. }
  28. }
  29. </script>
  30. <script src="https://mztapp.fujian.gov.cn:8190/mztAppWeb/app/js/jsencrypt.js"></script>
  31. <script src="{{ theme_asset('mobile/js/vconsole.min.js') }}"></script>
  32. <script>
  33. // VConsole 默认会挂载到 `window.VConsole` 上
  34. var vConsole = new window.VConsole();
  35. </script>
  36. @endpush
  37. @section('content')
  38. <div class="output">
  39. 登录中
  40. </div>
  41. @endsection
  42. @section('script')
  43. <script>
  44. app.page.onLoad = function () {
  45. var param = {};
  46. param.isReturnPage = false;
  47. try {
  48. app.link.goLogin(function(result) {
  49. console.log('11111')
  50. $.post("{{route($sub_site.'mobile.login_mzt')}}",result,function(res){
  51. if(res.data.status){
  52. window.location.href = res.data.url;
  53. }else{
  54. console.log(res.data.msg)
  55. }
  56. });
  57. }, function(result) {
  58. $(".output").html("登录失败" + result)
  59. },param);
  60. } catch (error) {
  61. console.log("捕获到错误:", error);
  62. }
  63. {{--app.link.getLoginInfo(function(result) {--}}
  64. {{-- var userinfo = result;--}}
  65. {{-- var encrypt = new JSEncrypt();--}}
  66. {{-- encrypt.setPrivateKey(keyUtil.getPrivateKey());--}}
  67. {{-- let data = {--}}
  68. {{-- userId: encrypt.decrypt(userinfo.userId),--}}
  69. {{-- userToken: encrypt.decrypt(userinfo.USER_TOKEN),--}}
  70. {{-- userIdCard: encrypt.decrypt(userinfo.cardNum),--}}
  71. {{-- userName: encrypt.decrypt(userinfo.name),--}}
  72. {{-- userMobile: encrypt.decrypt(userinfo.mobile),--}}
  73. {{-- userEmail: encrypt.decrypt(userinfo.email)--}}
  74. {{-- };--}}
  75. {{-- $.post("{{route($sub_site.'mobile.login_mzt')}}",data,function(res){--}}
  76. {{-- if(res.data.status){--}}
  77. {{-- window.location.href = res.data.url;--}}
  78. {{-- }else{--}}
  79. {{-- console.log(res.data.msg)--}}
  80. {{-- }--}}
  81. {{-- });--}}
  82. {{--}, function(result) {--}}
  83. {{-- alert(result);--}}
  84. {{--})--}}
  85. };
  86. </script>
  87. @endsection