|
@@ -1,6 +1,7 @@
|
1
|
1
|
<template>
|
2
|
|
- <div class="context" :style="{backgroundImage: 'url(' + (coverImgUrl ?BgImage:BgImg) + ')'}">
|
3
|
|
- <img class="BannerImage" :src="activity.Banner">
|
|
2
|
+ <div :class="'context theme'+theme">
|
|
3
|
+ <!-- <img :src="banner"> -->
|
|
4
|
+ <img :class="signupBtn?BannerImage1:BannerImage2" :src="activity.Banner">
|
4
|
5
|
<div :class="IsOk?onscroll1:onscroll2">
|
5
|
6
|
<div :class="isOK?searchs:searchb">
|
6
|
7
|
<input placeholder="输入编号或姓名" v-model="q" @focus="showBtn = false" @blur="showBtn = true">
|
|
@@ -16,15 +17,18 @@
|
16
|
17
|
<span :class="{ [`theme${theme}`]: true, 'active': active }">最新上传</span>
|
17
|
18
|
</div>
|
18
|
19
|
<!-- <pull-to :bottom-load-method="loadNewList"> -->
|
19
|
|
- <van-list
|
20
|
|
- v-model="loading"
|
21
|
|
- :finished="finished"
|
22
|
|
- finished-text="没有更多了"
|
23
|
|
- @load="loadNewList"
|
24
|
|
- >
|
|
20
|
+ <van-list
|
|
21
|
+ v-model="loading"
|
|
22
|
+ :finished="finished"
|
|
23
|
+ finished-text="没有更多了"
|
|
24
|
+ @load="loadNewList"
|
|
25
|
+ >
|
25
|
26
|
<div class="LatestUpload">
|
26
|
27
|
<div class="LatestUploadList" v-for="(item,index) in newList" :key="index">
|
27
|
|
- <div :class="signupBtn?ActivePersonnelBox1:ActivePersonnelBox2" @click="gotovotingdetails(item.MemberId)">
|
|
28
|
+ <div
|
|
29
|
+ :class="signupBtn?ActivePersonnelBox1:ActivePersonnelBox2"
|
|
30
|
+ @click="gotovotingdetails(item.MemberId)"
|
|
31
|
+ >
|
28
|
32
|
<img :src="item.Photo + '?x-oss-process=style/compress-rotate'">
|
29
|
33
|
</div>
|
30
|
34
|
<span :class="signupBtn?ballot1:ballot2">NO.{{item.MemberId}}</span>
|
|
@@ -36,41 +40,47 @@
|
36
|
40
|
</div>
|
37
|
41
|
</div>
|
38
|
42
|
</div>
|
39
|
|
- <!-- </pull-to> -->
|
40
|
|
- </van-list>
|
|
43
|
+ <!-- </pull-to> -->
|
|
44
|
+ </van-list>
|
41
|
45
|
</van-tab>
|
42
|
46
|
<van-tab title="TOP50">
|
43
|
47
|
<div slot="title">
|
44
|
48
|
<span :class="{ [`theme${theme}`]: true, 'active': !active }">Top50</span>
|
45
|
49
|
</div>
|
46
|
|
- <!-- <pull-to :bottom-load-method="loadTopList"> -->
|
47
|
|
- <van-list
|
48
|
|
- v-model="loading"
|
49
|
|
- :finished="finished"
|
50
|
|
- finished-text="没有更多了"
|
51
|
|
- @load="loadTopList"
|
52
|
|
- >
|
53
|
|
- <div class="LatestUpload">
|
54
|
|
- <div class="LatestUploadList" v-for="(item,index) in topList" :key="index">
|
55
|
|
- <div :class="signupBtn?ActivePersonnelBox1:ActivePersonnelBox2" @click="gotovotingdetails(item.MemberId)">
|
56
|
|
- <img :src="item.Photo + '?x-oss-process=style/compress-rotate'">
|
57
|
|
- </div>
|
58
|
|
- <span :class="signupBtn?ballot1:ballot2">NO.{{item.MemberId}}</span>
|
59
|
|
- <span class="ActivePersonnelName">{{item.Name}}</span>
|
60
|
|
- <button :class="signupBtn?VoteBtn1:VoteBtn2" @click="Vote(item.MemberId)">投TA一票</button>
|
61
|
|
- <div class="VoteNumber">
|
62
|
|
- <span>已获投票数:</span>
|
63
|
|
- <p>{{item.Vote}}票</p>
|
64
|
|
- </div>
|
|
50
|
+ <!-- <pull-to :bottom-load-method="loadTopList"> -->
|
|
51
|
+ <van-list
|
|
52
|
+ v-model="loading"
|
|
53
|
+ :finished="finished"
|
|
54
|
+ finished-text="没有更多了"
|
|
55
|
+ @load="loadTopList"
|
|
56
|
+ >
|
|
57
|
+ <div class="LatestUpload">
|
|
58
|
+ <div class="LatestUploadList" v-for="(item,index) in topList" :key="index">
|
|
59
|
+ <div
|
|
60
|
+ :class="signupBtn?ActivePersonnelBox1:ActivePersonnelBox2"
|
|
61
|
+ @click="gotovotingdetails(item.MemberId)"
|
|
62
|
+ >
|
|
63
|
+ <img :src="item.Photo + '?x-oss-process=style/compress-rotate'">
|
|
64
|
+ </div>
|
|
65
|
+ <span :class="signupBtn?ballot1:ballot2">NO.{{item.MemberId}}</span>
|
|
66
|
+ <span class="ActivePersonnelName">{{item.Name}}</span>
|
|
67
|
+ <button :class="signupBtn?VoteBtn1:VoteBtn2" @click="Vote(item.MemberId)">投TA一票</button>
|
|
68
|
+ <div class="VoteNumber">
|
|
69
|
+ <span>已获投票数:</span>
|
|
70
|
+ <p>{{item.Vote}}票</p>
|
65
|
71
|
</div>
|
66
|
72
|
</div>
|
67
|
|
- </van-list>
|
68
|
|
- <!-- </pull-to> -->
|
|
73
|
+ </div>
|
|
74
|
+ </van-list>
|
|
75
|
+ <!-- </pull-to> -->
|
69
|
76
|
</van-tab>
|
70
|
77
|
</van-tabs>
|
71
|
78
|
</div>
|
72
|
79
|
<div class="btn" v-show="showBtn">
|
73
|
|
- <button :class="signupBtn?'signupBtnOne':'signupBtnTwo'" @click="signup">{{ myID > 0 ? '我的上传' : '我要报名'}}</button>
|
|
80
|
+ <button
|
|
81
|
+ :class="signupBtn?'signupBtnOne':'signupBtnTwo'"
|
|
82
|
+ @click="signup"
|
|
83
|
+ >{{ myID > 0 ? '我的上传' : '我要报名'}}</button>
|
74
|
84
|
</div>
|
75
|
85
|
<toast v-if="show" :url="activity.AfterVote" @close="close" @confirmbtn="tolink"></toast>
|
76
|
86
|
</div>
|
|
@@ -81,8 +91,8 @@
|
81
|
91
|
import { createNamespacedHelpers } from "vuex";
|
82
|
92
|
import wxsdk from "../../util/share.js";
|
83
|
93
|
import toast from "../../components/toast.vue";
|
84
|
|
-import BgImg from "../../assets/bgimg.jpg";
|
85
|
|
-import BgImage from "../../assets/yttjbg.png";
|
|
94
|
+// import BgImg from "../../assets/bgimg.jpg";
|
|
95
|
+// import BgImage from "../../assets/yttjbg.png";
|
86
|
96
|
import { Toast } from 'vant';
|
87
|
97
|
|
88
|
98
|
const {
|
|
@@ -97,6 +107,8 @@ export default {
|
97
|
107
|
active: true,
|
98
|
108
|
temp: true,
|
99
|
109
|
signupBtn: true,
|
|
110
|
+ BannerImage1: "BannerImage1",
|
|
111
|
+ BannerImage2: "BannerImage2",
|
100
|
112
|
signupBtnOne: "signupBtnOne",
|
101
|
113
|
signupBtnTwo: "signupBtnTwo",
|
102
|
114
|
VoteBtn1: "VoteBtn1",
|
|
@@ -112,8 +124,8 @@ export default {
|
112
|
124
|
onscroll2: "onscroll2",
|
113
|
125
|
ActivePersonnelBox1: "ActivePersonnelBox1",
|
114
|
126
|
ActivePersonnelBox2: "ActivePersonnelBox2",
|
115
|
|
- BgImg,
|
116
|
|
- BgImage,
|
|
127
|
+ // BgImg,
|
|
128
|
+ // BgImage,
|
117
|
129
|
IconSearch:
|
118
|
130
|
"https://spaceofcheng.oss-cn-beijing.aliyuncs.com/voting/yttj_icon_search.png",
|
119
|
131
|
tab: "",
|
|
@@ -126,11 +138,11 @@ export default {
|
126
|
138
|
show: false,
|
127
|
139
|
pageSize: 10,
|
128
|
140
|
loaddingData: false,
|
129
|
|
- showBtn: true,
|
|
141
|
+ showBtn: true
|
130
|
142
|
};
|
131
|
143
|
},
|
132
|
144
|
components: {
|
133
|
|
- toast,
|
|
145
|
+ toast
|
134
|
146
|
// PullTo
|
135
|
147
|
},
|
136
|
148
|
mounted() {
|
|
@@ -150,8 +162,13 @@ export default {
|
150
|
162
|
user: x => x.user,
|
151
|
163
|
theme: x => x.theme,
|
152
|
164
|
myprofile: x => x.myprofile,
|
153
|
|
- myID: s => (s.myprofile.filter(x => x.ActivityId === (s.activity || {}).ActivityId)[0] || {}).MemberId
|
154
|
|
- }),
|
|
165
|
+ myID: s =>
|
|
166
|
+ (
|
|
167
|
+ s.myprofile.filter(
|
|
168
|
+ x => x.ActivityId === (s.activity || {}).ActivityId
|
|
169
|
+ )[0] || {}
|
|
170
|
+ ).MemberId
|
|
171
|
+ })
|
155
|
172
|
},
|
156
|
173
|
created() {
|
157
|
174
|
this.pageSize = this.$store.state.pageSize;
|
|
@@ -168,9 +185,9 @@ export default {
|
168
|
185
|
this.getActivity({
|
169
|
186
|
actid: this.actid
|
170
|
187
|
}).then(act => {
|
171
|
|
- let hash = window.location.hash
|
172
|
|
- if (hash.indexOf('/vote') < 0) {
|
173
|
|
- hash = `#/vote/${this.actid}`
|
|
188
|
+ let hash = window.location.hash;
|
|
189
|
+ if (hash.indexOf("/vote") < 0) {
|
|
190
|
+ hash = `#/vote/${this.actid}`;
|
174
|
191
|
}
|
175
|
192
|
|
176
|
193
|
wxsdk(
|
|
@@ -187,7 +204,7 @@ export default {
|
187
|
204
|
}
|
188
|
205
|
);
|
189
|
206
|
|
190
|
|
- console.log('------>', this.activity, this.myprofile, this.myID)
|
|
207
|
+ console.log("------>", this.activity, this.myprofile, this.myID);
|
191
|
208
|
});
|
192
|
209
|
// this.getMine({
|
193
|
210
|
// actid: this.actid,
|
|
@@ -214,15 +231,15 @@ export default {
|
214
|
231
|
"getMine"
|
215
|
232
|
]),
|
216
|
233
|
handleScroll() {
|
217
|
|
- this.showBtn = true
|
218
|
|
-
|
|
234
|
+ this.showBtn = true;
|
219
|
235
|
|
220
|
236
|
// 页面滚动距顶部距离
|
221
|
237
|
var scrollTop =
|
222
|
238
|
window.pageYOffset ||
|
223
|
239
|
document.documentElement.scrollTop ||
|
224
|
240
|
document.body.scrollTop;
|
225
|
|
- if (scrollTop >= 269) {
|
|
241
|
+
|
|
242
|
+ if (scrollTop >= 240) {
|
226
|
243
|
this.IsOk = false;
|
227
|
244
|
} else {
|
228
|
245
|
this.IsOk = true;
|
|
@@ -263,12 +280,12 @@ export default {
|
263
|
280
|
},
|
264
|
281
|
loadNewList(loaded) {
|
265
|
282
|
if (this.loaddingData) {
|
266
|
|
- return
|
|
283
|
+ return;
|
267
|
284
|
}
|
268
|
285
|
|
269
|
|
- this.loaddingData = true
|
|
286
|
+ this.loaddingData = true;
|
270
|
287
|
this.newlist().then(res => {
|
271
|
|
- console.log(res.length, this.pageSize)
|
|
288
|
+ console.log(res.length, this.pageSize);
|
272
|
289
|
|
273
|
290
|
if ((res || []).length >= this.pageSize) {
|
274
|
291
|
this.newpage += 1;
|
|
@@ -277,13 +294,13 @@ export default {
|
277
|
294
|
}
|
278
|
295
|
|
279
|
296
|
this.loading = false;
|
280
|
|
- this.loaddingData = false
|
281
|
|
- loaded && loaded('done')
|
|
297
|
+ this.loaddingData = false;
|
|
298
|
+ loaded && loaded("done");
|
282
|
299
|
});
|
283
|
300
|
},
|
284
|
301
|
loadTopList(loaded) {
|
285
|
302
|
if (this.loaddingData) {
|
286
|
|
- return
|
|
303
|
+ return;
|
287
|
304
|
}
|
288
|
305
|
|
289
|
306
|
this.toplist().then(res => {
|
|
@@ -294,8 +311,8 @@ export default {
|
294
|
311
|
}
|
295
|
312
|
|
296
|
313
|
this.loading = false;
|
297
|
|
- this.loaddingData = false
|
298
|
|
- loaded && loaded('done')
|
|
314
|
+ this.loaddingData = false;
|
|
315
|
+ loaded && loaded("done");
|
299
|
316
|
});
|
300
|
317
|
},
|
301
|
318
|
signup() {
|
|
@@ -343,9 +360,9 @@ export default {
|
343
|
360
|
window.location.href = this.info.AfterVote;
|
344
|
361
|
},
|
345
|
362
|
search() {
|
346
|
|
- this.newpage = 1
|
347
|
|
- this.toppage = 1
|
348
|
|
- this.showBtn = true
|
|
363
|
+ this.newpage = 1;
|
|
364
|
+ this.toppage = 1;
|
|
365
|
+ this.showBtn = true;
|
349
|
366
|
|
350
|
367
|
this.newlist();
|
351
|
368
|
this.toplist();
|
|
@@ -376,6 +393,12 @@ export default {
|
376
|
393
|
|
377
|
394
|
|
378
|
395
|
<style lang="scss" scoped>
|
|
396
|
+.theme1 {
|
|
397
|
+ background: rgba(209, 220, 228, 1);
|
|
398
|
+}
|
|
399
|
+.theme2 {
|
|
400
|
+ background: linear-gradient(#9c7e70, #70544b);
|
|
401
|
+}
|
379
|
402
|
.context {
|
380
|
403
|
width: 100%;
|
381
|
404
|
display: flex;
|
|
@@ -383,17 +406,22 @@ export default {
|
383
|
406
|
justify-content: center;
|
384
|
407
|
align-items: center;
|
385
|
408
|
|
386
|
|
- .BannerImage {
|
|
409
|
+ .BannerImage1 {
|
387
|
410
|
width: 100%;
|
388
|
411
|
max-height: 10rem;
|
|
412
|
+ margin-bottom: 0.8rem;
|
|
413
|
+ }
|
|
414
|
+ .BannerImage2 {
|
|
415
|
+ width: 92.5%;
|
|
416
|
+ max-height: 10rem;
|
|
417
|
+ margin: 0.6rem 0 1.4rem 0;
|
389
|
418
|
}
|
390
|
|
-
|
391
|
419
|
.onscroll1 {
|
392
|
420
|
width: 90%;
|
393
|
421
|
height: 0.44rem;
|
394
|
422
|
position: absolute;
|
395
|
|
- top: 2.8rem;
|
396
|
|
- left: calc(5%);
|
|
423
|
+ top: 2.4rem;
|
|
424
|
+ left: calc(3.1%);
|
397
|
425
|
z-index: 120;
|
398
|
426
|
|
399
|
427
|
.searchb {
|
|
@@ -477,7 +505,7 @@ export default {
|
477
|
505
|
width: 93%;
|
478
|
506
|
height: 0.44rem;
|
479
|
507
|
position: absolute;
|
480
|
|
- top: 2.8rem;
|
|
508
|
+ top: 2.4rem;
|
481
|
509
|
left: calc(3.1%);
|
482
|
510
|
z-index: 120;
|
483
|
511
|
|
|
@@ -600,18 +628,17 @@ export default {
|
600
|
628
|
font-size: 0.16rem;
|
601
|
629
|
font-weight: bolder;
|
602
|
630
|
color: rgba(255, 255, 255, 1);
|
603
|
|
- background: rgba(173,145,129,0.62);
|
|
631
|
+ background: rgba(173, 145, 129, 0.62);
|
604
|
632
|
line-height: 0.22rem;
|
605
|
633
|
border-radius: 0.06rem;
|
606
|
634
|
text-align: center;
|
607
|
635
|
padding: 0.09rem 0;
|
608
|
636
|
|
609
|
637
|
&.active {
|
610
|
|
- background: rgba(126,100,86,1);
|
|
638
|
+ background: rgba(126, 100, 86, 1);
|
611
|
639
|
}
|
612
|
640
|
}
|
613
|
641
|
|
614
|
|
-
|
615
|
642
|
.LatestUpload {
|
616
|
643
|
width: 90%;
|
617
|
644
|
display: flex;
|
|
@@ -646,12 +673,12 @@ export default {
|
646
|
673
|
}
|
647
|
674
|
}
|
648
|
675
|
|
649
|
|
- .ActivePersonnelBox2 {
|
|
676
|
+ .ActivePersonnelBox2 {
|
650
|
677
|
width: 90%;
|
651
|
678
|
height: 1.83rem;
|
652
|
679
|
border-radius: 0.15rem;
|
653
|
680
|
margin-bottom: 0.11rem;
|
654
|
|
- border: 0.04rem solid rgba(126,100,86,1);
|
|
681
|
+ border: 0.04rem solid rgba(126, 100, 86, 1);
|
655
|
682
|
|
656
|
683
|
img {
|
657
|
684
|
width: 100%;
|
|
@@ -674,7 +701,7 @@ export default {
|
674
|
701
|
.ballot2 {
|
675
|
702
|
position: absolute;
|
676
|
703
|
top: 0;
|
677
|
|
- background: rgba(126,100,86,1);
|
|
704
|
+ background: rgba(126, 100, 86, 1);
|
678
|
705
|
border-radius: 0 0 0.08rem 0.08rem;
|
679
|
706
|
padding: 0.02rem 0.12rem;
|
680
|
707
|
font-size: 0.14rem;
|
|
@@ -707,7 +734,7 @@ export default {
|
707
|
734
|
width: 56%;
|
708
|
735
|
height: 0.23rem;
|
709
|
736
|
border-radius: 0.25rem;
|
710
|
|
- background-color: rgba(126,100,86,1);
|
|
737
|
+ background-color: rgba(126, 100, 86, 1);
|
711
|
738
|
border: none;
|
712
|
739
|
font-size: 0.14rem;
|
713
|
740
|
font-weight: bolder;
|
|
@@ -736,61 +763,59 @@ export default {
|
736
|
763
|
}
|
737
|
764
|
}
|
738
|
765
|
|
739
|
|
- .btn{
|
740
|
|
- width: 100%;
|
|
766
|
+ .btn {
|
|
767
|
+ width: 100%;
|
741
|
768
|
height: 0.6rem;
|
742
|
769
|
display: flex;
|
743
|
770
|
justify-content: center;
|
744
|
771
|
align-items: center;
|
745
|
|
- background: rgba(255,255,255,1);
|
|
772
|
+ background: rgba(255, 255, 255, 1);
|
746
|
773
|
position: fixed;
|
747
|
774
|
bottom: 0;
|
748
|
775
|
left: 0;
|
749
|
776
|
z-index: 100;
|
750
|
777
|
|
751
|
|
- .signupBtnOne {
|
752
|
|
- width: 91%;
|
753
|
|
- height: 0.5rem;
|
754
|
|
- border-radius: 0.25rem;
|
755
|
|
- background: rgba(166, 184, 201, 1);
|
756
|
|
- border: none;
|
757
|
|
- font-size: 0.2rem;
|
758
|
|
- font-weight: bold;
|
759
|
|
- color: rgba(255, 255, 255, 1);
|
760
|
|
- line-height: 0.28rem;
|
761
|
|
- // position: fixed;
|
762
|
|
- // bottom: 0.19rem;
|
763
|
|
- // left: calc(4.25%);
|
764
|
|
- // z-index: 100;
|
765
|
|
- }
|
766
|
|
- .signupBtnTwo {
|
767
|
|
- width: 91%;
|
768
|
|
- height: 0.5rem;
|
769
|
|
- border-radius: 0.25rem;
|
770
|
|
- background: rgba(173, 145, 129, 1);
|
771
|
|
- border: none;
|
772
|
|
- font-size: 0.2rem;
|
773
|
|
- font-weight: bold;
|
774
|
|
- color: rgba(255, 255, 255, 1);
|
775
|
|
- line-height: 0.28rem;
|
776
|
|
- // position: fixed;
|
777
|
|
- // bottom: 0.19rem;
|
778
|
|
- // left: calc(4.25%);
|
779
|
|
- // z-index: 100;
|
780
|
|
- }
|
781
|
|
-
|
|
778
|
+ .signupBtnOne {
|
|
779
|
+ width: 91%;
|
|
780
|
+ height: 0.5rem;
|
|
781
|
+ border-radius: 0.25rem;
|
|
782
|
+ background: rgba(166, 184, 201, 1);
|
|
783
|
+ border: none;
|
|
784
|
+ font-size: 0.2rem;
|
|
785
|
+ font-weight: bold;
|
|
786
|
+ color: rgba(255, 255, 255, 1);
|
|
787
|
+ line-height: 0.28rem;
|
|
788
|
+ // position: fixed;
|
|
789
|
+ // bottom: 0.19rem;
|
|
790
|
+ // left: calc(4.25%);
|
|
791
|
+ // z-index: 100;
|
|
792
|
+ }
|
|
793
|
+ .signupBtnTwo {
|
|
794
|
+ width: 91%;
|
|
795
|
+ height: 0.5rem;
|
|
796
|
+ border-radius: 0.25rem;
|
|
797
|
+ background: rgba(173, 145, 129, 1);
|
|
798
|
+ border: none;
|
|
799
|
+ font-size: 0.2rem;
|
|
800
|
+ font-weight: bold;
|
|
801
|
+ color: rgba(255, 255, 255, 1);
|
|
802
|
+ line-height: 0.28rem;
|
|
803
|
+ // position: fixed;
|
|
804
|
+ // bottom: 0.19rem;
|
|
805
|
+ // left: calc(4.25%);
|
|
806
|
+ // z-index: 100;
|
|
807
|
+ }
|
782
|
808
|
}
|
783
|
|
-
|
784
|
809
|
}
|
785
|
810
|
|
786
|
811
|
.theme1 {
|
787
|
812
|
// background-image: url('../../assets/bgimg.jpg');
|
788
|
|
- background: rgba(209,220,228,1);
|
789
|
|
- }
|
790
|
|
- .theme2 {
|
|
813
|
+ background: rgba(209, 220, 228, 1);
|
|
814
|
+}
|
|
815
|
+.theme2 {
|
791
|
816
|
// background-image: url('../../assets/bgimg.jpg');
|
792
|
|
- background: linear-gradient(#97796c,#705443);
|
793
|
|
- }
|
|
817
|
+ background: linear-gradient(#97796c, #705443);
|
|
818
|
+}
|
794
|
819
|
</style>
|
795
|
820
|
|
796
|
821
|
|