From 6851cc1e217a2af9ae62ebb3bf28e00a0d8ddadb Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 31 Dec 2021 09:06:55 +0800
Subject: [PATCH] +

---
 src/components/serviceNavBar/index.vue |  141 +++++------------------------------------------
 1 files changed, 15 insertions(+), 126 deletions(-)

diff --git a/src/components/serviceNavBar/index.vue b/src/components/serviceNavBar/index.vue
index 99f650f..68cd47b 100644
--- a/src/components/serviceNavBar/index.vue
+++ b/src/components/serviceNavBar/index.vue
@@ -46,11 +46,8 @@
 <script>
 import { mapGetters } from 'vuex'
 import {
-    getList, getCanteenList, getSupermarketList,
-    getMedicalList, getExpressList, getShowersList,
-    getTransferList, getCopyList, getBankList,
-    getAedList, getServiceList, getParkList,
-    getAlleywayList
+    getList,
+    getLifeList
 } from '@/api/pc/service/index'
 
 export default {
@@ -167,127 +164,15 @@
         getChilsNavs (campus) {
             this.itemNavList = []
 
-            if (this.arcCode == 1) {
-                getCanteenList({ campus: campus }).then(res => {
-                    res.data.data.records.forEach(item => {
-                        this.itemNavList.push({
-                            navTitle: item.mechanismname,
-                            icon: '/img/navicon/tag.png',
-                            details: item
-                        })
+            getLifeList({ lifetype: this.arcCode, campus: campus }).then(res => {
+                res.data.data.records.forEach(item => {
+                    this.itemNavList.push({
+                        navTitle: item.mechanismname,
+                        icon: '/img/navicon/tag.png',
+                        details: item
                     })
                 })
-            } else if (this.arcCode == 2) {
-                getSupermarketList({ campus: campus }).then(res => {
-                    res.data.data.records.forEach(item => {
-                        this.itemNavList.push({
-                            navTitle: item.mechanismname,
-                            icon: '/img/navicon/tag.png',
-                            details: item
-                        })
-                    })
-                })
-            } else if (this.arcCode == 3) {
-                getMedicalList({ campus: campus }).then(res => {
-                    res.data.data.records.forEach(item => {
-                        this.itemNavList.push({
-                            navTitle: item.mechanismname,
-                            icon: '/img/navicon/tag.png',
-                            details: item
-                        })
-                    })
-                })
-            } else if (this.arcCode == 4) {
-                getExpressList({ campus: campus }).then(res => {
-                    res.data.data.records.forEach(item => {
-                        this.itemNavList.push({
-                            navTitle: item.mechanismname,
-                            icon: '/img/navicon/tag.png',
-                            details: item
-                        })
-                    })
-                })
-            } else if (this.arcCode == 5) {
-                getShowersList({ campus: campus }).then(res => {
-                    res.data.data.records.forEach(item => {
-                        this.itemNavList.push({
-                            navTitle: item.mechanismname,
-                            icon: '/img/navicon/tag.png',
-                            details: item
-                        })
-                    })
-                })
-            } else if (this.arcCode == 6) {
-                getTransferList({ campus: campus }).then(res => {
-                    res.data.data.records.forEach(item => {
-                        this.itemNavList.push({
-                            navTitle: item.mechanismname,
-                            icon: '/img/navicon/tag.png',
-                            details: item
-                        })
-                    })
-                })
-            } else if (this.arcCode == 7) {
-                getCopyList({ campus: campus }).then(res => {
-                    res.data.data.records.forEach(item => {
-                        this.itemNavList.push({
-                            navTitle: item.mechanismname,
-                            icon: '/img/navicon/tag.png',
-                            details: item
-                        })
-                    })
-                })
-            } else if (this.arcCode == 8) {
-                getBankList({ campus: campus }).then(res => {
-                    res.data.data.records.forEach(item => {
-                        this.itemNavList.push({
-                            navTitle: item.mechanismname,
-                            icon: '/img/navicon/tag.png',
-                            details: item
-                        })
-                    })
-                })
-            } else if (this.arcCode == 9) {
-                getAedList({ campus: campus }).then(res => {
-                    res.data.data.records.forEach(item => {
-                        this.itemNavList.push({
-                            navTitle: item.mechanismname,
-                            icon: '/img/navicon/tag.png',
-                            details: item
-                        })
-                    })
-                })
-            } else if (this.arcCode == 10) {
-                getServiceList({ campus: campus }).then(res => {
-                    res.data.data.records.forEach(item => {
-                        this.itemNavList.push({
-                            navTitle: item.mechanismname,
-                            icon: '/img/navicon/tag.png',
-                            details: item
-                        })
-                    })
-                })
-            } else if (this.arcCode == 11) {
-                getParkList({ campus: campus }).then(res => {
-                    res.data.data.records.forEach(item => {
-                        this.itemNavList.push({
-                            navTitle: item.mechanismname,
-                            icon: '/img/navicon/tag.png',
-                            details: item
-                        })
-                    })
-                })
-            } else if (this.arcCode == 12) {
-                getAlleywayList({ campus: campus }).then(res => {
-                    res.data.data.records.forEach(item => {
-                        this.itemNavList.push({
-                            navTitle: item.mechanismname,
-                            icon: '/img/navicon/tag.png',
-                            details: item
-                        })
-                    })
-                })
-            }
+            })
         },
         mapPopup (param) {
             var result = param
@@ -304,6 +189,10 @@
             this.$store.commit('SET_INTRODUCETEXT', result.introduce)
             this.$store.commit('SET_PANORAMAURL', result.panoramaurl)
             this.$store.commit('SET_POPUPIMGATLAS', imgArr)
+
+            if (result.videourl && result.videourl != '') {
+                this.$store.commit('SET_MONITORURL', result.videourl)
+            }
 
             this.newPopup(result)
             this.viewer.flyToPosition(
@@ -336,8 +225,8 @@
     width: 322px;
     height: auto;
     border-radius: 8px;
-    top: 16%;
-    left: 5%;
+    top: 140px;
+    left: 140px;
     background-color: transparent;
     z-index: 999;
     font-size: 14px;

--
Gitblit v1.9.3