|
@@ -27,6 +27,7 @@
|
|
|
<div class="upload-label">正面</div>
|
|
<div class="upload-label">正面</div>
|
|
|
<el-upload
|
|
<el-upload
|
|
|
v-model:file-list="idCardFrontList"
|
|
v-model:file-list="idCardFrontList"
|
|
|
|
|
+ action="#"
|
|
|
:http-request="handleHttpUpload"
|
|
:http-request="handleHttpUpload"
|
|
|
list-type="picture-card"
|
|
list-type="picture-card"
|
|
|
:limit="1"
|
|
:limit="1"
|
|
@@ -52,6 +53,7 @@
|
|
|
<div class="upload-label">反面</div>
|
|
<div class="upload-label">反面</div>
|
|
|
<el-upload
|
|
<el-upload
|
|
|
v-model:file-list="idCardBackList"
|
|
v-model:file-list="idCardBackList"
|
|
|
|
|
+ action="#"
|
|
|
:http-request="handleHttpUpload"
|
|
:http-request="handleHttpUpload"
|
|
|
list-type="picture-card"
|
|
list-type="picture-card"
|
|
|
:limit="1"
|
|
:limit="1"
|
|
@@ -234,6 +236,7 @@
|
|
|
<el-form-item label="营业执照" prop="businessLicenseAddress">
|
|
<el-form-item label="营业执照" prop="businessLicenseAddress">
|
|
|
<el-upload
|
|
<el-upload
|
|
|
v-model:file-list="step2Form.businessLicenseAddress"
|
|
v-model:file-list="step2Form.businessLicenseAddress"
|
|
|
|
|
+ action="#"
|
|
|
:http-request="handleHttpUpload"
|
|
:http-request="handleHttpUpload"
|
|
|
list-type="picture-card"
|
|
list-type="picture-card"
|
|
|
:limit="1"
|
|
:limit="1"
|
|
@@ -251,6 +254,7 @@
|
|
|
<el-form-item label="其他资质证明" prop="disportLicenceImgList">
|
|
<el-form-item label="其他资质证明" prop="disportLicenceImgList">
|
|
|
<el-upload
|
|
<el-upload
|
|
|
v-model:file-list="step2Form.disportLicenceImgList"
|
|
v-model:file-list="step2Form.disportLicenceImgList"
|
|
|
|
|
+ action="#"
|
|
|
:http-request="handleHttpUpload"
|
|
:http-request="handleHttpUpload"
|
|
|
:limit="20"
|
|
:limit="20"
|
|
|
list-type="picture-card"
|
|
list-type="picture-card"
|
|
@@ -338,7 +342,8 @@ import { ElMessage, ElMessageBox, type FormInstance, type FormRules, UploadUserF
|
|
|
import { Plus, ArrowRightBold, Check } from "@element-plus/icons-vue";
|
|
import { Plus, ArrowRightBold, Check } from "@element-plus/icons-vue";
|
|
|
|
|
|
|
|
import { applyStore, getMerchantByPhone, getThirdLevelList, verifyIdInfo } from "@/api/modules/homeEntry";
|
|
import { applyStore, getMerchantByPhone, getThirdLevelList, verifyIdInfo } from "@/api/modules/homeEntry";
|
|
|
-import { getInputPrompt, getDistrict, uploadImg, ocrRequestUrl, getAiapprovestoreInfo } from "@/api/modules/newLoginApi";
|
|
|
|
|
|
|
+import { getInputPrompt, getDistrict, ocrRequestUrl, getAiapprovestoreInfo } from "@/api/modules/newLoginApi";
|
|
|
|
|
+import { uploadFileToOss } from "@/api/upload.js";
|
|
|
import GoBusinessHours from "./go-businessHours.vue";
|
|
import GoBusinessHours from "./go-businessHours.vue";
|
|
|
import { localGet, localSet } from "@/utils/index";
|
|
import { localGet, localSet } from "@/utils/index";
|
|
|
import { useAuthStore } from "@/stores/modules/auth";
|
|
import { useAuthStore } from "@/stores/modules/auth";
|
|
@@ -881,13 +886,16 @@ const selectAddress = async () => {
|
|
|
latShow.value = true;
|
|
latShow.value = true;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-//文件上传
|
|
|
|
|
|
|
+/** 商家入驻证件/资质上传:同源 /ai-upload/upload/simple,Nginx 反代至 uat 上传服务 */
|
|
|
const handleHttpUpload = async (options: UploadRequestOptions) => {
|
|
const handleHttpUpload = async (options: UploadRequestOptions) => {
|
|
|
- let formData = new FormData();
|
|
|
|
|
- formData.append("file", options.file);
|
|
|
|
|
|
|
+ const raw = options.file;
|
|
|
|
|
+ const file = raw instanceof File ? raw : (raw as UploadUserFile)?.raw;
|
|
|
|
|
+ if (!(file instanceof File)) {
|
|
|
|
|
+ options.onError(new Error("无效的上传文件") as any);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
try {
|
|
try {
|
|
|
- const res: any = await uploadImg(formData);
|
|
|
|
|
- const fileUrl = res?.data?.fileUrl || res?.data?.[0] || res?.fileUrl;
|
|
|
|
|
|
|
+ const fileUrl = await uploadFileToOss(file, "image", { skipSimpleUploadOverlay: true });
|
|
|
if (fileUrl) {
|
|
if (fileUrl) {
|
|
|
options.onSuccess({ fileUrl });
|
|
options.onSuccess({ fileUrl });
|
|
|
} else {
|
|
} else {
|