story#7189,回程车小程序司机端-迁移认证

This commit is contained in:
2025-09-09 16:39:28 +08:00
parent ceff5e008c
commit 7f8c482df1
5 changed files with 95 additions and 62 deletions

View File

@ -66,10 +66,10 @@
type:localStorage.getItem('type')
}
},
async onLoad(options) {
if(options?.show) {
this.show = options.show
}
async mounted() {
// if(options?.show) {
this.show = true
// }
if( this.show ) {
await this.getDetail()
}

View File

@ -100,10 +100,10 @@
type: localStorage.getItem('type'),
}
},
async onLoad(options) {
if(options?.show) {
this.show = options.show
}
async mounted() {
// if(options?.show) {
this.show = true
// }
if( this.show ) {
await this.getDetail()
}

View File

@ -16,7 +16,7 @@
<div class="natureWrap">
<span class="title"><span class="star">*</span>业务性质</span>
<van-radio-group @change="radioChange" v-model="form.businessNature" class="flexWrap">
<van-radio name="1">国跑圈业务</van-radio>
<van-radio name="1">国跑圈业务</van-radio>
<van-radio name="2">固定区域救援业务</van-radio>
</van-radio-group>
</div>
@ -191,14 +191,13 @@
},
show: undefined,
type: localStorage.getItem('type'),
options:[{value:1,name:'全国跑圈业务'},{value:2,name:'固定区域救援业务'}],
tyreOptions:[{value:0,name:'0'},{value:2,name:'2'},{value:4,name:'4'}]
}
},
async onLoad(options) {
if(options?.show) {
this.show = options.show
}
async mounted() {
// if(options?.show) {
this.show = true
// }
if(this.show) {
await this.getDetail()
}
@ -302,6 +301,7 @@
},
insureHandle(val){
this.form.hasInsurancePhoto=val
console.log(' this.form.hasInsurancePhoto', this.form.hasInsurancePhoto)
},
vehicleFrontInit() {
this.form.licensePlateNumber = ''
@ -311,6 +311,7 @@
this.form.vehicleLicenseOwner = ''
},
async vehicleFrontHandler(data) { // 行驶证正面照及ocr识别
console.log("vehicleFrontHandler",data)
await this.vehicleFrontInit()
this.form.vehicleLicenseFront = data
let vehicleInfo = await this.orcHandler(this.form.vehicleLicenseFront, 3)
@ -414,9 +415,10 @@
.flexWrap{
display:flex;
align-items: center;
}
}
::v-deep .van-radio__icon{
transform: scale(0.8) !important;
transform: scale(0.8);
transform-origin: center; /* 保持中心点不变 */
}
}
}
</style>

View File

@ -7,23 +7,22 @@
<van-radio name="0"></van-radio>
<van-radio name="1"></van-radio>
</van-radio-group>
<!-- <radio-group @change="radioChange" class="flexWrap">
<label class="flexWrap labelWrap" v-for="(item, index) in options" :key="item.value">
<div class="flexWrap center"><radio :value="item.value" :checked="index == inSure" />{{item.name}}</div>
</label>
</radio-group>-->
</div>
<div class="photoWrap" v-if="inSure == 1">
<div class="photoWrap" v-if="form.isInsure == 1">
<van-uploader :after-read="(file) => afterRead(file,'urlList')" class="customUploadMul" max-count="3" :disabled="!showFun()">
<template v-if="urlList.length > 0">
<div v-for="(item,index) in urlList" :key="index" @click="chooseHandler('urlList',index)">
<div v-for="(item, index) in urlList" :key="'uploaded-' + index" class="uploaded-item">
<img class="photo_item" mode="widthFix" :src="item.replace(/http:\/\//g, 'https://')" />
</div>
</template>
<div v-if="urlList.length < 3" @click="chooseHandler('urlList')" class="tipWrap">
<template v-if="urlList.length < 3">
<div class="tipWrap">
<img class="photo_item" mode="widthFix" src="@/assets/authentication/carInfo_icon5.png"/>
<img class="camera" v-if="showFun()" src="@/assets/authentication/camera.png" />
<span class="picNum">({{ urlList.length }}/3)</span>
</div>
</template>
</van-uploader>
</div>
</template>
<template v-else>
@ -32,31 +31,32 @@
<span>{{title}}</span>
</div>
<div class="photo_img flex flex_between">
<div @click="chooseHandler('leftImg')">
<van-uploader v-if="leftUrl" :after-read="(file) => afterRead(file,'leftImg')" class="customUpload" :disabled="!showFun()">
<template v-if="form.leftImg">
<img class="photo_item" mode="widthFix" :src="form.leftImg.replace(/http:\/\//g, 'https://')" />
</template>
<template v-else>
<img class="photo_item" mode="widthFix" :src="leftUrl.replace(/http:\/\//g, 'https://')" />
<img class="photo_item" mode="widthFix" :src="leftUrl" />
<img class="camera" v-if="showFun()" src="@/assets/authentication/camera.png" />
</template>
<div></div>
</div>
<div v-if="rightUrl" @click="chooseHandler('rightImg')">
</van-uploader>
<van-uploader v-if="rightUrl" :after-read="(file) => afterRead(file,'rightImg')" class="customUpload" :disabled="!showFun()">
<template v-if="form.rightImg">
<img class="photo_item" mode="widthFix" :src="form.rightImg.replace(/http:\/\//g, 'https://')" />
</template>
<template v-else>
<img class="photo_item" mode="widthFix" :src="rightUrl.replace(/http:\/\//g, 'https://')" />
<img class="photo_item" mode="widthFix" :src="rightUrl" />
<img class="camera" v-if="showFun()" src="@/assets/authentication/camera.png" />
</template>
</div>
</van-uploader>
</div>
</template>
</div>
</template>
<script>
import {uploadImage} from "@/api/mine";
let baseUrl=''
if (window.location.href.includes('www.sinoassist.com')) {
baseUrl = 'https://www.sinoassist.com'
@ -92,22 +92,37 @@ export default {
leftImg: '',
rightImg: '',
urlList:[],
isInsure:-1,
isInsure:1,
},
options:[{value:0,name:'否'},{value:1,name:'是'}],
}
},
mounted() {
activated() {
console.log("inSure",this.inSure)
},
mounted() {
},
methods: {
radioChange(e){
// this.form.isInsure=e?.detail?.value
async afterRead(file,type,index){
const formData = new FormData();
formData.append("file" , file.file);
let res = await uploadImage(formData)
if (type=='urlList' && (index==0 || index)){
this.$set( this.form.urlList,index,res.data)
}else if(type=='urlList'){
this.form[type].push(res.data)
}else{
this.form[type] = res.data
}
this.$emit(type, this.form[type])
},
radioChange(val){
this.$emit('insureHandle',val)
if(this.form.isInsure==0){
this.form.urlList=[]
this.$emit('urlList', this.form.urlList)
}
this.$emit('insureHandle',e?.detail?.value)
},
showFun() {
if( localStorage.getItem('infoVerify') == 8 || localStorage.getItem('infoVerify') == 12 ) {
@ -194,6 +209,23 @@ export default {
<style lang="scss" scoped>
@import "@/styles/common.scss";
.customUpload{
width: calc(50% - 3px);
::v-deep .van-uploader__input-wrapper{
width: 100% !important;
}
}
.customUploadMul{
width: 100%;
::v-deep .van-uploader__input-wrapper{
width: 100% !important;
display: flex;
flex-wrap: wrap;
}
.uploaded-item,.tipWrap{
width: calc(50% - 3px);
}
}
.photo_wrap {
padding: 20px 12px 22px 17px;
background: #FFFFFF;
@ -247,7 +279,7 @@ export default {
margin-right: 4px;
}
div {
width: calc(50% - 3px);
//width: calc(50% - 3px);
position: relative;
.photo_item {
width: 100%;

View File

@ -87,13 +87,13 @@
esignFlag: false,
}
},
async onLoad(options) {
if(options?.show) {
this.show = options.show
async mounted() {
// if(options?.show) {
this.show = true
if( this.show ) {
await this.getDetail()
}
}
// }
},
async onShow() {
this.esignFlag = localStorage.getItem('esignFlag');
@ -142,8 +142,6 @@
} else {
this.form.idCardValidEndTime = endDate.replace(/\./g, '/') + ' 00:00:00';
}
// console.log('this.form.idCardValidStartTime', this.form.idCardValidStartTime);
// console.log('this.form.idCardValidEndTime', this.form.idCardValidEndTime);
},
async idOrcHandler(url) {
await this.initForm()
@ -177,8 +175,9 @@
})
let info = res?.data
console.log('info', info)
window.open(info?.shortLink)
/* let env = version=='release' ? 'prod' : 'sml'
uni.navigateToMiniProgram({
wx.navigateToMiniProgram({
appId: 'wx1cf2708c2de46337', // 上链公证签小程序APPID
path: '/pages/index/index', // 上链公证签页面地址
extraData: {