实名认证开发,入驻修改

This commit is contained in:
donqi 2022-07-07 15:38:30 +08:00
parent 387b826dc2
commit 02a8f31e16
3 changed files with 164 additions and 61 deletions

View File

@ -508,5 +508,21 @@ export default {
data: params
})
return res[1].data;
},
async addWorkerCertify(params = {}) {
let res = await uni.request({
url: '/worker/certification/app/add',
method: 'POST',
data: params
})
return res[1].data;
},
async getWorkerCertify(params = {}) {
let res = await uni.request({
url: '/worker/certification/app/getByWorkerId',
method: 'POST',
data: params
})
return res[1].data;
}
}

View File

@ -29,11 +29,10 @@
:class="myInfo.warranty72h ? 'text-main-color' : 'text-gray'"></view>
<view :class="myInfo.warranty72h ? '' : 'text-gray'">72小时质保</view>
</view>
<view class="cu-item solid-left">
<view class="cu-item solid-left" @click="goToPage('/pages/my/certification')">
<view class="cuIcon-profile margin-bottom-xs middle-icon"
:class="curUserInfo.status === 0 ? 'text-main-color' : 'text-gray'"
@click="goToPage('/pages/my/certification')"></view>
<view :class="curUserInfo.status === 0 ? '' : 'text-gray'">实名认证</view>
:class="curCertifyInfo && curCertifyInfo.status === 1 ? 'text-main-color' : 'text-gray'"></view>
<view :class="curCertifyInfo && curCertifyInfo.status === 1 ? '' : 'text-gray'">实名认证</view>
</view>
<view class="cu-item solid-left">
<view class="cuIcon-moneybag margin-bottom-xs middle-icon"
@ -62,7 +61,8 @@
data() {
return {
pageContentTop: this.CustomBar,
curUserInfo: {},
curUserInfo: {},
curCertifyInfo: null,
myInfo: {},
menuList: [{
name: '提现',
@ -110,7 +110,9 @@
},
methods: {
async loadData() {
this.curUserInfo = this.$request.getCurUserInfo();
this.curUserInfo = this.$request.getCurUserInfo();
let res = await this.$request.getWorkerCertify();
this.curCertifyInfo = res.data;
this.myInfo = await this.$api.data('myInfo');
},
clickMenuItem(menu) {

View File

@ -5,16 +5,16 @@
<block slot="backText">返回</block>
<block slot="content">实名认证</block>
</cu-custom>
<!-- 步骤条 -->
<view class="bg-white padding">
<view class="cu-steps">
<view class="cu-item" :class="index>curStep?'':'text-main-color'" v-for="(stepName, index) in stepList">
<text class='cuIcon-radioboxfill'></text> {{stepName}}
<!-- 未认证的展示认证填写页面 -->
<view v-if="!curCertifyInfo || !curCertifyInfo.workerCertificationId">
<!-- 步骤条 -->
<view class="bg-white padding">
<view class="cu-steps">
<view class="cu-item" :class="index>curStep?'':'text-main-color'" v-for="(stepName, index) in stepList">
<text class='cuIcon-radioboxfill'></text> {{stepName}}
</view>
</view>
</view>
</view>
<!-- 未认证的展示认证填写页面 -->
<view v-if="curUserInfo && curUserInfo.status === 1">
<form v-if="curStep === 0">
<view class="margin-bottom-with-bar">
<view class="bg-white margin-top-sm">
@ -78,7 +78,7 @@
</radio-group>
<view class="cu-form-group">
<view class="title">品牌名称</view>
<input name="bandName" v-model="realNameInfo.bandName" maxlength="7" placeholder="请填写你的品牌/主体名简称(限7字)"></input>
<input name="brandName" v-model="realNameInfo.brandName" maxlength="7" placeholder="请填写你的品牌/主体名简称(限7字)"></input>
</view>
<view class="cu-bar bg-white solid-top">
<view class="action">
@ -121,17 +121,17 @@
</view>
<view class="cu-form-group">
<view class="title">法人/负责人</view>
<input name="legalPersonName" v-model="realNameInfo.legalPersonName" placeholder="请输入法人名称"></input>
<input name="legalPersionName" v-model="realNameInfo.legalPersionName" placeholder="请输入法人名称"></input>
</view>
<view class="cu-form-group">
<view class="title">联系电话</view>
<input name="legalPersonPhoneNum" v-model="realNameInfo.legalPersonPhoneNum" placeholder="请输入联系人电话"></input>
<input name="legalPersionPhoneNum" v-model="realNameInfo.legalPersionPhoneNum" placeholder="请输入联系人电话"></input>
</view>
<view class="cu-form-group">
<view class="title">其他服务</view>
<checkbox-group class="radio-view" @change="changeAdditionalServId">
<label class="margin-right-sm" v-for="(item, index) in additionalServ">
<checkbox style="transform:scale(0.7)" class="round main-color" :value="item.id"/>
<checkbox style="transform:scale(0.7)" class="round main-color" :value="item.id" :checked="checkIfInArray(item.id, realNameInfo.otherServ)"/>
<text class="margin-left-xs">{{item.name}}</text>
</label>
</checkbox-group>
@ -233,8 +233,81 @@
</view>
<!-- 认证过的展示认证内容及结果 -->
<view v-else>
<view class="margin-lr-sm margin-top shadow-warp">
<view class="padding bg-white" v-if="servSpecialSkills && servSpecialSkills.length">
<view class="margin-lr-sm margin-top padding margin-bottom-lg bg-white">
<view class="padding-bottom-sm">
<text class="text-black text-bold">姓名</text>
<text>{{curCertifyInfo.name}}</text>
</view>
<view class="padding-bottom-sm">
<text class="text-black text-bold">身份证号</text>
<text>{{curCertifyInfo.idCardNum}}</text>
</view>
<view class="text-black text-bold">身份证</view>
<view class="grid col-2 grid-square flex-sub padding-bottom-sm padding-top-xs">
<view class="bg-img">
<image :src="curCertifyInfo.idCardUrl1" :data-url="curCertifyInfo.idCardUrl1" @click="viewImage($event, [curCertifyInfo.idCardUrl1])" mode="aspectFill"></image>
</view>
<view class="bg-img" @click="viewImage($event, [item.credential])">
<image :src="curCertifyInfo.idCardUrl2" :data-url="curCertifyInfo.idCardUrl2" @click="viewImage($event, [curCertifyInfo.idCardUrl2])" mode="aspectFill"></image>
</view>
</view>
<view class="text-black text-bold">公司规模</view>
<radio-group class="flex justify-around padding-top-xs padding-bottom-sm">
<view class="padding-sm option-card" :class="curCertifyInfo.companySize === 0 ? 'border-main-color' : ''">
<view class="text-black text-lg margin-tb-xs">社区服务</view>
<view class="text-gray option-content margin-tb-xs">个体或公司经营执照认证服务团队1-3</view>
<radio style="transform:scale(1)" class="main-color flex justify-end" :checked="curCertifyInfo.companySize === 0"></radio>
</view>
<view class="padding-sm option-card" :class="curCertifyInfo.companySize === 1 ? 'border-main-color' : ''">
<view class="text-black text-lg margin-tb-xs">区域服务</view>
<view class="text-gray option-content margin-tb-xs">个体或公司经营执照认证服务团队3-10</view>
<radio style="transform:scale(1)" class="main-color flex justify-end" :checked="curCertifyInfo.companySize === 1"></radio>
</view>
<view class="padding-sm option-card" :class="curCertifyInfo.companySize === 2 ? 'border-main-color' : ''">
<view class="text-black text-lg margin-tb-xs">城市服务</view>
<view class="text-gray option-content margin-tb-xs">个体或公司经营执照认证服务团队10-50</view>
<radio style="transform:scale(1)" class="main-color flex justify-end" :checked="curCertifyInfo.companySize === 2"></radio>
</view>
</radio-group>
<view class="padding-bottom-sm">
<text class="text-black text-bold">品牌名称</text>
<text v-if="curCertifyInfo.brandName">{{curCertifyInfo.brandName}}</text>
</view>
<view class="padding-bottom-sm">
<text class="text-black text-bold">公司名称</text>
<text v-if="curCertifyInfo.companyName">{{curCertifyInfo.companyName}}</text>
</view>
<view class="text-black text-bold">公司营业执照</view>
<view class="grid col-2 grid-square flex-sub padding-bottom-sm padding-top-xs" v-if="curCertifyInfo.businessLicenseUrl">
<view class="bg-img">
<image :src="curCertifyInfo.businessLicenseUrl" :data-url="curCertifyInfo.businessLicenseUrl" @click="viewImage($event, [curCertifyInfo.businessLicenseUrl])" mode="aspectFill"></image>
</view>
</view>
<view class="padding-bottom-sm">
<text class="text-black text-bold">公司营业执照号码</text>
<text v-if="curCertifyInfo.businessLicenseNum">{{curCertifyInfo.businessLicenseNum}}</text>
</view>
<view class="padding-bottom-sm">
<text class="text-black text-bold">公司地址</text>
<view v-if="curCertifyInfo.mergerName">{{curCertifyInfo.mergerName}}</view>
<view v-if="curCertifyInfo.companyAddress">{{curCertifyInfo.companyAddress}}</view>
</view>
<view class="padding-bottom-sm">
<text class="text-black text-bold">法人</text>
<text v-if="curCertifyInfo.legalPersionName">{{curCertifyInfo.legalPersionName}}</text>
</view>
<view class="padding-bottom-sm">
<text class="text-black text-bold">法人联系电话</text>
<text v-if="curCertifyInfo.legalPersionPhoneNum">{{curCertifyInfo.legalPersionPhoneNum}}</text>
</view>
<view class="text-black text-bold">其他服务</view>
<checkbox-group class="padding-bottom-sm padding-top-xs">
<label class="margin-right-sm" v-for="(item, index) in additionalServ">
<checkbox style="transform:scale(0.7)" class="round main-color" :checked="checkIfInArray(item.id, curCertifyInfo.otherServArr)" :value="item.id"/>
<text class="margin-left-xs">{{item.name}}</text>
</label>
</checkbox-group>
<view v-if="servSpecialSkills && servSpecialSkills.length > 0">
<view class="text-black text-bold">特殊技能</view>
<view class="solid margin-top-sm padding-sm" v-for="(item,index) in servSpecialSkills">
<view class="margin-bottom-xs">类目{{item.specialSkillName}}</view>
@ -254,13 +327,13 @@
<view>保险生效时期{{item.insuranceStart}} ~ {{item.insuranceEnd}}</view>
</view>
</view>
<view class="padding">
<view class="margin-top-sm">
<text class="text-black text-bold">审核状态</text>
<text v-if="curUserInfo.status === 0" class="text-green">审核通过</text>
<text v-else-if="curUserInfo.status === 3" class="text-yellow">审核中</text>
<text v-else-if="curUserInfo.status === 4" class="text-red">审核未通过</text>
<button class="cu-btn bg-main-color margin-left-sm shadow-blur" v-if="curUserInfo.status === 4"
@click="navigate2ApplySettled">重新填写入驻信息</button>
<text v-if="curCertifyInfo.status === 1" class="text-green">审核通过</text>
<text v-else-if="curCertifyInfo.status === 0" class="text-yellow">审核中</text>
<text v-else-if="curCertifyInfo.status === 2" class="text-red">审核未通过</text>
<button class="cu-btn bg-main-color margin-left-sm shadow-blur" v-if="curCertifyInfo.status === 2 || curCertifyInfo.status === 1"
@click="showForm">重新填写实名信息</button>
</view>
</view>
</view>
@ -277,16 +350,18 @@
data() {
return {
curUserInfo: null,
curCertifyInfo: null,
servSpecialSkills: null,
curStep: 0,
stepList: ['经营主体', '特殊技能'],
additionalServ: [{
id: 1,
id: '0',
name: '货拉拉/速运'
}, {
id: 2,
id: '1',
name: '提供搬货'
}, {
id: 3,
id: '2',
name: '本地跑腿'
}],
areaList: [],
@ -294,7 +369,8 @@
realNameInfo: {
companySize: null,
idCardImgList: [],
licenseImgList: []
licenseImgList: [],
otherServ: []
},
specialTypeList: [],
specialSkill: [{
@ -319,23 +395,25 @@
},
methods: {
async loadData() {
this.curUserInfo = this.$request.getCurUserInfo();
if (this.curUserInfo.status === 1) {
this.loadAreaList();
this.loadSpecialSkillType();
} else {
this.loadSpecialSkills();
}
},
async reloadData() {
this.curUserInfo = this.$request.getCurUserInfo();
if (this.curUserInfo.status === 1) {
this.loadAreaList();
this.loadSpecialSkillType();
} else {
this.loadSpecialSkills();
this.curUserInfo = this.$request.getCurUserInfo();
let res = await this.$request.getWorkerCertify();
this.curCertifyInfo = res.data;
if (this.curCertifyInfo && this.curCertifyInfo.workerCertificationId) {
//
this.servSpecialSkills = this.curCertifyInfo.specialSkills;
this.curCertifyInfo.otherServArr = this.curCertifyInfo.otherServ.split(",");
} else {
this.loadAreaList();
this.loadSpecialSkillType();
}
},
showForm() {
if (this.curCertifyInfo) {
this.curCertifyInfo = null;
}
this.loadAreaList();
this.loadSpecialSkillType();
},
preStep() {
this.curStep = this.curStep === 0 ? 0 : --this.curStep;
},
@ -353,6 +431,7 @@
},
changeAdditionalServId(e) {
this.realNameInfo.otherServ = e.detail.value;
console.log(this.realNameInfo.otherServ)
},
async loadAreaList(idArr) {
let areaList = await this.$request.areaListByStep();
@ -400,14 +479,20 @@
this.multiIndex = [this.multiIndex[0], colObj.value, 0];
}
},
checkIfInArray(item, targetArr) {
if (targetArr.indexOf(item) !== -1) {
return true;
}
return false;
},
/* 经营主体 end */
/* 特殊技能 start */
async loadSpecialSkills() {
let res = await this.$request.getWorkerSpecialSkill({
workerId: this.curUserInfo.workerId
});
this.servSpecialSkills = res.data;
},
// async loadSpecialSkills() {
// let res = await this.$request.getWorkerSpecialSkill({
// workerId: this.curUserInfo.workerId
// });
// this.servSpecialSkills = res.data;
// },
async loadSpecialSkillType() {
let res = await this.$request.listByStep();
this.specialTypeList = res.data;
@ -499,7 +584,7 @@
})
},
/* 特殊技能 end */
submit() {
async submit() {
if (!this.realNameInfo.name || !this.realNameInfo.idCardNum || !this.realNameInfo.idCardImgList || !this.realNameInfo.idCardImgList.length) {
uni.showToast({
title: '请完成必填项的填写',
@ -526,6 +611,7 @@
//
let params = {
...this.realNameInfo,
otherServ: this.realNameInfo.otherServ && this.realNameInfo.otherServ.length ? this.realNameInfo.otherServ.join(",") : null,
idCardUrl1: this.realNameInfo.idCardImgList && this.realNameInfo.idCardImgList.length > 0 ? this.realNameInfo.idCardImgList[0]: null,
idCardUrl2: this.realNameInfo.idCardImgList && this.realNameInfo.idCardImgList.length > 1 ? this.realNameInfo.idCardImgList[1]: null,
businessLicenseUrl: this.realNameInfo.licenseImgList && this.realNameInfo.licenseImgList.length > 0 ? this.realNameInfo.licenseImgList[0] : null,
@ -536,15 +622,14 @@
specialSkills: specialSkills
}
console.log(params)
// let res = await this.$request.workerSettled(params);
// if (res.code === 0) {
// this.reloadData();
// uni.showToast({
// icon: 'success',
// title: ''
// })
// }
let res = await this.$request.addWorkerCertify(params);
if (res.code === 0) {
uni.showToast({
icon: 'success',
title: '提交成功'
})
await this.loadData();
}
}
},
}