校园-江西科技师范大学-前端
shuishen
2023-12-04 75caf8524a5934b16176764f8d56d77d11cd4d2c
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(',')