From 57b36feeb74111aa477c8aac86feab7452a009c8 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 04 Dec 2023 18:08:39 +0800
Subject: [PATCH] 移动端部分接口加campus参数

---
 src/components/mobilePopupOur/index.vue |   74 +++++++-----------------------------
 1 files changed, 15 insertions(+), 59 deletions(-)

diff --git a/src/components/mobilePopupOur/index.vue b/src/components/mobilePopupOur/index.vue
index 600fd12..9ef552d 100644
--- a/src/components/mobilePopupOur/index.vue
+++ b/src/components/mobilePopupOur/index.vue
@@ -22,7 +22,7 @@
             </div>
         </div>
         <div class="m_p_center">
-            <div class="m_p_c_tableIn" style="padding-top: 10px" v-if="tabTable.length <= 0">
+            <div class="m_p_c_tableIn" style="padding-top: 10px">
                 <el-empty v-show="onlyData.length == 0" description="暂无数据"></el-empty>
                 <mobilePopupOurOnce v-for="(citem, cindex) in onlyData" :key="citem.name + cindex"
                     :ends="onlyData.length - 1 == cindex" :onceData="citem"></mobilePopupOurOnce>
@@ -32,21 +32,6 @@
                     </el-divider>
                 </div>
             </div>
-            <el-tabs v-model="activeName" @tab-click="handleClick" v-else>
-                <el-tab-pane v-for="(item, index) in tabTable" :key="index" :label="item.title" :name="item.key">
-                    <div class="m_p_c_tableIn">
-                        <el-empty v-show="item.child.length == 0" description="暂无数据"></el-empty>
-                        <mobilePopupOurOnce v-for="(citem, cindex) in item.child" :key="citem.icons"
-                            :ends="item.child.length - 1 == cindex" :onceData="citem"></mobilePopupOurOnce>
-                        <!-- {{ citem.icon }} -->
-                        <div v-show="item.child.length != 0">
-                            <el-divider content-position="left">
-                                <i class="el-icon-s-promotion"></i>&nbsp;&nbsp;&nbsp;暂无更多
-                            </el-divider>
-                        </div>
-                    </div>
-                </el-tab-pane>
-            </el-tabs>
         </div>
     </div>
 </template>
@@ -60,7 +45,11 @@
     computed: {
         ...mapGetters(['mBigPopup', 'popupOurOpenData'])
     },
+
+    inject: ["mobileMapElement"],
+
     name: 'mobilePopupOur',
+
     data () {
         return {
             searchLabel: '',
@@ -68,9 +57,7 @@
             choiceKey: '',
             choiceMethod: '',
             choiceData: [],
-            tabTable: [],
             fullscreenLoading: false,
-            activeName: '1',
             choiceMain: '',
             onlyData: []
         }
@@ -95,7 +82,7 @@
 
         this.$store.commit('MSET_BIGPOPUPAFTER', false) // 关闭前一个弹窗
         // console.log("请求对应街道接口", this.popupOurOpenData);
-        this.getDataHeardDown()
+        this.getOutList(this.choiceKey)
     },
     watch: {
         fullscreenLoading () {
@@ -105,11 +92,6 @@
         }
     },
     methods: {
-        handleClick (tab, event) {
-            // 头下部标签
-            this.fullscreenLoading = true
-            this.getOutList(this.activeName, this.choiceKey)
-        },
         choiceIt (command) {
             // 头部下拉菜单
             this.fullscreenLoading = true
@@ -117,38 +99,15 @@
             this.choiceKey = command.type
             this.choiceMethod = command.method // 更改请求
             // console.log("请求对应头部下拉菜单接口", command);
-            this.getOutList(this.activeName, this.choiceKey)
+            this.getOutList(this.choiceKey)
         },
+
         closeBigPopup () {
             this.$store.commit('MSET_BIGPOPUP', false)
         },
-        getDataHeardDown () {
-            if (this.choiceMain == '活动') {
-                // 不请求头部标签页数据
-                this.getOutList(this.choiceKey)
-                return
-            }
-            if (this.choiceMain == '机构单位') {
-                this.getOutList('', this.choiceKey)
-                return
-            }
-            // 获取头下部标签页
-            getListarc().then((res) => {
-                const title = []
-                res.data.data.forEach((item) => {
-                    title.push({
-                        title: item.dictValue,
-                        flag: false,
-                        key: item.dictKey,
-                        child: []
-                    })
-                })
-                this.tabTable = title
-                this.getOutList(this.activeName, this.choiceKey)
-            })
-        },
+
         // 请求
-        getOutList (campus, type) {
+        getOutList (type) {
             // console.log(this.choiceMain, campus, type, "see");
             const that = this
             let d
@@ -164,16 +123,17 @@
             ) {
                 // 改变传入属性
                 d = {
-                    campus: campus,
                     lifetype: type
                 }
             } else {
                 d = {
-                    campus: campus,
                     type: type
                 }
             }
-            this.choiceMethod(d).then((res) => {
+            this.choiceMethod({
+                ...d,
+                campus: this.mobileMapElement.campusValue
+            }).then((res) => {
                 const data = res.data.data
                 const outList = []
                 if (
@@ -270,12 +230,8 @@
                     })
                 }
 
+                that.onlyData = outList
                 that.fullscreenLoading = false
-                if (this.choiceMain == '机构单位' || this.choiceMain == '活动') {
-                    that.onlyData = outList
-                    return
-                }
-                that.tabTable[+campus - 1].child = outList
             })
         },
         // 搜索请求

--
Gitblit v1.9.3