From 2062046901d2af7d64bc83e0c62f6d7384b08dee Mon Sep 17 00:00:00 2001 From: linxi <957440651@qq.com> Date: Thu, 20 Aug 2026 15:59:59 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A5824=20=E3=80=90=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E3=80=91=E3=80=90=E5=95=86=E6=88=B7?= =?UTF-8?q?=E5=85=A5=E9=A9=BB=E3=80=91=E8=BF=9B=E5=85=A5=E4=BB=BB=E6=84=8F?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=85=A5=E9=A9=BB=E9=A1=B5=E9=9D=A2=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=85=88=E9=97=AA=E7=8E=B0=E6=9C=AA=E5=A1=AB=E5=86=99?= =?UTF-8?q?=E8=B5=84=E6=96=99=E7=95=8C=E9=9D=A2=EF=BC=8C=E8=BF=87=E5=87=A0?= =?UTF-8?q?=E7=A7=92=E6=89=8D=E4=BC=9A=E6=98=BE=E7=A4=BA=E5=B7=B2=E5=A1=AB?= =?UTF-8?q?=E5=86=99=E7=9A=84=E8=B5=84=E6=96=99=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg_join/views/experienceStore.vue | 5 ++ pkg_join/views/shop.vue | 5 ++ pkg_join/views/supplier.vue | 5 ++ pkg_join/views/travelResidence.vue | 5 ++ pkg_join/views/wholesaler.vue | 96 ++++++++++++++++-------------- 5 files changed, 72 insertions(+), 44 deletions(-) diff --git a/pkg_join/views/experienceStore.vue b/pkg_join/views/experienceStore.vue index 38ca70d..ecb4844 100644 --- a/pkg_join/views/experienceStore.vue +++ b/pkg_join/views/experienceStore.vue @@ -520,6 +520,7 @@ export default { onLoad(opts) { this.partnerId = opts.partnerId || '' this.promoterUid = opts.promoterUid || '' + uni.showLoading({ title: '加载中...', mask: true }) this.queryCity() getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({ data }) => { this.notice = formatRichText(data.merchantApplyNotice) @@ -530,6 +531,8 @@ export default { this.experienceStoreCategoryIndex = 0 } this.initInfo() + }).catch(() => { + uni.hideLoading() }) }, onUnload() { @@ -576,6 +579,8 @@ export default { }).catch(() => { this.form.isDraft = 1 this.show = true + }).finally(() => { + uni.hideLoading() }) }, changeAgree(e) { diff --git a/pkg_join/views/shop.vue b/pkg_join/views/shop.vue index d9c2737..924f5f0 100644 --- a/pkg_join/views/shop.vue +++ b/pkg_join/views/shop.vue @@ -707,6 +707,7 @@ export default { } }, init() { + uni.showLoading({ title: '加载中...', mask: true }) getCity().then(({data}) => { this.district = data }) @@ -726,6 +727,8 @@ export default { }).catch(() => { this.initInfo() }) + }).catch(() => { + uni.hideLoading() }) }, @@ -801,6 +804,8 @@ export default { this.form.position = this.$forceToDecimal(this.form.longitude, 6) + ',' + this.$forceToDecimal(this.form.latitude, 6) this.form.area = `${this.form.provinceName} ${this.form.cityName} ${this.form.areaName}` } + }).finally(() => { + uni.hideLoading() }) }, chooseLogoImg(target) { diff --git a/pkg_join/views/supplier.vue b/pkg_join/views/supplier.vue index d356d24..b7cad3d 100644 --- a/pkg_join/views/supplier.vue +++ b/pkg_join/views/supplier.vue @@ -889,6 +889,7 @@ export default { } }, init() { + uni.showLoading({ title: '加载中...', mask: true }) getCity().then(({data}) => { this.district = data }) @@ -897,6 +898,8 @@ export default { this.columnsSupplierType = data.supplierTypeList this.notice = formatRichText(data.merchantApplyNotice) this.initInfo() + }).catch(() => { + uni.hideLoading() }) }, initInfo() { @@ -978,6 +981,8 @@ export default { this.formSupplier.position = this.$forceToDecimal(this.formSupplier.longitude, 6) + ',' + this.$forceToDecimal(this.formSupplier.latitude, 6) this.formSupplier.area = `${this.formSupplier.provinceName || ''} ${this.formSupplier.cityName || ''} ${this.formSupplier.areaName || ''}` } + }).finally(() => { + uni.hideLoading() }) }, chooseLogoImg(target) { diff --git a/pkg_join/views/travelResidence.vue b/pkg_join/views/travelResidence.vue index 115a25f..7ee0010 100644 --- a/pkg_join/views/travelResidence.vue +++ b/pkg_join/views/travelResidence.vue @@ -469,10 +469,13 @@ export default { onLoad(opts) { this.partnerId = opts.partnerId || '' this.promoterUid = opts.promoterUid || '' + uni.showLoading({ title: '加载中...', mask: true }) this.queryCity() getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => { this.notice = formatRichText(data.merchantApplyNotice) this.initInfo() + }).catch(() => { + uni.hideLoading() }) }, // onShow() { @@ -571,6 +574,8 @@ export default { } }).catch(err => { // uni.$u.toast(err.msg) + }).finally(() => { + uni.hideLoading() }) }, /** diff --git a/pkg_join/views/wholesaler.vue b/pkg_join/views/wholesaler.vue index b62e2cc..d9c16a2 100644 --- a/pkg_join/views/wholesaler.vue +++ b/pkg_join/views/wholesaler.vue @@ -155,33 +155,16 @@ @@ -269,7 +252,7 @@ import CitySelect from '@/components/CitySelect' import {getShopData, getWholesaler, removeApply, saveWholesaler, saveWholesalerDraft} from '@/api/join' import {getCity, registerVerify} from '@/api/user' -import {chooseImage, formatRichText} from '@/utils' +import {chooseImage, uploadImage, formatRichText} from '@/utils' import { pageListenMixins } from '@/mixins/pageListenMixins' export default { @@ -344,7 +327,7 @@ export default { }, district: [], address: {}, - qualificationArr: [], + quaPics: [], isAgree: false, show: false, notice: '', @@ -411,12 +394,15 @@ export default { } }, init() { + uni.showLoading({ title: '加载中...', mask: true }) getCity().then(({data}) => { this.district = data }) getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => { this.notice = formatRichText(data.merchantApplyNotice) this.initInfo() + }).catch(() => { + uni.hideLoading() }) }, initInfo() { @@ -448,35 +434,48 @@ export default { } if (data.wholesalerInfo) { this.form = data.wholesalerInfo + this.quaPics = [] if (this.form.qualification) { - this.qualificationArr = this.form.qualification.split(',') + this.form.qualification.split(',').map(item => { + if (item) { + this.quaPics.push({url: item}) + } + }) } this.form.position = this.$forceToDecimal(this.form.longitude, 6) + ',' + this.$forceToDecimal(this.form.latitude, 6) this.form.area = [this.form.provinceName, this.form.cityName, this.form.areaName].filter(Boolean).join(' ') } + }).finally(() => { + uni.hideLoading() }) }, chooseLogoImg(target) { if (this.reviewing) return chooseImage(img => { - switch (target) { - case 'avatar': - this.form.avatar = img - break - case 'licence': - this.form.qualification = img - this.qualificationArr = [img] - break + if (target === 'avatar') { + this.form.avatar = img } }) }, - // 删除图片 - deleteImg(target, index) { + // 删除头像 + deleteImg(target) { if (target === 'avatar') { this.form.avatar = '' - } else if (target === 'qualification') { - this.qualificationArr.splice(index, 1) - this.form.qualification = this.qualificationArr.join(',') + } + }, + // 删除商家资质图片 + quaDeletePic(event) { + this[`${event.name}`].splice(event.index, 1) + }, + // 商家资质批量上传 + quaAfterRead(event) { + const that = this + if (event.file.length > 0) { + event.file.map(item => { + uploadImage(item.url, img => { + that.quaPics.push({url: img}) + }) + }) } }, // 省市区 @@ -495,7 +494,7 @@ export default { this.form.areaId = values.district.id }, onSubmit() { - + this.buildQualification() this.$refs.wholesalerForm.validate().then(res => { // 校验通过 saveWholesaler(this.form).then(res => { @@ -564,7 +563,16 @@ export default { }, saveDraft() { if (this.reviewing) return + this.buildQualification() saveWholesalerDraft(this.form) + }, + buildQualification() { + this.form.qualification = '' + const tempArr = [] + this.quaPics.map(item => { + item.url && tempArr.push(item.url) + }) + this.form.qualification = tempArr.join(',') } } }