Commit ac8f281c authored by liwei's avatar liwei

修改了认证bug

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