清楚本地缓存

This commit is contained in:
李彪 2025-05-15 16:37:10 +08:00
parent 89a2325d3f
commit db49a6f0e9
1 changed files with 8 additions and 5 deletions

View File

@ -115,15 +115,15 @@ export default {
console.log(searchType, 'searchType---') console.log(searchType, 'searchType---')
if (searchType === 1) { if (searchType === 1) {
this.selectVal = '筛选' this.selectVal = '筛选'
this.getAreaFn() this.getAreaFn('local')
} }
if (searchType === 2) { if (searchType === 2) {
this.selectVal = '已绑定' this.selectVal = '已绑定'
this.getAreaFn() this.getAreaFn('local')
} }
if (searchType === 3) { if (searchType === 3) {
this.selectVal = '未绑定' this.selectVal = '未绑定'
this.getAreaFn() this.getAreaFn('local')
} }
this.getDataFn() this.getDataFn()
console.log('%c%s', 'color:red', 'onSHow') console.log('%c%s', 'color:red', 'onSHow')
@ -188,7 +188,7 @@ export default {
Object.assign(this.form, res.data) Object.assign(this.form, res.data)
}, },
// //
async getAreaFn() { async getAreaFn(local) {
const res = await GetRegionDataListApi() const res = await GetRegionDataListApi()
console.log(res, '区域数据') console.log(res, '区域数据')
this.tabsList = res.data this.tabsList = res.data
@ -196,6 +196,9 @@ export default {
this.tabCurrentId = this.tabsList[0].id this.tabCurrentId = this.tabsList[0].id
this.getSonAreaFn() this.getSonAreaFn()
} }
if(local){
uni.setStorageSync('search', 0)
}
}, },
// //
closeResFn() { closeResFn() {
@ -325,7 +328,7 @@ export default {
margin-left:20rpx; margin-left:20rpx;
width: 120rpx; width: 120rpx;
height: 60rpx; height: 60rpx;
line-height: 60rpx; // line-height: 60rpx;
border-radius: 20rpx; border-radius: 20rpx;
text-align: center; text-align: center;