二手车交易,识别接口更换

This commit is contained in:
2025-03-14 09:33:44 +08:00
parent 938d6c9386
commit d498734739
3 changed files with 14 additions and 5 deletions

View File

@ -308,3 +308,12 @@ export function ocrHandler(data){
data
})
}
///agg-api/tencent-ocr/unifiedOCRWithCompress
export function unifiedOCRWithCompress(data){
return request({
url:'/agg-api/tencent-ocr/unifiedOCRWithCompress',
method:'POST',
contentType:'application/json',
data
})
}

View File

@ -171,7 +171,7 @@ export default {
areaCode:'',
mileage:'',
contactNumber:'',
minPrice:0,
minPrice:'',
// maxPrice:'',
desc:'',
},
@ -402,7 +402,7 @@ export default {
{ value: this.form.areaCode, name: '所在城市不能为空' },
{ value: this.form.mileage, name: '行驶里程不能为空' },
{ value: this.form.contactNumber, name: '联系方式不能为空' },
{ value: this.form.maxPrice, name: '售价不能为空' },
{ value: this.form.minPrice, name: '售价不能为空' },
];
},
},

View File

@ -19,7 +19,7 @@
</template>
<script>
import {ocrHandler, uploadImage} from "@/api/mine";
import {unifiedOCRWithCompress, uploadImage} from "@/api/mine";
export default {
name: "uploadCommon",
@ -96,7 +96,7 @@ export default {
file.uid = Date.now(); // 使用时间戳作为唯一标识符
if (this.text == '行驶证照片') {
// 行驶证识别
let result = await ocrHandler({
let result = await unifiedOCRWithCompress({
ocrType: 3,
imageUrl: res.data,
cardSide: 'FRONT'
@ -104,7 +104,7 @@ export default {
let data = {url: res?.data, info: {...result?.data?.frontInfo}}
this.$emit('success1', data)
} else if (this.text == '车辆45度照') {
let result = await ocrHandler({
let result = await unifiedOCRWithCompress({
ocrType: 10,
imageUrl: res.data,
cardSide: 'FRONT'