This commit is contained in:
张良(004796)
2024-02-23 09:49:34 +08:00
parent 7cfc0583dd
commit 043823c19f
6 changed files with 1180 additions and 58 deletions

View File

@@ -118,6 +118,7 @@ import {resetData} from "@/utils/dataUtil";
import {getAssetsImages, px2vw} from "@/utils";
import {showToast} from "vant";
import {useRouter} from "vue-router";
import {useUpload} from "@/hooks/useUpload";
const idCardKeyboardShow = ref(false)
@@ -179,14 +180,22 @@ const afterReadIdBack = (file) => {
upLoadImage(file, 'cardFrontPicture')
};
const upload = useUpload()
const upLoadImage = (file, flag) => {
uploadCommon(file.file).then(res => {
if (res.data.code == 200) {
userInfo[flag] = res.data.data.url
} else {
showToast('上传失败');
}
upload.aliOssUpload(file, url => {
console.log(url)
userInfo[flag] = url
})
// uploadCommon(file.file).then(res => {
// if (res.data.code == 200) {
// userInfo[flag] = res.data.data.url
// } else {
// showToast('上传失败');
// }
// })
}
const router = useRouter()