Commit ac8f281c authored by liwei's avatar liwei

修改了认证bug

parent 7d091b23
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</view> </view>
</view> </view>
<image v-else @click="gotoUserInfo(info)" :src="info.memAvatar" mode="aspectFill"></image> <image v-else @click="gotoUserInfo(info)" :src="info.memAvatar != null ? info.memAvatar : baseUrl + '/user/defaultAvatar.png'" mode="aspectFill"></image>
</view> </view>
<view class="center"> <view class="center">
<template> <template>
......
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
</view> </view>
<!-- 授权弹窗--> <!-- 授权弹窗-->
<u-popup u-popup :show="tipsShow" mode="center" round="12" :safeAreaInsetBottom="false"> <u-popup u-popup :show="authorizeShow" mode="center" round="12" :safeAreaInsetBottom="false">
<view class="popup-container"> <view class="popup-container">
<image class="pop-bgc" :src="baseUrl+'/common/home-pop-bg.png'"></image> <image class="pop-bgc" :src="baseUrl+'/common/home-pop-bg.png'"></image>
<view class="div-popo"> <view class="div-popo">
...@@ -192,7 +192,7 @@ import {articleList, getOssUrl} from "../../api/article"; ...@@ -192,7 +192,7 @@ import {articleList, getOssUrl} from "../../api/article";
avatarImg:"", avatarImg:"",
//图片路径 //图片路径
baseUrl: this.$IMG_URL, baseUrl: this.$IMG_URL,
tipsShow:false,//授权弹窗 authorizeShow:false,//授权弹窗
nologin: '',//登录标志 nologin: '',//登录标志
userInfo:{},//用户信息 userInfo:{},//用户信息
token:'',//token token:'',//token
...@@ -233,10 +233,10 @@ import {articleList, getOssUrl} from "../../api/article"; ...@@ -233,10 +233,10 @@ import {articleList, getOssUrl} from "../../api/article";
//判断授权 //判断授权
if (this.userInfo && this.userInfo.wxNickName !== '' && this.userInfo.wxNickName != null) { if (this.userInfo && this.userInfo.wxNickName !== '' && this.userInfo.wxNickName != null) {
//已授权过 //已授权过
this.tipsShow = false this.authorizeShow = false
} else { } else {
//没授权过,需要授权 //没授权过,需要授权
this.tipsShow = true this.authorizeShow = true
} }
} else { } else {
//token不存在,未登录,跳转到登录页面进行登录 //token不存在,未登录,跳转到登录页面进行登录
...@@ -251,9 +251,11 @@ import {articleList, getOssUrl} from "../../api/article"; ...@@ -251,9 +251,11 @@ import {articleList, getOssUrl} from "../../api/article";
getUserDetail(){ getUserDetail(){
userDetail(this.userInfo.memberId).then(res => { userDetail(this.userInfo.memberId).then(res => {
//处理头像 //处理头像
getOssUrl(res.data.data.avatar).then( res =>{ if (res.data.data.avatar != null){
this.avatarImg = res.data.data getOssUrl(res.data.data.avatar).then( res =>{
}) this.avatarImg = res.data.data
})
}
this.info = res.data.data this.info = res.data.data
//处理认证数量 //处理认证数量
this.info.memAuthCount = 0 this.info.memAuthCount = 0
...@@ -359,7 +361,7 @@ import {articleList, getOssUrl} from "../../api/article"; ...@@ -359,7 +361,7 @@ import {articleList, getOssUrl} from "../../api/article";
}, },
//不同意授权 //不同意授权
handleNoAgree() { handleNoAgree() {
this.tipsShow = false; this.authorizeShow = false;
uni.switchTab({ uni.switchTab({
url: '/pages/tab/index' url: '/pages/tab/index'
}); });
...@@ -367,7 +369,7 @@ import {articleList, getOssUrl} from "../../api/article"; ...@@ -367,7 +369,7 @@ import {articleList, getOssUrl} from "../../api/article";
//同意授权 //同意授权
handAgree() { handAgree() {
this.getUserInfo() this.getUserInfo()
this.tipsShow = false; this.authorizeShow = false;
}, },
gotomation() { gotomation() {
uni.navigateTo({ uni.navigateTo({
......
...@@ -74,7 +74,6 @@ ...@@ -74,7 +74,6 @@
//实名认证报错,返回到该页面,回显报错内容 //实名认证报错,返回到该页面,回显报错内容
this.errorAuthMessage = uni.getStorageSync('errorAuthMessage') this.errorAuthMessage = uni.getStorageSync('errorAuthMessage')
uni.removeStorageSync('errorAuthMessage') uni.removeStorageSync('errorAuthMessage')
}, },
methods: { methods: {
async authadd() { async authadd() {
......
...@@ -21,13 +21,11 @@ export default { ...@@ -21,13 +21,11 @@ export default {
}, },
methods: { methods: {
receiveMessage(event){ receiveMessage(event){
console.log('error',event.detail.data[0]) console.log('event',event.detail.data[0])
if (event.detail.data[0] === 'T'){ if (event.detail.data[0] === 'T'){
//重新调用查询用户详情,存到localStorage中 uni.showToast({
const id = uni.getStorageSync('userInfo').businessId title: '认证成功',
userDetail(id).then(res => { icon: 'success'
uni.removeStorageSync('userInfo')
uni.setStorageSync("userInfo", res.data.data)
}) })
} else { } else {
//认证不通过 //认证不通过
......
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