购物车打包费和餐位费封装

This commit is contained in:
wwz
2025-03-05 18:34:34 +08:00
parent b40af3ea23
commit 56799f41f6
3 changed files with 78 additions and 7 deletions

View File

@@ -182,7 +182,7 @@ export const productStore = defineStore('product', {
uni.cache.set('shopTable', res.shopTable)
// 台桌信息
uni.cache.set('shopInfo', res.shopInfo)
uni.cache.set('shopId', res.shopTable.shopId,30)
uni.cache.set('shopId', res.shopTable.shopId, 30)
// 当前用户距离店铺的米数
uni.cache.set('distance', res.distance)
@@ -199,7 +199,7 @@ export const productStore = defineStore('product', {
return new Promise(async (resolve, reject) => {
try {
let res = await APIshopUserInfo()
uni.cache.set('userInfo', res);
uni.cache.set('shopUserInfo', res);
resolve(true)
} catch (e) {
reject(false)
@@ -212,12 +212,13 @@ export const productStore = defineStore('product', {
actionsAPIuser() {
return new Promise(async (resolve, reject) => {
try {
// 获取店铺用户会员信息
if (uni.cache.get('shopId')) {
this.actionsproductqueryProduct()
} else {
let res = await APIuser()
uni.cache.set('userInfo', res);
}
let res = await APIuser()
uni.cache.set('userInfo', res);
// }
resolve(true)
} catch (e) {
reject(false)