From 7a68f7e13913f8d4f86962979fd1e79c18f57fb6 Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期六, 03 八月 2024 10:44:25 +0800
Subject: [PATCH] update 登录和其他部分信息

---
 pages/user/address/address.vue |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/pages/user/address/address.vue b/pages/user/address/address.vue
index 5a7fc55..e320be3 100644
--- a/pages/user/address/address.vue
+++ b/pages/user/address/address.vue
@@ -221,10 +221,17 @@
 				if (this.regionDataPlus && this.regionDataPlus.length > 0) {
 					
 				}else{
-					const res = await this.$http.request('get', '/api/pub/china/area/json')
-					this.regionDataPlus = res.data && JSON.parse(res.data.replaceAll('code', 'value').replaceAll(
-						'name',
-						'text')) || []
+					var a = this.$storage.getItem('cache_area')
+					if (a) {
+						this.regionDataPlus = JSON.parse(a) || []
+					} else {
+						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(
+							'name',
+							'text')) || []
+						this.$storage.setItem('cache_area', JSON.stringify(this.regionDataPlus))
+					}
 				}
 
 			},

--
Gitblit v1.9.3