xuxueyang
2024-10-20 f4fd489475500b0d41dde019963307d217321d50
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,