From f4fd489475500b0d41dde019963307d217321d50 Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期日, 20 十月 2024 20:30:49 +0800
Subject: [PATCH] update 定位

---
 store/index.js |   32 +++++++++++++++++++++++++++++---
 1 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/store/index.js b/store/index.js
index 71274a5..59b090f 100644
--- a/store/index.js
+++ b/store/index.js
@@ -32,8 +32,15 @@
 			'delivery': 0,
 			'order': 0,
 			'shopnum': 0,
+			'coupon': 0,
+			'cache_topay':0,
 		},
-		defaultaddress: {}
+		cache: {
+			coupon: {},
+			goods:[],
+		},
+		defaultaddress: {},
+		addressDesc:'',
 	},
 	mutations: {
 
@@ -55,13 +62,19 @@
 			state.currentInfo = {}
 			storage.removeItem('token')
 			message.showToast('退出登录成功')
-		 
+
 		},
 		setOpenid(state, openid) {
 			state.openid = openid
 		},
 		setDefaultAddress(state, defaultaddress) {
 			state.defaultaddress = defaultaddress
+		},
+		setAddressDesc(state, addressDesc) {
+			console.log('setAddressDesc',addressDesc)
+			state.addressDesc = addressDesc
+			storage.setItem("defaultaddress",addressDesc || "")
+			
 		},
 		setTestTrue(state) {
 			state.testvuex = true
@@ -119,6 +132,19 @@
 			console.log('sign_clear', key)
 			state.sign[key] = 0
 		},
+		cache_coupon_select: async function({
+			commit,
+			state
+		}, dto) {
+			state.cache['coupon'] = dto || {}
+		},
+		cache_goods_select: async function({
+			commit,
+			state
+		}, goods) {
+			state.cache['goods'] = goods || []
+		},
+		
 		// lazy loading openid
 		logout: async function({
 			commit,
@@ -352,7 +378,7 @@
 						console.log("启用结果2:", ret);
 					});
 					// #endif
-				 
+
 					uni.reLaunch({
 						url: '/pages/home/supplier-home'
 					})

--
Gitblit v1.9.3