wufa.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view class="index">
  3. <view class="header">
  4. <img src="https://qsfy.qs163.cn/statics/shujuju_applet_static_path/2.png" alt="" class="img">
  5. <span class="sapn">扫码成功</span>
  6. <span class="sapnteo">请确认授权登录</span>
  7. </view>
  8. <view class="naver" @click="smit">
  9. 授权登录
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. data() {
  16. return {
  17. type:0,//判断是否是登录页面跳转的
  18. telephone:''
  19. };
  20. },
  21. onLoad(e){
  22. console.log(e)
  23. this.type = e.code
  24. // this.telephone = 15855353281
  25. this.telephone = uni.getStorageSync('phone')
  26. },
  27. onUnload(){
  28. uni.switchTab({
  29. url: '/pages/tab/about_we',
  30. })
  31. },
  32. methods:{
  33. smit(){
  34. var _this = this
  35. let object = {
  36. uuid: _this.type,
  37. phone: _this.telephone,
  38. // cardType:'ID_CARD',
  39. };
  40. console.log(object)
  41. this.$http.post("auth/phoneScanLogin",{
  42. // familyId: this.familyId,
  43. ...object
  44. }).then(res => {
  45. console.log(res)
  46. if(res.code=="200"){
  47. uni.showToast({
  48. title: '登录成功',
  49. duration: 1000,
  50. icon: 'none'
  51. });
  52. setTimeout(() => {
  53. uni.navigateBack({
  54. delta:2
  55. })
  56. },1000)
  57. }else {
  58. uni.showToast({
  59. title: res.msg,
  60. duration: 1000,
  61. icon: 'none'
  62. });
  63. }
  64. })
  65. }
  66. }
  67. }
  68. </script>
  69. <style lang="scss">
  70. .index{
  71. height: 100vh;
  72. // background-color: #dbebf8;
  73. .header{
  74. display: flex;
  75. flex-direction: column;
  76. align-items: center;
  77. padding-top: 132upx;
  78. box-sizing: border-box;
  79. .img{
  80. width: 142upx;
  81. height: 142upx;
  82. margin-bottom: 54upx;
  83. // width: 400upx;
  84. }
  85. span{
  86. font-size: 35upx;
  87. color: #666;
  88. width: 414upx;
  89. text-align: center;
  90. line-height: 50upx;
  91. }
  92. .sapn{
  93. font-size: 42upx;
  94. color: #333;
  95. // width: 414upx;
  96. font-weight: 700;
  97. text-align: center;
  98. line-height: 50upx;
  99. margin-bottom: 15upx;
  100. }
  101. .sapnteo{
  102. font-size: 28upx;
  103. color: #666;
  104. // width: 414upx;
  105. // font-weight: 700;
  106. text-align: center;
  107. line-height: 50upx;
  108. }
  109. }
  110. }
  111. .naver{
  112. width: 85%;
  113. height: 90upx;
  114. font-size: 31upx;
  115. font-family: PingFang SC;
  116. font-weight: 400;
  117. color: #FFFFFF;
  118. line-height: 90upx;
  119. background-color: #1678FF;
  120. margin-left: 50%;
  121. transform: translateX(-50%);
  122. border-radius: 14upx;
  123. text-align: center;
  124. margin-top: 150upx;
  125. }
  126. </style>