diff --git a/pkg_join/views/supplier.vue b/pkg_join/views/supplier.vue index eee1e60..60e4a5b 100644 --- a/pkg_join/views/supplier.vue +++ b/pkg_join/views/supplier.vue @@ -698,6 +698,19 @@ export default { onLoad(options) { this.partnerId = options.partnerId || '' const type = options.type + const local = uni.getStorageSync(type) + this.formSupplier = local || { + name: '', + avatar: '', + contact: '', + phone: '', + captcha: '', + qualification: '', + subType: '', + area: '', + address: '', + position: '' + } this.formSupplier.subType = type if (type === 'goods_supplier') { this.infoTitle = '特产' @@ -711,6 +724,9 @@ export default { }) this.init() }, + onUnload() { + uni.setStorageSync(this.formSupplier.subType, this.formSupplier) + }, onReady() { this.$refs.shopForm.setRules(this.rules) this.$refs.supplierForm.setRules(this.rulesSupplier)