Browse Source

团餐列表返回跳转首页

baijunde 1 month ago
parent
commit
71ec017bc4
1 changed files with 7 additions and 1 deletions
  1. 7 1
      pages/groupMeal/goods/list.vue

+ 7 - 1
pages/groupMeal/goods/list.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="page-container">
 		<!-- 导航栏 -->
-		<u-navbar :autoBack="true" :placeholder="true" :border-bottom="false">
+		<u-navbar :custom-back="goHome" :placeholder="true" :border-bottom="false">
 			<view class="navbar-title">团餐商品列表</view>
 			<view slot="right" class="navbar-right">
 				<text class="nav-btn" @click="addGoods">添加商品</text>
@@ -259,6 +259,12 @@ export default {
 		this.getData();
 	},
 	methods: {
+		// 返回首页
+		goHome() {
+			uni.switchTab({
+				url: '/pages/index/index'
+			});
+		},
 		// 商品数据
 		getData() {
 			uni.showLoading({