行驶证副业,代码恢复
This commit is contained in:
@ -125,7 +125,6 @@ import {myMixins} from "@/utils/myMixins"
|
|||||||
import {vehicleTypeList,saveVehicle,getInfoById,supplierServiceTree, uploadImage, ocrHandler} from "@/api/mine"
|
import {vehicleTypeList,saveVehicle,getInfoById,supplierServiceTree, uploadImage, ocrHandler} from "@/api/mine"
|
||||||
import TwoCommonBtn from "@/components/twoBtnCommon.vue"
|
import TwoCommonBtn from "@/components/twoBtnCommon.vue"
|
||||||
import CellGroup from "@/components/cellGroup.vue";
|
import CellGroup from "@/components/cellGroup.vue";
|
||||||
import { requestPermissions } from 'vant'
|
|
||||||
export default {
|
export default {
|
||||||
name: "vehicleAdd",
|
name: "vehicleAdd",
|
||||||
mixins:[myMixins],
|
mixins:[myMixins],
|
||||||
@ -176,17 +175,12 @@ export default {
|
|||||||
await this.vehicleOcrHandler();
|
await this.vehicleOcrHandler();
|
||||||
},
|
},
|
||||||
async vehicleLicenseBackHandler(file) { // 上传 行驶证副页
|
async vehicleLicenseBackHandler(file) { // 上传 行驶证副页
|
||||||
requestPermissions(['camera']).then(async () => {
|
this.vehicleLicenseBackOcrFlag = true;
|
||||||
this.vehicleLicenseBackOcrFlag = true;
|
const formData = new FormData();
|
||||||
const formData = new FormData();
|
formData.append("file" , file.file);
|
||||||
formData.append("file" , file.file);
|
let res = await uploadImage(formData);
|
||||||
let res = await uploadImage(formData);
|
this.vehicleLicenseBack = res.data;
|
||||||
this.vehicleLicenseBack = res.data;
|
await this.vehicleBackOcrHandler();
|
||||||
await this.vehicleBackOcrHandler();
|
|
||||||
}).catch((error) => {
|
|
||||||
console.log('获取失败了', error)
|
|
||||||
// 权限获取失败,提示用户手动开启权限
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
async vehicleFrontPhotoHandler(file) { // 上传 车头照
|
async vehicleFrontPhotoHandler(file) { // 上传 车头照
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
|
Reference in New Issue
Block a user