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, reviewing: false,
pageKeyId: '', pageKeyId: '',
showUpload: false showUpload: false,
draftKey: ''
} }
}, },
computed: { computed: {
@@ -799,9 +800,10 @@ export default {
this.partnerId = options.partnerId || '' this.partnerId = options.partnerId || ''
this.promoterUid = options.promoterUid || '' this.promoterUid = options.promoterUid || ''
const type = options.type const type = options.type
const local = uni.getStorageSync(type) || {} this.draftKey = type
const local_form = uni.getStorageSync(type + '_form') || {} const local = uni.getStorageSync(this.draftKey) || {}
this.quaPics = uni.getStorageSync(type + '_quaPics') || [] const local_form = uni.getStorageSync(this.draftKey + '_form') || {}
this.quaPics = uni.getStorageSync(this.draftKey + '_quaPics') || []
console.log(this.quaPics, 'this.quaPics'); console.log(this.quaPics, 'this.quaPics');
if(!local_form.serviceTime) { if(!local_form.serviceTime) {
@@ -855,9 +857,9 @@ export default {
this.init() this.init()
}, },
onUnload() { onUnload() {
uni.setStorageSync(this.formSupplier.subType, this.formSupplier) uni.setStorageSync(this.draftKey, this.formSupplier)
uni.setStorageSync(this.formSupplier.subType+'_quaPics', this.quaPics) uni.setStorageSync(this.draftKey + '_quaPics', this.quaPics)
uni.setStorageSync(this.formSupplier.subType + '_form', this.form) uni.setStorageSync(this.draftKey + '_form', this.form)
}, },
onReady() { onReady() {
this.$refs.shopForm.setRules(this.rules) this.$refs.shopForm.setRules(this.rules)