From 41426416bd250130129fb8a547bee874375768a8 Mon Sep 17 00:00:00 2001
From: 陶杰 <1378534974@qq.com>
Date: 星期四, 14 十一月 2024 09:47:15 +0800
Subject: [PATCH] 1.付款:改成15分钟,并使用服务器时间进行倒计时 2.优惠券中心:已经领取(达到最大次数),显示已领取且置灰,未领取根据创建时间放前面,已领取根据首次时间正序排序 3.购物车-提交订单:自动根据订单金额选择合适优惠券
---
store/index.js | 38 ++++++++++++++++++++++++++++++++++++--
1 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/store/index.js b/store/index.js
index a97699e..7ebfdfd 100644
--- a/store/index.js
+++ b/store/index.js
@@ -32,9 +32,16 @@
'delivery': 0,
'order': 0,
'shopnum': 0,
- 'coupon': 0
+ 'coupon': 0,
+ 'cache_topay':0,
},
- defaultaddress: {}
+ cache: {
+ coupon: {},
+ goods:[],
+ cache_coupon_select_cancel:0
+ },
+ defaultaddress: {},
+ addressDesc:'',
},
mutations: {
@@ -63,6 +70,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 +133,27 @@
console.log('sign_clear', key)
state.sign[key] = 0
},
+ cache_coupon_select: async function({
+ commit,
+ state
+ }, dto) {
+ state.cache['coupon'] = dto || {}
+ },
+
+ cache_coupon_select_cancel: async function({
+ commit,
+ state
+ }, val) {
+ state.cache['cache_coupon_select_cancel'] = val || 0
+ },
+
+ cache_goods_select: async function({
+ commit,
+ state
+ }, goods) {
+ state.cache['goods'] = goods || []
+ },
+
// lazy loading openid
logout: async function({
commit,
--
Gitblit v1.9.3