二手车交易,识别接口更换
This commit is contained in:
@ -308,3 +308,12 @@ export function ocrHandler(data){
|
|||||||
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
|
||||||
|
})
|
||||||
|
}
|
@ -171,7 +171,7 @@ export default {
|
|||||||
areaCode:'',
|
areaCode:'',
|
||||||
mileage:'',
|
mileage:'',
|
||||||
contactNumber:'',
|
contactNumber:'',
|
||||||
minPrice:0,
|
minPrice:'',
|
||||||
// maxPrice:'',
|
// maxPrice:'',
|
||||||
desc:'',
|
desc:'',
|
||||||
},
|
},
|
||||||
@ -402,7 +402,7 @@ export default {
|
|||||||
{ value: this.form.areaCode, name: '所在城市不能为空' },
|
{ value: this.form.areaCode, name: '所在城市不能为空' },
|
||||||
{ value: this.form.mileage, name: '行驶里程不能为空' },
|
{ value: this.form.mileage, name: '行驶里程不能为空' },
|
||||||
{ value: this.form.contactNumber, name: '联系方式不能为空' },
|
{ value: this.form.contactNumber, name: '联系方式不能为空' },
|
||||||
{ value: this.form.maxPrice, name: '售价不能为空' },
|
{ value: this.form.minPrice, name: '售价不能为空' },
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {ocrHandler, uploadImage} from "@/api/mine";
|
import {unifiedOCRWithCompress, uploadImage} from "@/api/mine";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "uploadCommon",
|
name: "uploadCommon",
|
||||||
@ -96,7 +96,7 @@ export default {
|
|||||||
file.uid = Date.now(); // 使用时间戳作为唯一标识符
|
file.uid = Date.now(); // 使用时间戳作为唯一标识符
|
||||||
if (this.text == '行驶证照片') {
|
if (this.text == '行驶证照片') {
|
||||||
// 行驶证识别
|
// 行驶证识别
|
||||||
let result = await ocrHandler({
|
let result = await unifiedOCRWithCompress({
|
||||||
ocrType: 3,
|
ocrType: 3,
|
||||||
imageUrl: res.data,
|
imageUrl: res.data,
|
||||||
cardSide: 'FRONT'
|
cardSide: 'FRONT'
|
||||||
@ -104,7 +104,7 @@ export default {
|
|||||||
let data = {url: res?.data, info: {...result?.data?.frontInfo}}
|
let data = {url: res?.data, info: {...result?.data?.frontInfo}}
|
||||||
this.$emit('success1', data)
|
this.$emit('success1', data)
|
||||||
} else if (this.text == '车辆45度照') {
|
} else if (this.text == '车辆45度照') {
|
||||||
let result = await ocrHandler({
|
let result = await unifiedOCRWithCompress({
|
||||||
ocrType: 10,
|
ocrType: 10,
|
||||||
imageUrl: res.data,
|
imageUrl: res.data,
|
||||||
cardSide: 'FRONT'
|
cardSide: 'FRONT'
|
||||||
|
Reference in New Issue
Block a user