diff --git a/src/App.vue b/src/App.vue
index 6e9eb31..e7179f0 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -28,14 +28,6 @@ const tabbar: TabbarItem[] = [
launchParam: ["selfMerchant"],
auth: ["user"],
},
- {
- pagePath: "pages/tabbar/onlineShop",
- text: "在线商城",
- iconPath: "/static/tabbar/online-shop.png",
- selectedIconPath: "/static/tabbar/online-shop-select.png",
- launchParam: ["onlineShop"],
- auth: ["user"],
- },
{
pagePath: "pages/tabbar/coopMerchant",
text: "合作商家",
@@ -44,6 +36,14 @@ const tabbar: TabbarItem[] = [
launchParam: ["coopMerchant"],
auth: ["user"],
},
+ {
+ pagePath: "pages/tabbar/onlineShop",
+ text: "在线商城",
+ iconPath: "/static/tabbar/online-shop.png",
+ selectedIconPath: "/static/tabbar/online-shop-select.png",
+ launchParam: ["onlineShop"],
+ auth: ["user"],
+ },
{
pagePath: "pages/tabbar/cabinet",
text: "智能柜",
diff --git a/src/components/MeetingTabbar.vue b/src/components/MeetingTabbar.vue
new file mode 100644
index 0000000..0537379
--- /dev/null
+++ b/src/components/MeetingTabbar.vue
@@ -0,0 +1,65 @@
+
+
+
+
+ 首页
+
+
+
+ 我的
+
+
+
+
+
+
+
diff --git a/src/pages.json b/src/pages.json
index 89df648..426bf83 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -472,6 +472,12 @@
"style": {
"navigationBarTitleText": "预约会议"
}
+ },
+ {
+ "path": "meeting/my-reservations",
+ "style": {
+ "navigationBarTitleText": "我的预约"
+ }
}
]
}
@@ -498,13 +504,13 @@
"selectedIconPath": ""
},
{
- "pagePath": "pages/tabbar/onlineShop",
+ "pagePath": "pages/tabbar/coopMerchant",
"text": "",
"iconPath": "",
"selectedIconPath": ""
},
{
- "pagePath": "pages/tabbar/coopMerchant",
+ "pagePath": "pages/tabbar/onlineShop",
"text": "",
"iconPath": "",
"selectedIconPath": ""
diff --git a/src/pages/integrated/meeting/index.vue b/src/pages/integrated/meeting/index.vue
index 0018fcd..aec2f19 100644
--- a/src/pages/integrated/meeting/index.vue
+++ b/src/pages/integrated/meeting/index.vue
@@ -41,11 +41,13 @@
+
+
+
\ No newline at end of file
diff --git a/src/pages/integrated/visitor/myvisitor.vue b/src/pages/integrated/visitor/myvisitor.vue
index 3c67402..a5ee811 100644
--- a/src/pages/integrated/visitor/myvisitor.vue
+++ b/src/pages/integrated/visitor/myvisitor.vue
@@ -59,7 +59,16 @@
暂无访客记录
-
+
+
+
+ 首页
+
+
+
+ 我的
+
+
@@ -480,5 +489,37 @@ onMounted(() => {
color: #999;
font-size: 26rpx;
}
+
+ .tabbar {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ height: 100rpx;
+ background: #fff;
+ display: flex;
+ border-top: 1px solid #eee;
+ z-index: 999;
+ }
+
+ .tabbar-item {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ color: #888;
+ font-size: 24rpx;
+ }
+
+ .tabbar-icon {
+ width: 48rpx;
+ height: 48rpx;
+ margin-bottom: 4rpx;
+ }
+
+ .tabbar-item.active {
+ color: #1777FF;
+ }
}
diff --git a/src/pages/shop/detail.vue b/src/pages/shop/detail.vue
index eaae7fb..66bf25f 100644
--- a/src/pages/shop/detail.vue
+++ b/src/pages/shop/detail.vue
@@ -27,7 +27,7 @@
- {{ state.detail.phone }}
+ {{ state.detail.phone?.slice(0, 11) }}
-
+
-
+
@@ -337,7 +337,7 @@ const doPhone = () => {
return
}
;(window as any).dd
- .callPhone({ phoneNum: state.detail.phone })
+ .callPhone({ phoneNum: state.detail.phone.slice(0, 11) })
.then((res) => {})
.catch((err) => {})
}
diff --git a/src/pages/tabbar/onlineShop.vue b/src/pages/tabbar/onlineShop.vue
index 619f187..e2d2d69 100644
--- a/src/pages/tabbar/onlineShop.vue
+++ b/src/pages/tabbar/onlineShop.vue
@@ -18,14 +18,15 @@
欢迎选购
-
-
+
+
{{ state.curMerchant.name }}
-
+
-
+
搜索
@@ -51,7 +53,7 @@
{
await getAllMerchant()
await getClassify()
+ cartStore.saveShopMerchantId(state.curMerchant.id)
await cartStore.getShopCart()
})
@@ -209,6 +212,7 @@ const getClassify = async () => {
if (state.curMerchant.id) {
const { data } = await shopApi.getSupermarketSpuCategory({ merchantId: state.curMerchant.id })
state.classifyList = data ?? []
+ state.classifyList.unshift({ id: "", name: "全部分类" })
if (!isEmpty(state.classifyList)) {
state.params.categoryId = state.classifyList[0].id
pageRef.value && pageRef.value.reload(true)
@@ -227,11 +231,13 @@ const confirmRadioMerchant = async () => {
state.curMerchant = state.merchantList.find((item: any) => item.id == state.curMerchantRadioId)
state.showDrawer = false
await getClassify()
+ cartStore.saveShopMerchantId(state.curMerchant.id)
await cartStore.getShopCart()
}
// 点击搜索
const searchProduct = () => {
+ state.params.categoryId = ""
pageRef.value && pageRef.value.reload(true)
}
diff --git a/src/sheep/stores/cart.ts b/src/sheep/stores/cart.ts
index d94f394..0174104 100644
--- a/src/sheep/stores/cart.ts
+++ b/src/sheep/stores/cart.ts
@@ -4,36 +4,26 @@ import { foodApi } from "../api"
export const useCartStore = defineStore("cartStore", {
state: () => ({
cart: JSON.parse(uni.getStorageSync("cart") || "[]"),
+ shopMerchantId: uni.getStorageSync("shopMerchantId") || "",
}),
getters: {
totCount(state) {
- return state.cart.reduce((prev, cur) => {
+ return state.cart.reduce((prev: string, cur: any) => {
return prev + cur.productCount
}, 0)
},
totPrice(state) {
return state.cart
- .map((item) => Number(item.totalPrice))
- .reduce((prev, cur) => prev + cur, 0)
+ .map((item: any) => Number(item.totalPrice))
+ .reduce((prev: number, cur: number) => prev + cur, 0)
.toFixed(2)
},
},
actions: {
- // 更新购物车中商品数量的方法
- updataGoodsCount(goods) {
- // 从购物车数组对象中查找到需要更新的这件商品
- const findResult = this.cart.find((item) => {
- return item.goods_id === goods.goods_id
- })
- // 如果查找到,就把这件商品传递的最新数量保存,并本地存储
- if (findResult) {
- findResult.goods_count = goods.goods_count
- this.saveToStorage()
- }
+ saveShopMerchantId(shopMerchantId: string) {
+ this.shopMerchantId = shopMerchantId
+ uni.setStorageSync("shopMerchantId", this.shopMerchantId)
},
-
- // ===================================================================
-
saveToStorage() {
uni.setStorageSync("cart", JSON.stringify(this.cart))
},
@@ -71,7 +61,7 @@ export const useCartStore = defineStore("cartStore", {
await this.getShopCart()
},
async getShopCart() {
- const { data } = await foodApi.getShopCar({ merchantId: "1931916121241079810", hardType: "SUPERMARKET" })
+ const { data } = await foodApi.getShopCar({ merchantId: this.shopMerchantId, hardType: "SUPERMARKET" })
this.saveShoppingCart(data ?? [])
},
async updateShopCart() {
@@ -83,7 +73,7 @@ export const useCartStore = defineStore("cartStore", {
productId: v.productId,
}
})
- const { code }: any = await foodApi.updateShopCar({ merchantId: "1931916121241079810", list, hardType: "SUPERMARKET" })
+ const { code }: any = await foodApi.updateShopCar({ merchantId: this.shopMerchantId, list, hardType: "SUPERMARKET" })
if (code == 0) return await this.getShopCart()
uni.showToast({ title: "更新购物车失败", icon: "none" })
},
diff --git a/src/static/page/address-blue.svg b/src/static/page/address-blue.svg
new file mode 100644
index 0000000..7b016f9
--- /dev/null
+++ b/src/static/page/address-blue.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/static/page/arrow-down-s-fill.svg b/src/static/page/arrow-down-s-fill.svg
new file mode 100644
index 0000000..25711a6
--- /dev/null
+++ b/src/static/page/arrow-down-s-fill.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/static/tabbar/menu-select.png b/src/static/tabbar/menu-select.png
new file mode 100644
index 0000000..db56e6f
Binary files /dev/null and b/src/static/tabbar/menu-select.png differ
diff --git a/src/static/tabbar/menu.png b/src/static/tabbar/menu.png
new file mode 100644
index 0000000..4176657
Binary files /dev/null and b/src/static/tabbar/menu.png differ