产线转运
This commit is contained in:
@@ -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 = ''
|
||||
|
||||
Reference in New Issue
Block a user