diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json deleted file mode 100644 index 81f13f4..0000000 --- a/.hbuilderx/launch.json +++ /dev/null @@ -1,16 +0,0 @@ -{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ - // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 - "version": "0.0", - "configurations": [{ - "default" : - { - "launchtype" : "local" - }, - "mp-weixin" : - { - "launchtype" : "local" - }, - "type" : "uniCloud" - } - ] -} diff --git a/src/App.vue b/src/App.vue index 73eca76..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 @@ -160,7 +166,7 @@ export default { const userRole = uni.getStorageSync("userRole") const launchParam = getLaunchParam() if (launchParam == "thirdApp") { - uni.navigateTo({ url: "/pages/thirdApp/thirdAppList" }) + uni.reLaunch({ url: "/pages/thirdApp/thirdAppList" }) return } if (launchParam) { @@ -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 af29477..eff3e15 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/cabinet/buy.vue b/src/pages/cabinet/buy.vue index c335748..08eaf96 100644 --- a/src/pages/cabinet/buy.vue +++ b/src/pages/cabinet/buy.vue @@ -1,29 +1,31 @@