shuishen
2022-03-18 bf58722dfd03ea1513f3acc7331d4d4403fca76e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* * @Author: Morpheus * @Name: 教学与科研机构 * @Date: 2021-11-15 10:02:12 *
@Last Modified by: Morpheus * @Last Modified time: 2021-12-30 14:26:13 */
<template>
  <div></div>
</template>
 
<script>
import { getList } from "@/api/pc/orgnav/index";
 
import { mapGetters } from "vuex";
 
export default {
  data() {
    return {
      list: [],
    };
  },
  computed: {
    ...mapGetters([
      // 校区内导航的显示关闭
      "orgNavBarFlag",
      "arcNavBarFlag",
    ]),
  },
  mounted() {
    if (this.arcNavBarFlag == true) {
      this.$store.commit("SET_ARCNAVBARTITLE", "");
      this.$store.commit("SET_ARCNAVBARCODE", "");
      this.$store.commit("SET_ARCNAVBARFLAG", false);
    }
    this.$store.commit("SET_ORGNAVBARTITLE", "教学与科研机构");
    this.$store.commit("SET_ORGNAVBARLIST", []);
 
    this.$store.commit("SET_ORGNAVBARFLAG", true);
 
    getList({ type: 4 }).then((res) => {
      res.data.data.records.forEach((item) => {
        this.list.push({
          navTitle: item.mechanismname,
          icon: "/img/navicon/tag.png",
          longitude: item.jd,
          latitude: item.wd,
          alt: item.gd,
          heading: item.heading,
          pitch: item.pitch,
          roll: item.roll,
          bgImg: item.tpurl,
          QRImg: item.codeurl,
          address: item.address,
          telephone: item.telephone,
          introduce: item.introduce,
          videourl: item.videourl,
        });
      });
 
      this.$store.commit("SET_ORGNAVBARLIST", this.list);
    });
  },
  methods: {},
  beforeDestroy() {
    if (this.orgNavBarFlag == true) {
      this.$store.commit("SET_ORGNAVBARTITLE", "");
      this.$store.commit("SET_ORGNAVBARLIST", []);
      this.$store.commit("SET_ORGNAVBARFLAG", false);
    }
  },
};
</script>
 
<style></style>