diff --git a/pkg_join/views/supplier.vue b/pkg_join/views/supplier.vue index eebe0b8..ee8bc44 100644 --- a/pkg_join/views/supplier.vue +++ b/pkg_join/views/supplier.vue @@ -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)