You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
319 lines
8.0 KiB
319 lines
8.0 KiB
<template>
|
|
<view>
|
|
<view class="" v-if="auth_status=='0'||zaitijiao">
|
|
<view class="box" >
|
|
<uni-forms ref="form" :modelValue="formData" :rules="rules" label-width="200rpx">
|
|
<uni-forms-item label="姓名" name="name">
|
|
<input class="input" v-model="formData.name" type="text" placeholder="请输入" />
|
|
</uni-forms-item>
|
|
<view class="border"></view>
|
|
<uni-forms-item label="身份证" name="name">
|
|
<input class="input" v-model="formData.card" type="text" placeholder="请输入" />
|
|
</uni-forms-item>
|
|
<view class="border"></view>
|
|
<uni-forms-item label="车型" name="name">
|
|
<picker @change="bindPickerChange" mode='selector' :value="index" :range="carlist" range-key="name">
|
|
<view class="input">{{carlist[carindex].name?carlist[carindex].name:'请选择'}}</view>
|
|
</picker>
|
|
<!-- <input class="input" v-model="formData.card" type="text" placeholder="请输入" /> -->
|
|
</uni-forms-item>
|
|
</uni-forms>
|
|
</view>
|
|
<view class="sfz">
|
|
<view class="sfzwz">身份证照片</view>
|
|
<view class="sfztp">
|
|
<image @click="uploadFile('sfzzm','card_zm_img')" class="sfzimg" :src="formDataxs.sfzzm" mode=""></image>
|
|
<image @click="uploadFile('sfzfm','card_fm_img')" class="sfzimg" :src="formDataxs.sfzfm" mode=""></image>
|
|
</view>
|
|
</view>
|
|
<view class="sfz">
|
|
<view class="sfzwz">驾驶证照片</view>
|
|
<view class="sfztp">
|
|
<image class="sfzimg" @click="uploadFile('jszzm','driving_zm_img')" :src="formDataxs.jszzm" mode=""></image>
|
|
<image class="sfzimg" @click="uploadFile('jszfm','driving_fm_img')" :src="formDataxs.jszfm" mode=""></image>
|
|
</view>
|
|
</view>
|
|
<view class="sfz">
|
|
<view class="sfzwz">行驶证照片</view>
|
|
<view class="sfztp">
|
|
<image class="sfzimg" @click="uploadFile('xszzm','drive_zm_img')" :src="formDataxs.xszzm" mode=""></image>
|
|
<image class="sfzimg" @click="uploadFile('xszfm','drive_fm_img')" :src="formDataxs.xszfm" mode=""></image>
|
|
</view>
|
|
<button class="subbtn" @click="auth">提交</button>
|
|
</view>
|
|
</view>
|
|
<view class="shzbox" v-if="auth_status=='1'">
|
|
<image src="@/static/审核中.png" mode="" class="shzimg"></image>
|
|
<view class="shzwz">
|
|
审核中
|
|
</view>
|
|
</view>
|
|
<view class="wtgbox" v-if="auth_status=='3'&&zaitijiao!=true">
|
|
<image src="@/static/未通过.png" mode="" class="shzimg"></image>
|
|
<view class="shzwz">
|
|
未通过
|
|
</view>
|
|
<view class="jj">
|
|
拒绝原因
|
|
</view>
|
|
<view class="jjyy">
|
|
{{Info.reason}}
|
|
</view>
|
|
<button class="wtgsubbtn" @click="renzheng">重新认证</button>
|
|
</view>
|
|
<!-- <view class="cgbox" v-if="auth_status=='2'&&zaitijiao!=true"> -->
|
|
<view class="cgbox" v-if="auth_status=='2'">
|
|
<image src="@/static/认证成功.png" mode="" class="shzimg"></image>
|
|
<view class="shzwz">
|
|
认证成功,快去抢单吧~
|
|
</view>
|
|
<button class="wtgsubbtn" @click="ljqd">立即抢单</button>
|
|
<!-- <button class="wtgsubbtn" @click="renzheng">重新认证</button> -->
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
formDataxs:{
|
|
sfzzm: require('@/static/身份证正面.png'),
|
|
sfzfm:require('@/static/身份证反面.png'),
|
|
jszzm:require('@/static/驾驶证正面.png'),
|
|
jszfm:require('@/static/驾驶证反面.png'),
|
|
xszzm:require('@/static/行驶证正面.png'),
|
|
xszfm:require('@/static/行驶证反面.png')
|
|
},
|
|
formData: {
|
|
car_type:''
|
|
},
|
|
carindex:'',
|
|
auth_status:'',
|
|
Info:{},
|
|
zaitijiao:false,
|
|
carlist:[]
|
|
}
|
|
},
|
|
onLoad(e) {
|
|
console.log('this.auth_status',e);
|
|
this.auth_status=e.auth_status
|
|
},
|
|
onShow() {
|
|
this.authInfo()
|
|
this.carTypeList()
|
|
},
|
|
methods: {
|
|
bindPickerChange(e){
|
|
this.carindex=e.detail.value
|
|
console.log(e.detail.value);
|
|
this.formData.car_type=this.carlist[e.detail.value].value
|
|
},
|
|
carTypeList(){
|
|
this.$api.carTypeList().then(res=>{
|
|
console.log(1245,res.data);
|
|
this.carlist=res.data
|
|
|
|
})
|
|
},
|
|
renzheng(){
|
|
console.log('this.Info.car_type',this.Info.car_type);
|
|
this.zaitijiao=true
|
|
this.formDataxs.sfzzm=this.Info.card_zm_img_url
|
|
this.formDataxs.sfzfm=this.Info.card_fm_img_url
|
|
this.formDataxs.jszzm=this.Info.driving_zm_img_url
|
|
this.formDataxs.jszfm=this.Info.driving_fm_url
|
|
this.formDataxs.xszzm=this.Info.drive_zm_url
|
|
this.formDataxs.xszfm=this.Info.drive_fm_img_url
|
|
this.carlist.forEach((el,i)=>{
|
|
if(el.value==this.Info.car_type){
|
|
this.carindex=i
|
|
}
|
|
})
|
|
|
|
// id
|
|
this.formData.card_zm_img=this.Info.card_zm_img
|
|
this.formData.card_fm_img=this.Info.card_fm_img
|
|
this.formData.driving_zm_img=this.Info.driving_zm_img
|
|
this.formData.driving_fm_img=this.Info.driving_fm_img
|
|
this.formData.drive_zm_img=this.Info.drive_zm_img
|
|
this.formData.drive_fm_img=this.Info.drive_fm_img
|
|
this.formData.name=this.Info.name
|
|
this.formData.card=this.Info.card
|
|
this.formData.car_type=this.Info.car_type
|
|
},
|
|
authInfo(){
|
|
this.$api.authInfo().then(res=>{
|
|
this.Info=res.data
|
|
})
|
|
},
|
|
auth(){
|
|
this.$api.auth(this.formData).then(res=>{
|
|
uni.showToast({
|
|
icon: "none",
|
|
title: res.data.msg,
|
|
duration: 3000
|
|
});
|
|
if(res.code==200){
|
|
uni.switchTab({
|
|
url: "/pages/user/index"
|
|
})
|
|
}
|
|
})
|
|
},
|
|
uploadFile(i,e){
|
|
uni.chooseImage({
|
|
count:1,
|
|
success: (chooseImageRes) => {
|
|
console.log('tempFilePaths',chooseImageRes);
|
|
const tempFilePaths = chooseImageRes.tempFilePaths;
|
|
uni.uploadFile({
|
|
url: 'https://logistics.njrenzhou.cn/api/uploadFile', //的接口地址
|
|
filePath: tempFilePaths[0],
|
|
name: 'file',
|
|
formData: {
|
|
'user': 'test'
|
|
},
|
|
success: (uploadFileRes) => {
|
|
console.log(123);
|
|
this.formDataxs[i]=JSON.parse(uploadFileRes.data).data.url
|
|
this.formData[e]=JSON.parse(uploadFileRes.data).data.id
|
|
}
|
|
});
|
|
}
|
|
});
|
|
},
|
|
ljqd(){
|
|
uni.switchTab({
|
|
url:'/pages/index/index'
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.wtgsubbtn{
|
|
margin-top: 80rpx;
|
|
width: 702rpx;
|
|
height: 98rpx;
|
|
background: #0D5DC9;
|
|
box-shadow: 0rpx 4rpx 13rpx 0rpx rgba(14,94,157,0.4);
|
|
border-radius: 49rpx;
|
|
border: 1px solid #0D5DC9;
|
|
font-family: Alibaba PuHuiTi;
|
|
font-weight: 400;
|
|
font-size: 30rpx;
|
|
color: #FFFFFF;
|
|
line-height: 98rpx;
|
|
}
|
|
.wtgbox{
|
|
background: #fff;
|
|
height: 1624rpx;
|
|
}
|
|
.jjyy{
|
|
width: 592rpx;
|
|
height: 80rpx;
|
|
background: #F9F9F9;
|
|
border-radius: 10rpx;
|
|
margin-left: 54rpx;
|
|
margin-top: 21rpx;
|
|
font-family: Alibaba PuHuiTi;
|
|
font-weight: 400;
|
|
font-size: 30rpx;
|
|
color: #E45050;
|
|
line-height: 40rpx;
|
|
padding: 25rpx;
|
|
}
|
|
.jj{
|
|
font-family: Alibaba PuHuiTi;
|
|
font-weight: 400;
|
|
font-size: 30rpx;
|
|
color: #333333;
|
|
line-height: 40rpx;
|
|
margin-left: 54rpx;
|
|
margin-top: 21rpx;
|
|
}
|
|
.shzwz{
|
|
text-align: center;
|
|
font-family: Alibaba PuHuiTi;
|
|
font-weight: 400;
|
|
font-size: 36rpx;
|
|
color: #333333;
|
|
line-height: 80rpx;
|
|
}
|
|
.shzimg {
|
|
width: 160rpx;
|
|
height: 160rpx;
|
|
margin-top: 119rpx;
|
|
margin-left: 295rpx;
|
|
}
|
|
|
|
.shzbox {
|
|
height: 1624rpx;
|
|
background: #fff;
|
|
}
|
|
|
|
.subbtn {
|
|
margin-top: 50rpx;
|
|
width: 630rpx;
|
|
height: 98rpx;
|
|
background: #0D5DC9;
|
|
box-shadow: 0rpx 4rpx 13rpx 0rpx rgba(14, 94, 157, 0.4);
|
|
border-radius: 49rpx;
|
|
font-family: Alibaba PuHuiTi;
|
|
font-weight: 400;
|
|
font-size: 30rpx;
|
|
color: #FFFFFF;
|
|
line-height: 98rpx;
|
|
}
|
|
|
|
.sfztp {
|
|
margin-top: 49rpx;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.sfzimg {
|
|
width: 332rpx;
|
|
height: 216rpx;
|
|
}
|
|
|
|
.sfz {
|
|
background: #fff;
|
|
margin-top: 20rpx;
|
|
padding: 24rpx;
|
|
}
|
|
|
|
.sfzwz {
|
|
font-family: Alibaba PuHuiTi;
|
|
font-weight: 400;
|
|
font-size: 36rpx;
|
|
color: #333333;
|
|
line-height: 40rpx;
|
|
}
|
|
|
|
/deep/ .uni-forms-item {
|
|
margin-bottom: 24rpx;
|
|
}
|
|
/deep/ .uni-forms-item__label {
|
|
font-family: Alibaba PuHuiTi;
|
|
font-weight: 400;
|
|
font-size: 30rpx;
|
|
color: #333333;
|
|
}
|
|
.border {
|
|
border: 1px solid #EAEAEA;
|
|
margin-bottom: 10rpx;
|
|
}
|
|
|
|
.input {
|
|
margin-top: 15rpx;
|
|
text-align: right;
|
|
}
|
|
|
|
.box {
|
|
padding: 24rpx;
|
|
background: #fff;
|
|
}
|
|
</style> |