设置中心个人认证企业认证状态

This commit is contained in:
2021-09-25 10:28:54 +08:00
parent f02c1a75b3
commit 8edc92f475
2 changed files with 78 additions and 29 deletions

View File

@@ -33,20 +33,28 @@
<u-icon name="arrow-right" color="#f1f1f1" size="28" />
</button>
<!-- 个人认证 -->
<view @click="certification(is_certification)" class="list-item">
<view @click="certificationClick(certification)" class="list-item">
<view class="list-item-left">
<image src="/static/imgs/self-icon.png" mode="widthFix" />
<span>个人认证</span>
</view>
<u-icon name="arrow-right" color="#f1f1f1" size="28" />
<view class="input">
<input type="text" :value="certification.is_true?'已认证':''"
:placeholder="certification.is_true?'':'未认证'" disabled="true" maxlength="12" />
<u-icon name="arrow-right" color="#f1f1f1" size="28" />
</view>
</view>
<!-- 企业认证 -->
<view @click="company(is_company)" class="list-item">
<view @click="company(companyCode.code)" class="list-item">
<view class="list-item-left">
<image src="/static/imgs/company-icon.png" mode="widthFix" />
<span>企业认证</span>
</view>
<u-icon name="arrow-right" color="#f1f1f1" size="28" />
<view class="input">
<input type="text" :value="companyCode.code=== 1?'已认证':''"
:placeholder="companyCode.code !== 1?companyCode.message:''" disabled="true" maxlength="12" />
<u-icon name="arrow-right" color="#f1f1f1" size="28" />
</view>
</view>
<!-- 关于我们 -->
<view @click="$router.push({name:'aboutUs'})" class="list-item">
@@ -80,7 +88,8 @@
import {
wechatbind,
resetUserInfo,
getUserSettingInfo
getUserSettingInfo,
companyStatus
} from '@/apis/interfaces/setting'
import {
uploads
@@ -96,8 +105,8 @@
showPath: ''
},
is_bind: true, // 微信绑定
is_certification: true, // 个人认证
is_company: true, // 企业认证
certification: {}, // 个人认证
companyCode: {}, // 企业认证 -1.未认证0.审核中1.审核通过2.驳回
}
},
onShow() {
@@ -107,38 +116,59 @@
}
})
this.getUserInfo()
},
onPullDownRefresh() {
this.getUserInfo()
},
methods: {
// 是否个人认证
certification(is_certfication) {
console.log(is_certfication)
if (is_certfication) {
certificationClick(certfication) {
console.log(certfication)
if (certfication.is_true) {
// 跳转到个人认证信息完成展示页面
this.$router.push({
name: ''
// this.$refs.uToast.show({
// title: '认证通过!',
// type: 'primary',
// duration: 3000
// })
uni.showModal({
title: '认证信息',
content: '真实姓名:<' + certfication.message.name + '>,身份证号:' + certfication.message.idcard,
showCancel:false
})
} else {
// 跳转到个人认证信息页面
this.$router.push({
name: ''
uni.navigateTo({
url: '/pages/certification/personal'
})
}
},
// 是否展示企业信息
company(is_company) {
console.log(is_company)
if (is_company) {
// 跳转到企业认证完成信息展示页面
this.$router.push({
name: ''
})
} else {
// 是否展示企业信息 企业认证 -1.未认证0.审核中1.审核通过2.驳回
company(code) {
console.log(code, '是否企业认证')
if (code === -1) {
// 跳转到企业认证页面
this.$router.push({
name: ''
uni.navigateTo({
url: '/pages/company/approve'
})
} else if (code === 2) {
// 跳转到企业认证页面
uni.navigateTo({
url: '/pages/company/approve?form_type=put'
})
} else if (code === 0) {
this.$refs.uToast.show({
title: '审核中',
type: 'primary',
duration: 3000
})
} else if (code === 1) {
// 跳转到企业认证页面
this.$refs.uToast.show({
title: '认证通过!',
type: 'primary',
duration: 3000
})
}
},
@@ -148,8 +178,7 @@
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
this.certification = res.certification
uni.stopPullDownRefresh()
}).catch(err => {
this.$refs.uToast.show({
@@ -158,6 +187,17 @@
duration: 3000
})
})
// -1.未认证0.审核中1.审核通过2.驳回
companyStatus().then(res => {
console.log(res)
this.companyCode = res
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
})
},
// 点击绑定用户得授权信息,且绑定带修改
getUser() {
@@ -385,8 +425,9 @@
flex: 1;
input {
padding-right: 30rpx;
padding-right: 20rpx;
width: 100%;
font-size: 30rpx;
}
}