Fix:3022 【商城小程序】填写申请资料点击返回后再次进入,填写内容未保留(修复为填写内容仍然保留)

This commit is contained in:
modendeveloper
2025-01-19 22:11:27 +08:00
parent e18a5e5c70
commit b07e967e23
+8 -1
View File
@@ -89,6 +89,13 @@ export default {
onLoad: function () { onLoad: function () {
this.init() this.init()
this.getCityList() this.getCityList()
const localData = uni.getStorageSync('investmentIndex')
if (localData) {
this.businessApply = localData
}
},
onUnload() {
uni.setStorageSync('investmentIndex', this.businessApply)
}, },
methods: { methods: {
init() { init() {
@@ -119,7 +126,7 @@ export default {
this.total = data.total this.total = data.total
this.businessApplyList = data.businessApplyList this.businessApplyList = data.businessApplyList
if (data.businessApply) { if (data.businessApply) {
this.businessApply = data.businessApply // this.businessApply = data.businessApply
this.address = { this.address = {
province: data.businessApply.provinceName || "", province: data.businessApply.provinceName || "",
city: data.businessApply.cityName || "", city: data.businessApply.cityName || "",