Commit e795e619 authored by liwei's avatar liwei

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

parent 0944f24a
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
</u-form-item> </u-form-item>
</u--form> </u--form>
</view> </view>
<view style="text-align: center;color: red">{{ errorAuthMessage }}</view>
<view class="to-btn" @click="authadd"> <view class="to-btn" @click="authadd">
提交 提交
</view> </view>
...@@ -59,7 +60,8 @@ ...@@ -59,7 +60,8 @@
newImageSrc: "", newImageSrc: "",
type: 0, type: 0,
tipMsg: '', tipMsg: '',
isConfirm: false isConfirm: false,
errorAuthMessage:''
} }
}, },
components: { components: {
...@@ -67,6 +69,12 @@ ...@@ -67,6 +69,12 @@
}, },
onLoad() { onLoad() {
},
onShow(){
//实名认证报错,返回到该页面,回显报错内容
this.errorAuthMessage = uni.getStorageSync('errorAuthMessage')
uni.removeStorageSync('errorAuthMessage')
}, },
methods: { methods: {
async authadd() { async authadd() {
...@@ -83,7 +91,7 @@ ...@@ -83,7 +91,7 @@
}) })
} else { } else {
uni.showToast({ uni.showToast({
title: res.message, title: res.data.message,
icon: 'none' icon: 'none'
}) })
} }
......
<template> <template>
<view> <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> </view>
</template> </template>
<script> <script>
import {userDetail} from "../api/user";
export default { export default {
name: "index", name: "index",
data() { data() {
...@@ -16,6 +19,20 @@ export default { ...@@ -16,6 +19,20 @@ export default {
}, },
methods: { 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