From 75caf8524a5934b16176764f8d56d77d11cd4d2c Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 04 Dec 2023 15:55:03 +0800
Subject: [PATCH] 校区切换处理---接口传参

---
 src/components/serviceNavBar/index.vue |   38 ++++++++++++++++++++++----------------
 1 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/src/components/serviceNavBar/index.vue b/src/components/serviceNavBar/index.vue
index bf48809..9235b89 100644
--- a/src/components/serviceNavBar/index.vue
+++ b/src/components/serviceNavBar/index.vue
@@ -8,12 +8,12 @@
             <img class="close deblurring" :src="publicPath + 'img/navicon/close.png'" alt @click="closeModel" />
         </template>
         <template slot="public-box-content">
-            <div class="tab" v-show="false">
+            <!-- <div class="tab" v-show="false">
                 <ul>
                     <li :class="{ on: item.flag }" v-for="(item, index) in titleList" :key="index"
                         @click="topNavClick(item, index)">{{ item.title }}</li>
                 </ul>
-            </div>
+            </div> -->
             <ul>
                 <li v-for="(item, index) in itemNavList" :key="index" @click="mapPopup(item.details)">
                     <img :src="item.icon" alt />
@@ -46,6 +46,9 @@
             itemNavList: []
         }
     },
+
+    inject: ["layoutElement"],
+
     props: {
         title: {
             type: String
@@ -75,22 +78,21 @@
         ])
     },
     created () {
-        this.titleList = []
+        // this.titleList = []
         // 三江社区//"土木楼"//"科学园"//"黄河路"//"红旗社区"
-        getList().then((res) => {
-            res.data.data.forEach((item) => {
-                // console.log(item, "see");
-                this.titleList.push({
-                    title: item.dictValue,
-                    flag: false,
-                    key: item.dictKey
-                })
-            })
+        // getList().then((res) => {
+        //     res.data.data.forEach((item) => {
+        //         // console.log(item, "see");
+        //         this.titleList.push({
+        //             title: item.dictValue,
+        //             flag: false,
+        //             key: item.dictKey
+        //         })
+        //     })
 
-            this.titleList[0].flag = true
+        //     this.titleList[0].flag = true
 
-            this.getChilsNavs(this.titleList[0].key)
-        })
+        // })
     },
     watch: {
         twoOrThree: {
@@ -100,7 +102,11 @@
             immediate: true
         }
     },
-    mounted () { },
+    mounted () {
+
+        this.getChilsNavs(this.layoutElement.campusValue)
+
+    },
     methods: {
         coordinate (item) {
             const arr = item.split(',')

--
Gitblit v1.9.3