zjxpcyc 6 anni fa
parent
commit
731614f818
3 ha cambiato i file con 24 aggiunte e 25 eliminazioni
  1. 1
    1
      src/App.vue
  2. 2
    0
      src/store/vote.js
  3. 21
    24
      src/views/vote/list.vue

+ 1
- 1
src/App.vue Vedi File

@@ -54,7 +54,7 @@ export default {
54 54
 #app {
55 55
   width: 100%;
56 56
   height: 100%;
57
-  overflow-y: auto;
57
+  // overflow-y: auto;
58 58
   // position: relative;
59 59
 }
60 60
 </style>

+ 2
- 0
src/store/vote.js Vedi File

@@ -10,10 +10,12 @@ export default {
10 10
     myprofile: {},
11 11
     toplist: [],
12 12
     list: [],
13
+    theme: 1,
13 14
   },
14 15
   mutations: {
15 16
     updateActivity(state, data) {
16 17
       state.activity = data || {}
18
+      state.theme = data.ActivityId || 1
17 19
     },
18 20
     updateUser(state, data) {
19 21
       state.user = data

+ 21
- 24
src/views/vote/list.vue Vedi File

@@ -14,8 +14,7 @@
14 14
         <van-tabs type="card" @click="finished = false">
15 15
           <van-tab>
16 16
             <div slot="title">
17
-              <span v-if="first" :class="active?newly1:newly2">最新上传</span>
18
-              <span v-else :class="active?newlyone:newlytwo">最新上传</span>
17
+              <span :class="{ [`theme${theme}`]: true, 'active': active }">最新上传</span>
19 18
             </div>
20 19
             <van-list
21 20
               v-model="loading"
@@ -41,8 +40,7 @@
41 40
           </van-tab>
42 41
           <van-tab title="TOP50">
43 42
             <div slot="title">
44
-              <span v-if="first" :class="active?newly1:newly2">TOP50</span>
45
-              <span v-else :class="active?newlyone:newlytwo">TOP50</span>
43
+              <span :class="{ [`theme${theme}`]: true, 'active': !active }">Top50</span>
46 44
             </div>
47 45
             <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="loadTopList">
48 46
             <div class="LatestUpload">
@@ -86,14 +84,7 @@ export default {
86 84
   name: "lotterylist",
87 85
   data() {
88 86
     return {
89
-      first: false,
90
-      second: false,
91 87
       active: true,
92
-      isactive: true,
93
-      newly1: "newly1",
94
-      newly2: "newly2",
95
-      newlyone: "newlyone",
96
-      newlytwo: "newlytwo",
97 88
       temp: true,
98 89
       signupBtn: true,
99 90
       signupBtnOne: "signupBtnOne",
@@ -138,6 +129,7 @@ export default {
138 129
       newList: x => x.list,
139 130
       topList: x => x.toplist,
140 131
       user: x => x.user,
132
+      theme: x => x.theme,
141 133
     }),
142 134
   },
143 135
   created() {
@@ -147,12 +139,10 @@ export default {
147 139
       this.coverImgUrl = true;
148 140
       this.signupBtn = true;
149 141
       this.isOK = true;
150
-      this.first = true;
151 142
     } else if (this.actid == 2) {
152 143
       this.coverImgUrl = false;
153 144
       this.signupBtn = false;
154 145
       this.isOK = false;
155
-      this.second = true;
156 146
     }
157 147
     this.getActivity({
158 148
       actid: this.actid,
@@ -191,17 +181,6 @@ export default {
191 181
       'vote',
192 182
       'getMine',
193 183
     ]),
194
-    qh(t) {
195
-      this.temp = t;
196
-      if (t == true) {
197
-        this.active = true;
198
-        this.isactive = true;
199
-      } else {
200
-        this.active = false;
201
-        this.isactive = false;
202
-      }
203
-    },
204
-
205 184
     handleScroll() {
206 185
       // 页面滚动距顶部距离
207 186
       var scrollTop =
@@ -557,6 +536,24 @@ export default {
557 536
       flex-direction: column;
558 537
       align-items: center;
559 538
 
539
+
540
+      .theme1 {
541
+          width: 2rem;
542
+          font-size: 0.16rem;
543
+          font-family: PingFangSC-Medium;
544
+          font-weight: bolder;
545
+          color: rgba(255, 255, 255, 1);
546
+          background: rgba(217, 226, 233, 1);
547
+          line-height: 0.22rem;
548
+          border-radius: 0.06rem;
549
+          text-align: center;
550
+          padding: 0.09rem 0;
551
+
552
+          &.active {
553
+            background: rgba(166, 184, 201, 1);
554
+          }
555
+      }
556
+
560 557
       .sortlist1 {
561 558
         width: 94%;
562 559
         display: flex;