123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- <template>
- <view class="index">
- <view class="header">
- <img :src="suimg" alt="" class="img">
- <span class="sapn">扫码成功</span>
- <span class="sapnteo">请确认授权登录</span>
- </view>
- <view class="naver" @click="smit">
- 授权登录
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- type:0,//判断是否是登录页面跳转的
- telephone:'',
- suimg:require("@/static/image/submit.png")
- };
- },
- onLoad(e){
- console.log(e)
- this.type = e.code
- // this.telephone = 15855353281
- this.telephone = uni.getStorageSync('phone')
- },
- onUnload(){
- uni.switchTab({
- url: '/pages/tab/about_we',
- })
- },
-
- methods:{
- smit(){
- var _this = this
- let object = {
- uuid: _this.type,
- phone: _this.telephone,
- // cardType:'ID_CARD',
- };
- console.log(object)
- this.$http.post("auth/phoneScanLogin",{
- // familyId: this.familyId,
- ...object
- }).then(res => {
- console.log(res)
- if(res.code=="200"){
- uni.showToast({
- title: '登录成功',
- duration: 1000,
- icon: 'none'
- });
- setTimeout(() => {
- uni.navigateBack({
- delta:2
- })
- },1000)
- }else {
- uni.showToast({
- title: res.msg,
- duration: 1000,
- icon: 'none'
- });
- }
- })
- }
- }
- }
- </script>
- <style lang="scss">
- .index{
- height: 100vh;
- // background-color: #dbebf8;
- .header{
- display: flex;
- flex-direction: column;
- align-items: center;
- // padding-top: 132upx;
- box-sizing: border-box;
- .img{
- width: 100%;
- height: 396rpx;
- margin-bottom: 54upx;
- // width: 400upx;
- }
- span{
- font-size: 35upx;
- color: #666;
- width: 414upx;
- text-align: center;
- line-height: 50upx;
-
- }
- .sapn{
- font-size: 42upx;
- color: #333;
- // width: 414upx;
- font-weight: 700;
- text-align: center;
- line-height: 50upx;
- margin-bottom: 15upx;
-
- }
- .sapnteo{
- font-size: 28upx;
- color: #666;
- // width: 414upx;
- // font-weight: 700;
- text-align: center;
- line-height: 50upx;
- }
- }
-
- }
- .naver{
- width: 85%;
- height: 90upx;
- font-size: 31upx;
- font-family: PingFang SC;
- font-weight: 400;
- color: #FFFFFF;
- line-height: 90upx;
- background-color: #1678FF;
- margin-left: 50%;
- transform: translateX(-50%);
- border-radius: 14upx;
- text-align: center;
- margin-top: 150upx;
- }
- </style>
|