فهرست منبع

摩托车没地方专题

zhangyujun 3 سال پیش
والد
کامیت
ecc6dbd087
1فایلهای تغییر یافته به همراه10 افزوده شده و 2 حذف شده
  1. 10 2
      src/views/home/children/test/components/sujectOne.vue

+ 10 - 2
src/views/home/children/test/components/sujectOne.vue

@@ -15,7 +15,7 @@
 					</div>
 				</div>
 				<div class="min">
-					<div class="icon-box" v-for="(item, index) in testObj.right" :key="index" @click="push(item.route)">
+					<div class="icon-box" v-for="(item, index) in testObj.right" :key="index" @click="rightClick(item, index)">
 						<m-icon :type="item.icon" isSvg />
 						<span>{{ item.name }}</span>
 					</div>
@@ -30,6 +30,7 @@
 import { RouterBus } from "@/hooks";
 import { Dialog } from "vant";
 import store from "@/store";
+import { Toast } from "vant";
 const props = defineProps(["query"]);
 const {
 	router: { push },
@@ -45,7 +46,14 @@ const centerClick = (item: any, index: number) => {
 			break;
 	}
 };
-
+const rightClick = (item: any, index: number) => {
+	//摩托车目前没有地方专题
+	if (item.route?.query.title == "地方专题" && item.route?.query.vehicle == "摩托车") {
+		Toast("暂无地方专题")
+		return
+	}
+	push(item.route)
+};
 const vipClick = (item: any, index: number) => {
 	if (index == 0 && !store.getters.getIsVip) {
 		Dialog.confirm({