计算购物车钱之前
This commit is contained in:
@@ -36,17 +36,14 @@
|
||||
import {
|
||||
ref,
|
||||
onMounted,
|
||||
reactive
|
||||
reactive,
|
||||
} from "vue";
|
||||
import {
|
||||
onShow,
|
||||
} from '@dcloudio/uni-app'
|
||||
import {
|
||||
APIproductqueryShop
|
||||
} from "@/common/api/product/product.js";
|
||||
import {
|
||||
APIshopExtend
|
||||
} from "@/common/api/index/index.js";
|
||||
import {
|
||||
productStore
|
||||
} from '@/stores/user.js';
|
||||
|
||||
const shopExtend = reactive({
|
||||
autokey: "index_bg",
|
||||
@@ -59,34 +56,11 @@
|
||||
value: ""
|
||||
})
|
||||
const userInfo = uni.cache.get('userInfo')
|
||||
const shopUserInfo = uni.cache.get('shopUserInfo')
|
||||
const shopUserInfo = uni.cache.get('ShopUser')
|
||||
|
||||
const scanCodehandle = (i) => {
|
||||
uni.pro.navigateTo('product/index', {
|
||||
tableCode: uni.cache.get('tableCode')
|
||||
})
|
||||
// uni.scanCode({
|
||||
// success: async (res) => {
|
||||
// let tableCode = getQueryString(decodeURIComponent(res.result), 'code')
|
||||
// uni.cache.set('tableCode', tableCode)
|
||||
// if (tableCode) {
|
||||
// let data = await APIproductqueryShop({
|
||||
// code: uni.cache.get('tableCode'),
|
||||
// })
|
||||
// if (data.data.shopTableInfo && !data.data.shopTableInfo.choseCount) {
|
||||
// uni.pro.navigateTo('/pagesOrder/orderAMeal/index', {
|
||||
// tableCode: tableCode,
|
||||
// shopId: data.data.storeInfo.id,
|
||||
// })
|
||||
// } else {
|
||||
// uni.pro.navigateTo('product/product', {
|
||||
// tableCode: tableCode,
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// fail: () => {}
|
||||
// })
|
||||
const scanCodehandle = async (i) => {
|
||||
const store = productStore();
|
||||
await store.scanCodeactions()
|
||||
}
|
||||
const memberindex = (url) => {
|
||||
uni.pro.navigateTo(url, {
|
||||
@@ -102,12 +76,12 @@
|
||||
}
|
||||
return null;
|
||||
}
|
||||
onShow(async () => {
|
||||
onMounted(async () => {
|
||||
let res = await APIshopExtend({
|
||||
shopId: uni.cache.get('shopId'),
|
||||
autokey: "index_bg" //index_bg my_bg member_bg shopInfo_bg
|
||||
})
|
||||
Object.assign(shopExtend, res.data)
|
||||
Object.assign(shopExtend, res)
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user