Commit e795e619 authored by liwei's avatar liwei

修改了实名认证相关页面,增加了提示信息

parent 0944f24a
......@@ -39,6 +39,7 @@
</u-form-item>
</u--form>
</view>
<view style="text-align: center;color: red">{{ errorAuthMessage }}</view>
<view class="to-btn" @click="authadd">
提交
</view>
......@@ -59,7 +60,8 @@
newImageSrc: "",
type: 0,
tipMsg: '',
isConfirm: false
isConfirm: false,
errorAuthMessage:''
}
},
components: {
......@@ -68,6 +70,12 @@
onLoad() {
},
onShow(){
//实名认证报错,返回到该页面,回显报错内容
this.errorAuthMessage = uni.getStorageSync('errorAuthMessage')
uni.removeStorageSync('errorAuthMessage')
},
methods: {
async authadd() {
const userInfo = uni.getStorageSync('userInfo')
......@@ -83,7 +91,7 @@
})
} else {
uni.showToast({
title: res.message,
title: res.data.message,
icon: 'none'
})
}
......
<template>
<view>
<web-view :src="'http://106.3.97.198:20162/realAuth.html?token='+token"></web-view>
<!-- <web-view :src="'http://106.3.97.198:20163/realAuth.html?token='+token"></web-view>-->
<web-view :src="'http://192.168.1.7:8080/realAuth.html?token='+token" @message="receiveMessage"></web-view>
</view>
</template>
<script>
import {userDetail} from "../api/user";
export default {
name: "index",
data() {
......@@ -16,6 +19,20 @@ export default {
},
methods: {
receiveMessage(event){
console.log('error',event.detail.data[0])
if (event.detail.data[0] === 'T'){
//重新调用查询用户详情,存到localStorage中
const id = uni.getStorageSync('userInfo').businessId
userDetail(id).then(res => {
uni.removeStorageSync('userInfo')
uni.setStorageSync("userInfo", res.data.data)
})
} else {
//认证不通过
uni.setStorageSync("errorAuthMessage", event.detail.data[0])
}
},
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment