From 99730c8890388fc2131c2b38146d966e7ef33d17 Mon Sep 17 00:00:00 2001 From: 陶杰 <1378534974@qq.com> Date: 星期三, 18 十二月 2024 09:41:31 +0800 Subject: [PATCH] 1.前端缓存地址特别严重临时性修改 --- pages/user/address/address.vue | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pages/user/address/address.vue b/pages/user/address/address.vue index 964b65a..cee367b 100644 --- a/pages/user/address/address.vue +++ b/pages/user/address/address.vue @@ -439,13 +439,16 @@ } }, async init_area() { - if (this.regionDataPlus && this.regionDataPlus.length > 0) { + // debugger; + // if (this.regionDataPlus && this.regionDataPlus.length > 0) { - } else { - var a = this.$storage.getItem('cache_area') + // } else { + // var a = this.$storage.getItem('cache_area') + var a =false if (a) { this.regionDataPlus = JSON.parse(a) || [] } else { + await this.$http.request('get', '/api/pub/china/area/json/refresh') const res = await this.$http.request('get', '/api/pub/china/area/json') // console.log('area', JSON.parse(res.data)) this.regionDataPlus = res.data && JSON.parse(res.data.replaceAll('code', 'value').replaceAll( @@ -453,7 +456,7 @@ 'text')) || [] this.$storage.setItem('cache_area', JSON.stringify(this.regionDataPlus)) } - } + // } }, chooseLocation() { -- Gitblit v1.9.3