wufa.vue 2.4 KB

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