Fix:5824 【商城小程序】【商户入驻】进入任意接口入驻页面时,先闪现未填写资料界面,过几秒才会显示已填写的资料页面
This commit is contained in:
@@ -520,6 +520,7 @@ export default {
|
|||||||
onLoad(opts) {
|
onLoad(opts) {
|
||||||
this.partnerId = opts.partnerId || ''
|
this.partnerId = opts.partnerId || ''
|
||||||
this.promoterUid = opts.promoterUid || ''
|
this.promoterUid = opts.promoterUid || ''
|
||||||
|
uni.showLoading({ title: '加载中...', mask: true })
|
||||||
this.queryCity()
|
this.queryCity()
|
||||||
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({ data }) => {
|
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({ data }) => {
|
||||||
this.notice = formatRichText(data.merchantApplyNotice)
|
this.notice = formatRichText(data.merchantApplyNotice)
|
||||||
@@ -530,6 +531,8 @@ export default {
|
|||||||
this.experienceStoreCategoryIndex = 0
|
this.experienceStoreCategoryIndex = 0
|
||||||
}
|
}
|
||||||
this.initInfo()
|
this.initInfo()
|
||||||
|
}).catch(() => {
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
@@ -576,6 +579,8 @@ export default {
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.form.isDraft = 1
|
this.form.isDraft = 1
|
||||||
this.show = true
|
this.show = true
|
||||||
|
}).finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeAgree(e) {
|
changeAgree(e) {
|
||||||
|
|||||||
@@ -707,6 +707,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
|
uni.showLoading({ title: '加载中...', mask: true })
|
||||||
getCity().then(({data}) => {
|
getCity().then(({data}) => {
|
||||||
this.district = data
|
this.district = data
|
||||||
})
|
})
|
||||||
@@ -726,6 +727,8 @@ export default {
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.initInfo()
|
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.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}`
|
this.form.area = `${this.form.provinceName} ${this.form.cityName} ${this.form.areaName}`
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
chooseLogoImg(target) {
|
chooseLogoImg(target) {
|
||||||
|
|||||||
@@ -889,6 +889,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
|
uni.showLoading({ title: '加载中...', mask: true })
|
||||||
getCity().then(({data}) => {
|
getCity().then(({data}) => {
|
||||||
this.district = data
|
this.district = data
|
||||||
})
|
})
|
||||||
@@ -897,6 +898,8 @@ export default {
|
|||||||
this.columnsSupplierType = data.supplierTypeList
|
this.columnsSupplierType = data.supplierTypeList
|
||||||
this.notice = formatRichText(data.merchantApplyNotice)
|
this.notice = formatRichText(data.merchantApplyNotice)
|
||||||
this.initInfo()
|
this.initInfo()
|
||||||
|
}).catch(() => {
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
initInfo() {
|
initInfo() {
|
||||||
@@ -978,6 +981,8 @@ export default {
|
|||||||
this.formSupplier.position = this.$forceToDecimal(this.formSupplier.longitude, 6) + ',' + this.$forceToDecimal(this.formSupplier.latitude, 6)
|
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 || ''}`
|
this.formSupplier.area = `${this.formSupplier.provinceName || ''} ${this.formSupplier.cityName || ''} ${this.formSupplier.areaName || ''}`
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
chooseLogoImg(target) {
|
chooseLogoImg(target) {
|
||||||
|
|||||||
@@ -469,10 +469,13 @@ export default {
|
|||||||
onLoad(opts) {
|
onLoad(opts) {
|
||||||
this.partnerId = opts.partnerId || ''
|
this.partnerId = opts.partnerId || ''
|
||||||
this.promoterUid = opts.promoterUid || ''
|
this.promoterUid = opts.promoterUid || ''
|
||||||
|
uni.showLoading({ title: '加载中...', mask: true })
|
||||||
this.queryCity()
|
this.queryCity()
|
||||||
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
|
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
|
||||||
this.notice = formatRichText(data.merchantApplyNotice)
|
this.notice = formatRichText(data.merchantApplyNotice)
|
||||||
this.initInfo()
|
this.initInfo()
|
||||||
|
}).catch(() => {
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// onShow() {
|
// onShow() {
|
||||||
@@ -571,6 +574,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
// uni.$u.toast(err.msg)
|
// uni.$u.toast(err.msg)
|
||||||
|
}).finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -155,33 +155,16 @@
|
|||||||
<view class="licence-image">
|
<view class="licence-image">
|
||||||
<u-cell :border="false">
|
<u-cell :border="false">
|
||||||
<template #title>
|
<template #title>
|
||||||
<view class="box-upload" @click="chooseLogoImg('licence')">
|
<u-upload
|
||||||
<view
|
:maxCount="9"
|
||||||
v-if="!form.qualification"
|
:fileList="quaPics"
|
||||||
class="btn-upload"
|
:disabled="reviewing"
|
||||||
>上传图片</view>
|
:deletable="!reviewing"
|
||||||
<view v-else>
|
name="quaPics"
|
||||||
<view v-if="qualificationArr.length > 0" class="flex">
|
multiple
|
||||||
<view
|
@afterRead="quaAfterRead"
|
||||||
v-for="(item, index) in qualificationArr"
|
@delete="quaDeletePic"
|
||||||
:key="index"
|
/>
|
||||||
class="img-wrap"
|
|
||||||
>
|
|
||||||
<image
|
|
||||||
:src="item"
|
|
||||||
class="img-preview"
|
|
||||||
/>
|
|
||||||
<view
|
|
||||||
v-if="!reviewing"
|
|
||||||
class="delete-badge"
|
|
||||||
@click.stop="deleteImg('qualification', index)"
|
|
||||||
>
|
|
||||||
x
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
</view>
|
</view>
|
||||||
@@ -269,7 +252,7 @@
|
|||||||
import CitySelect from '@/components/CitySelect'
|
import CitySelect from '@/components/CitySelect'
|
||||||
import {getShopData, getWholesaler, removeApply, saveWholesaler, saveWholesalerDraft} from '@/api/join'
|
import {getShopData, getWholesaler, removeApply, saveWholesaler, saveWholesalerDraft} from '@/api/join'
|
||||||
import {getCity, registerVerify} from '@/api/user'
|
import {getCity, registerVerify} from '@/api/user'
|
||||||
import {chooseImage, formatRichText} from '@/utils'
|
import {chooseImage, uploadImage, formatRichText} from '@/utils'
|
||||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -344,7 +327,7 @@ export default {
|
|||||||
},
|
},
|
||||||
district: [],
|
district: [],
|
||||||
address: {},
|
address: {},
|
||||||
qualificationArr: [],
|
quaPics: [],
|
||||||
isAgree: false,
|
isAgree: false,
|
||||||
show: false,
|
show: false,
|
||||||
notice: '',
|
notice: '',
|
||||||
@@ -411,12 +394,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
|
uni.showLoading({ title: '加载中...', mask: true })
|
||||||
getCity().then(({data}) => {
|
getCity().then(({data}) => {
|
||||||
this.district = data
|
this.district = data
|
||||||
})
|
})
|
||||||
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
|
getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
|
||||||
this.notice = formatRichText(data.merchantApplyNotice)
|
this.notice = formatRichText(data.merchantApplyNotice)
|
||||||
this.initInfo()
|
this.initInfo()
|
||||||
|
}).catch(() => {
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
initInfo() {
|
initInfo() {
|
||||||
@@ -448,35 +434,48 @@ export default {
|
|||||||
}
|
}
|
||||||
if (data.wholesalerInfo) {
|
if (data.wholesalerInfo) {
|
||||||
this.form = data.wholesalerInfo
|
this.form = data.wholesalerInfo
|
||||||
|
this.quaPics = []
|
||||||
if (this.form.qualification) {
|
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.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(' ')
|
this.form.area = [this.form.provinceName, this.form.cityName, this.form.areaName].filter(Boolean).join(' ')
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
chooseLogoImg(target) {
|
chooseLogoImg(target) {
|
||||||
if (this.reviewing) return
|
if (this.reviewing) return
|
||||||
chooseImage(img => {
|
chooseImage(img => {
|
||||||
switch (target) {
|
if (target === 'avatar') {
|
||||||
case 'avatar':
|
this.form.avatar = img
|
||||||
this.form.avatar = img
|
|
||||||
break
|
|
||||||
case 'licence':
|
|
||||||
this.form.qualification = img
|
|
||||||
this.qualificationArr = [img]
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 删除图片
|
// 删除头像
|
||||||
deleteImg(target, index) {
|
deleteImg(target) {
|
||||||
if (target === 'avatar') {
|
if (target === 'avatar') {
|
||||||
this.form.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
|
this.form.areaId = values.district.id
|
||||||
},
|
},
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
|
this.buildQualification()
|
||||||
this.$refs.wholesalerForm.validate().then(res => {
|
this.$refs.wholesalerForm.validate().then(res => {
|
||||||
// 校验通过
|
// 校验通过
|
||||||
saveWholesaler(this.form).then(res => {
|
saveWholesaler(this.form).then(res => {
|
||||||
@@ -564,7 +563,16 @@ export default {
|
|||||||
},
|
},
|
||||||
saveDraft() {
|
saveDraft() {
|
||||||
if (this.reviewing) return
|
if (this.reviewing) return
|
||||||
|
this.buildQualification()
|
||||||
saveWholesalerDraft(this.form)
|
saveWholesalerDraft(this.form)
|
||||||
|
},
|
||||||
|
buildQualification() {
|
||||||
|
this.form.qualification = ''
|
||||||
|
const tempArr = []
|
||||||
|
this.quaPics.map(item => {
|
||||||
|
item.url && tempArr.push(item.url)
|
||||||
|
})
|
||||||
|
this.form.qualification = tempArr.join(',')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user