产线转运

This commit is contained in:
2026-03-17 10:50:56 +08:00
parent eb810f1808
commit 78d20c178b

View File

@@ -96,6 +96,10 @@
onLoad (options) {
this.title = options.title
},
// 使用 onShow 确保每次进入页面(包括从后台切回)都能读取最新的缓存值
onShow() {
this.loadSelectedValue();
},
created () {
this._getRegion()
},
@@ -112,11 +116,22 @@
this.options2 = []
}
},
// 从缓存加载选中的值
loadSelectedValue() {
if (uni.getStorageSync('selectedSiteType')) {
this.index = uni.getStorageSync('selectedSiteType')
}
if (uni.getStorageSync('selectedMbqy')) {
this.index2 = uni.getStorageSync('selectedMbqy')
}
},
selectChange (e) {
this.index = e
uni.setStorageSync('selectedSiteType', e)
},
selectChange2 (e) {
this.index2 = e
uni.setStorageSync('selectedMbqy', e)
},
clearUp () {
this.val1 = ''