购物车打包费和餐位费封装
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user