refactor(webapp): 重构发票验证功能
- 修改基础 URL为本地地址 - 优化发票验证和列表查询逻辑 - 更新数据库结构和查询语句 - 改进前端发票管理页面,增加验证结果展示 - 修复后端发票列表接口,支持 JSON 请求
This commit is contained in:
@@ -107,7 +107,7 @@ const emit= defineEmits(['update:formState'])
|
||||
|
||||
const fileType = ref<string>('img')
|
||||
onMounted(() => {
|
||||
alert(props.filePath)
|
||||
// alert(props.filePath)
|
||||
if(props.filePath){
|
||||
fileType.value = props.filePath.split('.').pop() ==='pdf'?'pdf':'img'
|
||||
request.get('/recognize?filePath='+encodeURIComponent(props.filePath)).then((res) => {
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
// SmileOutlined,
|
||||
} from '@ant-design/icons-vue'
|
||||
import type {StepProps} from "ant-design-vue"
|
||||
import Check from './Check.vue'
|
||||
import Check from './Check.vue'
|
||||
import upload from './upload.vue'
|
||||
import Report from "./report.vue"
|
||||
// 步骤
|
||||
|
||||
@@ -35,7 +35,8 @@ const handleUpload = (options: any) => {
|
||||
if (xhr.status === 200 || xhr.status === 201) {
|
||||
console.log(xhr.responseText);
|
||||
onSuccess(xhr.responseText, file);
|
||||
emit('update:filePath', xhr.responseText)
|
||||
let res = JSON.parse(xhr.responseText)
|
||||
emit('update:filePath', res.file_path)
|
||||
} else {
|
||||
onError(new Error(`Upload failed with status ${xhr.status}`));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user