123
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user