'登录页面优化展示,个人中心企业和个人中跳转处理等路径'

This commit is contained in:
2021-09-24 16:13:50 +08:00
parent a18b9d8a63
commit 8ab145ea73
6 changed files with 155 additions and 56 deletions

View File

@@ -9,7 +9,7 @@
<span>修改头像</span>
</view>
<view class="avatar">
<image :src="avatar.showPath" mode="aspectFill" />
<image :src="avatar.showPath?avatar.showPath:'/static/imgs/no-avatar.png'" mode="aspectFill" />
<u-icon name="arrow-right" color="#f1f1f1" size="28" />
</view>
</view>
@@ -33,7 +33,7 @@
<u-icon name="arrow-right" color="#f1f1f1" size="28" />
</button>
<!-- 个人认证 -->
<view @click="loginOut" class="list-item">
<view @click="certification(is_certification)" class="list-item">
<view class="list-item-left">
<image src="/static/imgs/self-icon.png" mode="widthFix" />
<span>个人认证</span>
@@ -41,7 +41,7 @@
<u-icon name="arrow-right" color="#f1f1f1" size="28" />
</view>
<!-- 企业认证 -->
<view @click="loginOut" class="list-item">
<view @click="company(is_company)" class="list-item">
<view class="list-item-left">
<image src="/static/imgs/company-icon.png" mode="widthFix" />
<span>企业认证</span>
@@ -95,7 +95,9 @@
path: '',
showPath: ''
},
is_bind: true
is_bind: true, // 微信绑定
is_certification: true, // 个人认证
is_company: true, // 企业认证
}
},
onShow() {
@@ -110,12 +112,44 @@
this.getUserInfo()
},
methods: {
// 是否个人认证
certification(is_certfication) {
console.log(is_certfication)
if (is_certfication) {
// 跳转到个人认证信息完成展示页面
this.$router.push({
name: ''
})
} else {
// 跳转到个人认证信息页面
this.$router.push({
name: ''
})
}
},
// 是否展示企业信息
company(is_company) {
console.log(is_company)
if (is_company) {
// 跳转到企业认证完成信息展示页面
this.$router.push({
name: ''
})
} else {
// 跳转到企业认证页面
this.$router.push({
name: ''
})
}
},
// 获取当前用户得基本信息
getUserInfo() {
getUserSettingInfo().then(res => {
this.avatar.showPath = res.avatar
this.nickname = res.nickname
this.is_bind = res.is_bind
this.is_certification = res.is_certification
this.is_company = res.is_company
uni.stopPullDownRefresh()
}).catch(err => {
this.$refs.uToast.show({