康凯
2022-01-27 2f8e6550cfc092b70d9e8ce65fb6d6c256e2d0ba
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<template>
  <div class="datalist">
    <div class="data-title">
      <div @click="ToHome">吉林省红色旅游数据库</div>
      <div @click="ToHome">红色景点库</div>
    </div>
    <div class="data-content">
      <transition name="fade-transform" mode="out-in">
        <router-view :key="key"/>
      </transition>
    </div>
    <mt-tabbar v-model="dataType" :fixed="true">
      <mt-tab-item id="3">红色景区</mt-tab-item>
      <mt-tab-item id="1">红色记忆</mt-tab-item>
      <mt-tab-item id="2">红色精神</mt-tab-item>
      <mt-tab-item id="4">红色人物</mt-tab-item>
    </mt-tabbar>
  </div>
</template>
 
<script>
export default {
  name: "listIndex",
  data() {
    return {
      dataType: ""
    }
  },
  methods: {
    ToHome: function () {
      this.$router.push({name: "home"});
    }
  },
  watch: {
    dataType: function () {
      switch (this.dataType) {
        case "1":
          this.$router.push({name: "memory-list"});
          break;
        case "2":
          this.$router.push({name: "spirit-list"});
          break;
        case "3":
          this.$router.push({name: "scenery-list"});
          break;
        case "4":
          this.$router.push({name: "personage-list"});
          break;
      }
    },
  },
  computed: {
    key() {
      return this.$route.path
    }
  },
  created() {
    if (this.dataType == "") {
      switch (this.$route.name) {
        case "memory-list":
          this.dataType = "1";
          break;
        case "spirit-list":
          this.dataType = "2"
          break;
        case "scenery-list":
          this.dataType = "3";
          break;
        case "personage-list":
          this.dataType = "4";
          break;
      }
    }
  }
}
</script>
 
<style scoped>
.datalist {
  width: 100%;
  height: 100vh;
}
 
.data-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
 
  width: 100%;
  height: 16vh;
  background: url("../../assets/datalist/datalist@1x.png") no-repeat 100% 100%;
  background-size: cover;
}
 
.data-title > div {
  width: 100%;
  text-align: left;
  font-size: 2.87rem;
  font-family: FZZhengHeiS-DB-GB;
  font-weight: 400;
  line-height: 4.37rem;
  color: #FFFFFF;
  opacity: 1;
  padding-left: 2rem;
}
 
.data-content {
  width: 100%;
  height: 75vh;
  background: #FFFFFF;
  border-radius: 10px 10px 0px 0px;
 
  position: relative;
  z-index: 5;
}
 
.data-content .list-root{
  height: 100%;
  width: 100%;
}
 
.mint-tabbar {
  height: 45px;
  background: white;
  z-index: 9;
}
 
.mint-tabbar /deep/ .mint-tab-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
 
.mint-tabbar /deep/ .mint-tab-item-label {
  width: 7.75rem;
  height: 100%;
  border-top: 1px solid white;
 
  font-size: 1.75rem;
  font-family: Source Han Sans CN;
  font-weight: 400;
  line-height: 3.5rem;
  color: #767676;
  opacity: 1;
}
 
.mint-tabbar /deep/ .is-selected {
  background-color: white;
}
 
.mint-tabbar /deep/ .is-selected .mint-tab-item-label {
  border-top: 1px solid #BC0000;
 
  font-size: 1.75rem;
  font-family: Source Han Sans CN;
  font-weight: bold;
  line-height: 3.5rem;
  color: #BC0000;
  opacity: 1;
}
</style>