story#7189,回程车小程序司机端-迁移认证
This commit is contained in:
@ -66,10 +66,10 @@
|
|||||||
type:localStorage.getItem('type')
|
type:localStorage.getItem('type')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async onLoad(options) {
|
async mounted() {
|
||||||
if(options?.show) {
|
// if(options?.show) {
|
||||||
this.show = options.show
|
this.show = true
|
||||||
}
|
// }
|
||||||
if( this.show ) {
|
if( this.show ) {
|
||||||
await this.getDetail()
|
await this.getDetail()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -100,10 +100,10 @@
|
|||||||
type: localStorage.getItem('type'),
|
type: localStorage.getItem('type'),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async onLoad(options) {
|
async mounted() {
|
||||||
if(options?.show) {
|
// if(options?.show) {
|
||||||
this.show = options.show
|
this.show = true
|
||||||
}
|
// }
|
||||||
if( this.show ) {
|
if( this.show ) {
|
||||||
await this.getDetail()
|
await this.getDetail()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
<div class="natureWrap">
|
<div class="natureWrap">
|
||||||
<span class="title"><span class="star">*</span>业务性质</span>
|
<span class="title"><span class="star">*</span>业务性质</span>
|
||||||
<van-radio-group @change="radioChange" v-model="form.businessNature" class="flexWrap">
|
<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 name="2">固定区域救援业务</van-radio>
|
||||||
</van-radio-group>
|
</van-radio-group>
|
||||||
</div>
|
</div>
|
||||||
@ -191,14 +191,13 @@
|
|||||||
},
|
},
|
||||||
show: undefined,
|
show: undefined,
|
||||||
type: localStorage.getItem('type'),
|
type: localStorage.getItem('type'),
|
||||||
options:[{value:1,name:'全国跑圈业务'},{value:2,name:'固定区域救援业务'}],
|
|
||||||
tyreOptions:[{value:0,name:'0'},{value:2,name:'2'},{value:4,name:'4'}]
|
tyreOptions:[{value:0,name:'0'},{value:2,name:'2'},{value:4,name:'4'}]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async onLoad(options) {
|
async mounted() {
|
||||||
if(options?.show) {
|
// if(options?.show) {
|
||||||
this.show = options.show
|
this.show = true
|
||||||
}
|
// }
|
||||||
if(this.show) {
|
if(this.show) {
|
||||||
await this.getDetail()
|
await this.getDetail()
|
||||||
}
|
}
|
||||||
@ -302,6 +301,7 @@
|
|||||||
},
|
},
|
||||||
insureHandle(val){
|
insureHandle(val){
|
||||||
this.form.hasInsurancePhoto=val
|
this.form.hasInsurancePhoto=val
|
||||||
|
console.log(' this.form.hasInsurancePhoto', this.form.hasInsurancePhoto)
|
||||||
},
|
},
|
||||||
vehicleFrontInit() {
|
vehicleFrontInit() {
|
||||||
this.form.licensePlateNumber = ''
|
this.form.licensePlateNumber = ''
|
||||||
@ -311,6 +311,7 @@
|
|||||||
this.form.vehicleLicenseOwner = ''
|
this.form.vehicleLicenseOwner = ''
|
||||||
},
|
},
|
||||||
async vehicleFrontHandler(data) { // 行驶证正面照,及ocr识别
|
async vehicleFrontHandler(data) { // 行驶证正面照,及ocr识别
|
||||||
|
console.log("vehicleFrontHandler",data)
|
||||||
await this.vehicleFrontInit()
|
await this.vehicleFrontInit()
|
||||||
this.form.vehicleLicenseFront = data
|
this.form.vehicleLicenseFront = data
|
||||||
let vehicleInfo = await this.orcHandler(this.form.vehicleLicenseFront, 3)
|
let vehicleInfo = await this.orcHandler(this.form.vehicleLicenseFront, 3)
|
||||||
@ -414,9 +415,10 @@
|
|||||||
.flexWrap{
|
.flexWrap{
|
||||||
display:flex;
|
display:flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
|
||||||
}
|
|
||||||
::v-deep .van-radio__icon{
|
::v-deep .van-radio__icon{
|
||||||
transform: scale(0.8) !important;
|
transform: scale(0.8);
|
||||||
|
transform-origin: center; /* 保持中心点不变 */
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -7,23 +7,22 @@
|
|||||||
<van-radio name="0">否</van-radio>
|
<van-radio name="0">否</van-radio>
|
||||||
<van-radio name="1">是</van-radio>
|
<van-radio name="1">是</van-radio>
|
||||||
</van-radio-group>
|
</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>
|
||||||
<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">
|
<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://')" />
|
<img class="photo_item" mode="widthFix" :src="item.replace(/http:\/\//g, 'https://')" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</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="photo_item" mode="widthFix" src="@/assets/authentication/carInfo_icon5.png"/>
|
||||||
<img class="camera" v-if="showFun()" src="@/assets/authentication/camera.png" />
|
<img class="camera" v-if="showFun()" src="@/assets/authentication/camera.png" />
|
||||||
<span class="picNum">({{ urlList.length }}/3)</span>
|
<span class="picNum">({{ urlList.length }}/3)</span>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
</van-uploader>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
@ -32,31 +31,32 @@
|
|||||||
<span>{{title}}</span>
|
<span>{{title}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="photo_img flex flex_between">
|
<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">
|
<template v-if="form.leftImg">
|
||||||
<img class="photo_item" mode="widthFix" :src="form.leftImg.replace(/http:\/\//g, 'https://')" />
|
<img class="photo_item" mode="widthFix" :src="form.leftImg.replace(/http:\/\//g, 'https://')" />
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<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" />
|
<img class="camera" v-if="showFun()" src="@/assets/authentication/camera.png" />
|
||||||
</template>
|
</template>
|
||||||
<div></div>
|
</van-uploader>
|
||||||
</div>
|
<van-uploader v-if="rightUrl" :after-read="(file) => afterRead(file,'rightImg')" class="customUpload" :disabled="!showFun()">
|
||||||
<div v-if="rightUrl" @click="chooseHandler('rightImg')">
|
|
||||||
<template v-if="form.rightImg">
|
<template v-if="form.rightImg">
|
||||||
<img class="photo_item" mode="widthFix" :src="form.rightImg.replace(/http:\/\//g, 'https://')" />
|
<img class="photo_item" mode="widthFix" :src="form.rightImg.replace(/http:\/\//g, 'https://')" />
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<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" />
|
<img class="camera" v-if="showFun()" src="@/assets/authentication/camera.png" />
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</van-uploader>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {uploadImage} from "@/api/mine";
|
||||||
|
|
||||||
let baseUrl=''
|
let baseUrl=''
|
||||||
if (window.location.href.includes('www.sinoassist.com')) {
|
if (window.location.href.includes('www.sinoassist.com')) {
|
||||||
baseUrl = 'https://www.sinoassist.com'
|
baseUrl = 'https://www.sinoassist.com'
|
||||||
@ -92,22 +92,37 @@ export default {
|
|||||||
leftImg: '',
|
leftImg: '',
|
||||||
rightImg: '',
|
rightImg: '',
|
||||||
urlList:[],
|
urlList:[],
|
||||||
isInsure:-1,
|
isInsure:1,
|
||||||
},
|
},
|
||||||
options:[{value:0,name:'否'},{value:1,name:'是'}],
|
options:[{value:0,name:'否'},{value:1,name:'是'}],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
activated() {
|
||||||
console.log("inSure",this.inSure)
|
console.log("inSure",this.inSure)
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
radioChange(e){
|
async afterRead(file,type,index){
|
||||||
// this.form.isInsure=e?.detail?.value
|
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){
|
if(this.form.isInsure==0){
|
||||||
this.form.urlList=[]
|
this.form.urlList=[]
|
||||||
this.$emit('urlList', this.form.urlList)
|
this.$emit('urlList', this.form.urlList)
|
||||||
}
|
}
|
||||||
this.$emit('insureHandle',e?.detail?.value)
|
|
||||||
},
|
},
|
||||||
showFun() {
|
showFun() {
|
||||||
if( localStorage.getItem('infoVerify') == 8 || localStorage.getItem('infoVerify') == 12 ) {
|
if( localStorage.getItem('infoVerify') == 8 || localStorage.getItem('infoVerify') == 12 ) {
|
||||||
@ -194,6 +209,23 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import "@/styles/common.scss";
|
@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 {
|
.photo_wrap {
|
||||||
padding: 20px 12px 22px 17px;
|
padding: 20px 12px 22px 17px;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
@ -247,7 +279,7 @@ export default {
|
|||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
div {
|
div {
|
||||||
width: calc(50% - 3px);
|
//width: calc(50% - 3px);
|
||||||
position: relative;
|
position: relative;
|
||||||
.photo_item {
|
.photo_item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@ -87,13 +87,13 @@
|
|||||||
esignFlag: false,
|
esignFlag: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async onLoad(options) {
|
async mounted() {
|
||||||
if(options?.show) {
|
// if(options?.show) {
|
||||||
this.show = options.show
|
this.show = true
|
||||||
if( this.show ) {
|
if( this.show ) {
|
||||||
await this.getDetail()
|
await this.getDetail()
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
async onShow() {
|
async onShow() {
|
||||||
this.esignFlag = localStorage.getItem('esignFlag');
|
this.esignFlag = localStorage.getItem('esignFlag');
|
||||||
@ -142,8 +142,6 @@
|
|||||||
} else {
|
} else {
|
||||||
this.form.idCardValidEndTime = endDate.replace(/\./g, '/') + ' 00:00:00';
|
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) {
|
async idOrcHandler(url) {
|
||||||
await this.initForm()
|
await this.initForm()
|
||||||
@ -177,8 +175,9 @@
|
|||||||
})
|
})
|
||||||
let info = res?.data
|
let info = res?.data
|
||||||
console.log('info', info)
|
console.log('info', info)
|
||||||
|
window.open(info?.shortLink)
|
||||||
/* let env = version=='release' ? 'prod' : 'sml'
|
/* let env = version=='release' ? 'prod' : 'sml'
|
||||||
uni.navigateToMiniProgram({
|
wx.navigateToMiniProgram({
|
||||||
appId: 'wx1cf2708c2de46337', // 上链公证签小程序APPID
|
appId: 'wx1cf2708c2de46337', // 上链公证签小程序APPID
|
||||||
path: '/pages/index/index', // 上链公证签页面地址
|
path: '/pages/index/index', // 上链公证签页面地址
|
||||||
extraData: {
|
extraData: {
|
||||||
|
|||||||
Reference in New Issue
Block a user