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 | 29 +++++++++++++++++++++++++++-- 1 files changed, 27 insertions(+), 2 deletions(-) diff --git a/store/index.js b/store/index.js index a97699e..59b090f 100644 --- a/store/index.js +++ b/store/index.js @@ -32,9 +32,15 @@ 'delivery': 0, 'order': 0, 'shopnum': 0, - 'coupon': 0 + 'coupon': 0, + 'cache_topay':0, }, - defaultaddress: {} + cache: { + coupon: {}, + goods:[], + }, + defaultaddress: {}, + addressDesc:'', }, mutations: { @@ -63,6 +69,12 @@ }, 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 @@ -120,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, -- Gitblit v1.9.3