diff --git a/apis/interfaces/setting.js b/apis/interfaces/setting.js
index 956163f..6f59950 100644
--- a/apis/interfaces/setting.js
+++ b/apis/interfaces/setting.js
@@ -71,6 +71,13 @@ const aboutUs = () => {
url: 'articles/about'
})
}
+// 获取企业认证状态 -1.未认证,0.审核中,1.审核通过,2.驳回
+const companyStatus = () => {
+ return request({
+ url: 'companies/applies/query'
+ })
+}
+
export {
login,
@@ -80,5 +87,6 @@ export {
agreementLogin,
resetUserInfo,
getUserSettingInfo,
- aboutUs
+ aboutUs,
+ companyStatus
}
diff --git a/pages/setting/setting.vue b/pages/setting/setting.vue
index 82949ad..3bfdf4d 100644
--- a/pages/setting/setting.vue
+++ b/pages/setting/setting.vue
@@ -33,20 +33,28 @@
-
+
个人认证
-
+
+
+
+
-
+
企业认证
-
+
+
+
+
@@ -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;
}
}