diff --git a/src/App.vue b/src/App.vue
index ac5b9d9..f314ac1 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -2,11 +2,6 @@
import { isDevEnv, getLaunchParam } from "@/sheep/utils/app"
import { getAppInfo } from "@@/utils/app"
-// import { onLaunch, onShow, onHide } from "@dcloudio/uni-app"
-// onLaunch(() => {})
-// onShow(() => {})
-// onHide(() => {})
-
interface TabbarItem {
pagePath: string
text: string
@@ -33,6 +28,14 @@ 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: "合作商家",
@@ -54,7 +57,7 @@ const tabbar: TabbarItem[] = [
text: "订单",
iconPath: "/static/tabbar/order.png",
selectedIconPath: "/static/tabbar/order-select.png",
- launchParam: ["canteen", "selfMerchant", "coopMerchant"],
+ launchParam: ["canteen", "selfMerchant", "onlineShop", "coopMerchant"],
auth: ["user"],
},
{
@@ -94,7 +97,7 @@ const tabbar: TabbarItem[] = [
text: "我的",
iconPath: "/static/tabbar/my.png",
selectedIconPath: "/static/tabbar/my-select.png",
- launchParam: ["canteen", "selfMerchant", "coopMerchant"],
+ launchParam: ["canteen", "selfMerchant", "onlineShop", "coopMerchant"],
auth: ["user", "merchant", "doorAdmin"],
},
]
@@ -149,6 +152,9 @@ export default {
case "selfMerchant":
uni.switchTab({ url: "/pages/tabbar/selfMerchant" })
break
+ case "onlineShop":
+ uni.switchTab({ url: "/pages/tabbar/onlineShop" })
+ break
case "coopMerchant":
uni.switchTab({ url: "/pages/tabbar/coopMerchant" })
break
@@ -169,6 +175,7 @@ export default {
return uni.switchTab({ url: "/pages/tabbar/individualOrder" })
case "user":
if (launchParam === "selfMerchant") return uni.switchTab({ url: "/pages/tabbar/selfMerchant" })
+ if (launchParam === "onlineShop") return uni.reLaunch({ url: "/pages/tabbar/onlineShop" })
if (launchParam === "coopMerchant") return uni.reLaunch({ url: "/pages/tabbar/coopMerchant" })
return
case "doorAdmin":
@@ -179,8 +186,6 @@ export default {
}
}
},
- onShow() {},
- onHide() {},
methods: {
async _initTabbar() {
diff --git a/src/pages.json b/src/pages.json
index df22365..669c84a 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -23,6 +23,13 @@
"disableScroll": true
}
},
+ {
+ "path": "pages/tabbar/onlineShop",
+ "style": {
+ "navigationBarTitleText": "在线商城",
+ "disableScroll": true
+ }
+ },
{
"path": "pages/tabbar/coopMerchant",
"style": {
@@ -483,6 +490,12 @@
"iconPath": "",
"selectedIconPath": ""
},
+ {
+ "pagePath": "pages/tabbar/onlineShop",
+ "text": "",
+ "iconPath": "",
+ "selectedIconPath": ""
+ },
{
"pagePath": "pages/tabbar/coopMerchant",
"text": "",
@@ -521,7 +534,7 @@
},
{
"pagePath": "pages/tabbar/message",
- "text": "通知公告",
+ "text": "",
"iconPath": "",
"selectedIconPath": ""
},
diff --git a/src/pages/canteen/detail.vue b/src/pages/canteen/detail.vue
index 01b2f3f..496d130 100644
--- a/src/pages/canteen/detail.vue
+++ b/src/pages/canteen/detail.vue
@@ -156,7 +156,7 @@ const updateFoodCart = async () => {
}
// 打开购物车
-const doVisibleCart = async () => (state.showCartDialog = true)
+const doVisibleCart = () => (state.showCartDialog = true)
// 购买 打开预订时间段选择对话框
const doBuy = async () => {
diff --git a/src/pages/shop/components/product-car.vue b/src/pages/shop/components/product-cart.vue
similarity index 83%
rename from src/pages/shop/components/product-car.vue
rename to src/pages/shop/components/product-cart.vue
index d75f2fb..8873087 100644
--- a/src/pages/shop/components/product-car.vue
+++ b/src/pages/shop/components/product-cart.vue
@@ -1,13 +1,5 @@
-
+
{
}
const doPay = () => {
- emit("doPay")
+ emit("submit")
}
const getHeight = () => {
diff --git a/src/pages/shop/components/product-total.vue b/src/pages/shop/components/product-total.vue
index 76e4e26..41b66f2 100644
--- a/src/pages/shop/components/product-total.vue
+++ b/src/pages/shop/components/product-total.vue
@@ -1,37 +1,37 @@
-
-
-
-
-
-
- ¥ {{ hooks.useMoney(props.totPrice) }}
- 共{{ props.totCount }}件
-
-
- 提交订单
-
+
+
+
+
+
+
+ ¥ {{ hooks.useMoney(props.totPrice) }}
+ 共{{ props.totCount }}件
+
+
+ 提交订单
+
diff --git a/src/pages/shop/detail.vue b/src/pages/shop/detail.vue
index a2fe252..0a9c511 100644
--- a/src/pages/shop/detail.vue
+++ b/src/pages/shop/detail.vue
@@ -66,9 +66,6 @@
:borderColor="['#89c0ff']"
>
-
@@ -112,24 +109,24 @@
-
-
+
+
-
-
+