Fix:5808 【商城小程序】【商户入驻-文玩供应商】入驻详情页填写资料后返回商户入驻列表页,再次进入时已填写的店铺资料未自动保存

This commit is contained in:
linxi
2026-08-20 10:57:01 +08:00
parent d68f734f95
commit 085730bb9c
+9 -7
View File
@@ -714,7 +714,8 @@ export default {
// 是否为审核中
reviewing: false,
pageKeyId: '',
showUpload: false
showUpload: false,
draftKey: ''
}
},
computed: {
@@ -799,9 +800,10 @@ export default {
this.partnerId = options.partnerId || ''
this.promoterUid = options.promoterUid || ''
const type = options.type
const local = uni.getStorageSync(type) || {}
const local_form = uni.getStorageSync(type + '_form') || {}
this.quaPics = uni.getStorageSync(type + '_quaPics') || []
this.draftKey = type
const local = uni.getStorageSync(this.draftKey) || {}
const local_form = uni.getStorageSync(this.draftKey + '_form') || {}
this.quaPics = uni.getStorageSync(this.draftKey + '_quaPics') || []
console.log(this.quaPics, 'this.quaPics');
if(!local_form.serviceTime) {
@@ -855,9 +857,9 @@ export default {
this.init()
},
onUnload() {
uni.setStorageSync(this.formSupplier.subType, this.formSupplier)
uni.setStorageSync(this.formSupplier.subType+'_quaPics', this.quaPics)
uni.setStorageSync(this.formSupplier.subType + '_form', this.form)
uni.setStorageSync(this.draftKey, this.formSupplier)
uni.setStorageSync(this.draftKey + '_quaPics', this.quaPics)
uni.setStorageSync(this.draftKey + '_form', this.form)
},
onReady() {
this.$refs.shopForm.setRules(this.rules)