From 9c50a6a7cf6f40af955672f7b38950aa61a5484f Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Sat, 25 Dec 2021 09:32:43 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/school-web

---
 src/components/serviceNavBar/index.vue |  133 +++-----------------------------------------
 1 files changed, 9 insertions(+), 124 deletions(-)

diff --git a/src/components/serviceNavBar/index.vue b/src/components/serviceNavBar/index.vue
index 2d93d90..f6898f4 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

--
Gitblit v1.9.3