@@ -18,7 +18,7 @@ | |||
onMounted | |||
} from "vue"; | |||
import viewfinder from "./viewfinder.vue" | |||
import { idCardOcr,vehicleLicenseOcr} from "@/utils/network/api.js"; | |||
import { | |||
uploadFile, | |||
compressImage, | |||
@@ -53,31 +53,19 @@ | |||
}) | |||
const xiangce = (val) => { | |||
console.log("val", val) | |||
var imageType="" | |||
state.choiceIndex=val | |||
if(state.choiceIndex == 1 || state.choiceIndex == 2){ | |||
imageType = val; | |||
}else{ | |||
if (state.choiceIndex == 3) { | |||
imageType = '1'; | |||
} else { | |||
imageType = '2'; | |||
} | |||
} | |||
chooseImageCompress((res) => { | |||
console.log("res",res,state.choiceIndex) | |||
state.images = res.tempFilePath ? res.tempFilePath : res.tempFilePaths[0] | |||
state.showImg = false | |||
emit('close', false) | |||
if(state.choiceIndex==1 || state.choiceIndex==2){ | |||
var issfz=idCardOcr | |||
}else{ | |||
var issfz=vehicleLicenseOcr | |||
} | |||
uploadFile(state.images, imageType, issfz).then((data) => { | |||
uploadFile(state.images, state.choiceIndex).then((data) => { | |||
console.log("身份证上传", data) | |||
emit('ocrResult', data) | |||
var allData={ | |||
...data, | |||
tempFilePath:state.images | |||
} | |||
emit('ocrResult', allData) | |||
}) | |||
}) | |||
} | |||
@@ -90,18 +78,7 @@ | |||
const confirmReturn = (val) => { | |||
console.log("图片地址val", val) | |||
state.phoneType = 0 | |||
if(state.choiceIndex==1 || state.choiceIndex==2){ | |||
var imageType = state.choiceIndex; | |||
var issfz=idCardOcr | |||
}else{ | |||
if (state.choiceIndex == 3) { | |||
var imageType = 1; | |||
} else { | |||
var imageType = 2; | |||
} | |||
var issfz=vehicleLicenseOcr | |||
} | |||
uploadFile(val.tempImagePath, imageType, issfz).then((data) => { | |||
uploadFile(val.tempImagePath, state.choiceIndex).then((data) => { | |||
console.log("身份证上传", data) | |||
emit('close', false) | |||
emit('ocrResult', data) |
@@ -79,3 +79,72 @@ export const getCredentialType = (id=101) => { | |||
} | |||
} | |||
export const credentialTypeSelect = [{ | |||
value: 101, | |||
label: '身份证(含临时身份证)' | |||
}, | |||
{ | |||
value: 102, | |||
label: '护照(限外籍人士)' | |||
}, | |||
{ | |||
value: 103, | |||
label: '港澳居民来往内地通行证' | |||
}, | |||
{ | |||
value: 104, | |||
label: '台湾居民来往大陆通行证' | |||
}, | |||
{ | |||
value: 105, | |||
label: '军官证' | |||
}, | |||
{ | |||
value: 106, | |||
label: '武警警察身份证' | |||
}, | |||
{ | |||
value: 113, | |||
label: '澳门永久/非永久居民身份证' | |||
}, | |||
{ | |||
value: 114, | |||
label: '香港永久/非永久居民身份证' | |||
}, | |||
{ | |||
value: 201, | |||
label: '统一社会信用代码证书' | |||
}, | |||
{ | |||
value: 202, | |||
label: '组织机构代码证' | |||
}, | |||
{ | |||
value: 203, | |||
label: '营业执照' | |||
}, | |||
{ | |||
value: 204, | |||
label: '事业单位法人证书' | |||
}, | |||
{ | |||
value: 205, | |||
label: '社会团体法人登记证书' | |||
}, | |||
{ | |||
value: 206, | |||
label: '律师事务所执业许可证' | |||
}, | |||
{ | |||
value: 217, | |||
label: '公司商业登记副本(3个月内)' | |||
}, | |||
{ | |||
value: 218, | |||
label: '公司营业税单M8副本' | |||
}, | |||
{ | |||
value: 219, | |||
label: '公司营业税开业/更改M1副本' | |||
} | |||
]; |
@@ -1629,6 +1629,13 @@ | |||
{ | |||
"root": "subpackage/personal-center", //个人中心 | |||
"pages": [ | |||
{ | |||
"path": "real-name-authentication", | |||
"style": { | |||
"navigationBarTitleText": "实名认证", | |||
"enablePullDownRefresh": false | |||
} | |||
}, | |||
{ | |||
"path": "my-etc-account", | |||
"style": { |
@@ -51,7 +51,7 @@ | |||
<view class="info-content"> | |||
<view class="order box"> | |||
<view class="list_item"> | |||
<view class="list_item" @click="$util.navTo('/subpackage/personal-center/real-name-authentication', true)"> | |||
<view class="l-con"> | |||
<image :src="`${$imgUrl}myImage/basicInformation.png`" class="equity-icon" mode="widthFix"></image> | |||
<view class="txt"> |
@@ -176,9 +176,12 @@ | |||
requestNew(billRaiseUpdate, options).then((res) => { | |||
const data = res; | |||
console.log("data", data) | |||
uni.navigateBack({ | |||
delta: 1 | |||
}) | |||
msg("修改成功") | |||
setTimeout(()=>{ | |||
uni.navigateBack({ | |||
delta: 1 | |||
}) | |||
},1500) | |||
}); | |||
} | |||
const del = () => { | |||
@@ -196,9 +199,13 @@ | |||
requestNew(billRaiseDelete, options).then((res) => { | |||
const data = res; | |||
console.log("data", data) | |||
uni.navigateBack({ | |||
delta: 1 | |||
}) | |||
msg("删除成功") | |||
setTimeout(()=>{ | |||
uni.navigateBack({ | |||
delta: 1 | |||
}) | |||
},1500) | |||
}); | |||
} | |||
</script> |
@@ -5,6 +5,7 @@ | |||
<view class="title_left"> | |||
<image :src="`${$imgUrl}etc.png`" mode=""></image> | |||
<text class="question">{{item.buyerName}}</text> | |||
<view v-if="item.isDefault==1" class="default">默认</view> | |||
</view> | |||
<image @click="toEdit(item)" :src="`${$imgUrl}applyCard/edit.png`" mode=""></image> | |||
</view> | |||
@@ -197,4 +198,11 @@ | |||
flex-direction: column; | |||
margin-top: 20rpx; | |||
} | |||
.default{ | |||
border: 1rpx solid #01243A; | |||
font-size: 28rpx; | |||
border-radius: 10rpx; | |||
padding: 2rpx 6rpx; | |||
margin-left: 10rpx; | |||
} | |||
</style> |
@@ -290,12 +290,13 @@ export const cardObuLossView= "/iaw/api/afterSale/cardObuLoss/view" //业务审 | |||
export const customerInfoChangeView= "/iaw/aftersale/customerInfoChange/view" //业务审核查询详情 用户信息变更 | |||
export const customerInfoChangeCancel= "/iaw/aftersale/customerInfoChange/cancel" //业务审核取消 用户信息变更 | |||
// ocr | |||
// export const idCardOcr= "/iaw/ocr/idCardOcr" //身份证OCR识别 | |||
export const idCardOcr= "/iaw/txOcr/idCardOcr" //身份证OCR识别 | |||
// export const vehicleLicenseOcr= "/iaw/ocr/vehicleLicenseOcr" //车辆行驶证OCR识别 | |||
export const vehicleLicenseOcr= "/iaw/txOcr/vehicleLicenseOcr" //车辆行驶证OCR识别 | |||
// export const ocrAllQuery = '/iaw/ocr/businessLicenseOcrNew'; //8.76.BDS-OCR证照识别接口 | |||
export const ocrAllQuery = '/iaw/txOcr/businessLicenseOcr'; //8.76.BDS-OCR证照识别接口 | |||
export const idCardOcr= "/iaw/ocr/idCardOcr" //身份证OCR识别 | |||
// export const idCardOcr= "/iaw/txOcr/idCardOcr" //身份证OCR识别 | |||
export const vehicleLicenseOcr= "/iaw/ocr/vehicleLicenseOcr" //车辆行驶证OCR识别 | |||
// export const vehicleLicenseOcr= "/iaw/txOcr/vehicleLicenseOcr" //车辆行驶证OCR识别 | |||
export const ocrAllQuery = '/iaw/ocr/businessLicenseOcrNew'; //8.76.BDS-OCR证照识别接口 | |||
// export const ocrAllQuery = '/iaw/txOcr/businessLicenseOcr'; //8.76.BDS-OCR证照识别接口 | |||
export const ocrDo = '/iaw/api/ocr/do'; //OCR识别接口 1-身份证-人像面 2-身份证-国徽面 3-行驶证前页 4-行驶证背页 5-营业执照 | |||
// 公用得接口 | |||
export const commQueryCourier= "/iaw/api/afterSale/comm/queryCourier" //获取快递公司列表 | |||
// 收货地址管理 | |||
@@ -491,3 +492,4 @@ export const licenseInforChangeApply = "/iaw/aftersale/vehicleInformationChange/ | |||
export const vehicleTypeCount = "/iaw/aftersale/vehicleInformationChange/vehicleTypeCount" //车型计算 | |||
export const logout = "/iaw/portal/logout" //退出登录 | |||
export const customerQuery = "/iaw/api/customer/query" //客户列表查询 | |||
export const realNameAuthentication = "/iaw/portal/realNameAuthentication" //实名认证 |
@@ -5,6 +5,7 @@ import { agentId } from "@/utils/network/difference"; | |||
import { | |||
requestNew | |||
} from "@/utils/network/request.js"; | |||
import {ocrDo} from "@/utils/network/api.js"; | |||
export const msg = (title : string = "", param : any = {}) => { | |||
if (!title) return; | |||
uni.showToast({ | |||
@@ -510,61 +511,64 @@ function formatNumber(n : any) { | |||
n = n.toString() | |||
return n[1] ? n : `0${n}` | |||
} | |||
export const uploadFile = (tempImagePath, imageType, code) => { | |||
export const uploadFile = (tempImagePath, imageType) => { | |||
console.log("tempImagePath",tempImagePath,tempImagePath.size) | |||
return new Promise((resolve, reject) => { | |||
uni.uploadFile({ | |||
url: 'https://qtzl.etcjz.cn/minIo/upload', //仅为示例,非真实的接口地址 | |||
url: 'https://qtzl.etcjz.cn/newDev/minIo/upload', //仅为示例,非真实的接口地址 | |||
filePath: tempImagePath, | |||
name: 'file', | |||
formData: { | |||
'user': 'test', | |||
"bucket": 'default-bucket' | |||
'busCode':'iaw' | |||
}, | |||
success: (uploadFileRes) => { | |||
let uploadFileImage = 'http://100.64.2.113:9000' + '/default-bucket/' + JSON.parse(uploadFileRes.data).data.ossFilePath | |||
console.log("111", JSON.parse(uploadFileRes.data).data.ossFilePath,JSON.parse(uploadFileRes.data)); | |||
var data={} | |||
if (code == "/iaw/txOcr/idCardOcr") { //身份证 imageType 1 2 | |||
data = { | |||
source: "1", | |||
agencyId: agentId, | |||
imageType: imageType, | |||
fileName: tempImagePath, | |||
url: uploadFileImage | |||
}; | |||
} else if (code == "/iaw/txOcr/vehicleLicenseOcr") { //行驶证 imageType 1正 2反 | |||
data = { | |||
source: "1", | |||
agencyId: agentId, | |||
imageType: imageType, | |||
fileName: tempImagePath, | |||
imageUrl: uploadFileImage | |||
}; | |||
} else if (code == "") { //委托书 车头照 17 | |||
let uploadFileImage = envs[process.env.NODE_ENV].baseUrl + '/default-bucket/' + JSON.parse(uploadFileRes.data).data.ossFilePath | |||
console.log("uploadFileRes",uploadFileRes,JSON.parse(uploadFileRes.data).data.ossFilePath) | |||
// let uploadFileImage = 'http://100.64.2.113:9000' + '/default-bucket/' + JSON.parse(uploadFileRes.data).data.ossFilePath | |||
// console.log("111", JSON.parse(uploadFileRes.data).data.ossFilePath,JSON.parse(uploadFileRes.data)); | |||
// var data={} | |||
// if (code == "/iaw/txOcr/idCardOcr") { //身份证 imageType 1 2 | |||
// data = { | |||
// source: "1", | |||
// agencyId: agentId, | |||
// imageType: imageType, | |||
// fileName: tempImagePath, | |||
// url: uploadFileImage | |||
// }; | |||
// } else if (code == "/iaw/txOcr/vehicleLicenseOcr") { //行驶证 imageType 1正 2反 | |||
// data = { | |||
// source: "1", | |||
// agencyId: agentId, | |||
// imageType: imageType, | |||
// fileName: tempImagePath, | |||
// imageUrl: uploadFileImage | |||
// }; | |||
// } else if (code == "") { //委托书 车头照 17 | |||
// let uploadFileImage = envs[process.env.NODE_ENV].baseUrl + '/default-bucket/' + JSON.parse(uploadFileRes.data).data.ossFilePath | |||
console.log("17", uploadFileImage) | |||
resolve(uploadFileImage) | |||
return; | |||
} else if (code == '/iaw/txOcr/businessLicenseOcr') { //营业执照 | |||
data = { | |||
type: 'business_license', | |||
url: uploadFileImage, | |||
agencyId: agentId, | |||
fileName: tempImagePath, | |||
}; | |||
console.log("91", uploadFileImage) | |||
} | |||
// console.log("17", uploadFileImage) | |||
// resolve(uploadFileImage) | |||
// return; | |||
// } else if (code == '/iaw/txOcr/businessLicenseOcr') { //营业执照 | |||
// data = { | |||
// type: 'business_license', | |||
// url: uploadFileImage, | |||
// agencyId: agentId, | |||
// fileName: tempImagePath, | |||
// }; | |||
// console.log("91", uploadFileImage) | |||
// } | |||
const options = { | |||
type: 2, | |||
data: data, | |||
data: { | |||
type: imageType, | |||
imagePath: JSON.parse(uploadFileRes.data).data.ossFilePath, | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
requestNew(code, options).then((res) => { | |||
requestNew(ocrDo, options).then((res) => { | |||
console.log("res===",res) | |||
const data = res; | |||
console.log('输出内容=====123', data) | |||
@@ -746,3 +750,20 @@ export function jumpOldMini() { | |||
}, | |||
}); | |||
} | |||
// 图片转base64 | |||
export const getFileBase64 = (path) => { | |||
console.log("进来",path) | |||
return new Promise((resolve, reject) => { | |||
uni.getFileSystemManager().readFile({ | |||
filePath: path, //参数path:图片相对路径 | |||
encoding: 'base64', | |||
success: (res) => { | |||
console.log("进来1",res) | |||
resolve(res.data); | |||
}, | |||
fail: (err) => { | |||
console.log(err); | |||
} | |||
}); | |||
}); | |||
}; |