|
@@ -1,7 +1,7 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div class="context">
|
3
|
3
|
<img class="BannerImage" :src="activity.Banner">
|
4
|
|
- <div class="search">
|
|
4
|
+ <div :class="isOK?searchs:searchb">
|
5
|
5
|
<input placeholder="输入编号或姓名" v-model="q">
|
6
|
6
|
<img class="IconSearch" :src="IconSearch" @click="search">
|
7
|
7
|
<!-- <i class="iconfont icon-sousuo3 IconSearch"></i> -->
|
|
@@ -74,22 +74,29 @@ export default {
|
74
|
74
|
name: "lotterylist",
|
75
|
75
|
data() {
|
76
|
76
|
return {
|
77
|
|
- // AudioPlay: '',
|
78
|
|
- IconSearch: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/voting/yttj_icon_search.png',
|
79
|
|
- tab:'',
|
80
|
|
- q:'',
|
|
77
|
+ // AudioPlay: ''
|
|
78
|
+ isOK:true,
|
|
79
|
+ searchs:'searchs',
|
|
80
|
+ searchb:'searchb',
|
|
81
|
+ IconSearch:
|
|
82
|
+ "https://spaceofcheng.oss-cn-beijing.aliyuncs.com/voting/yttj_icon_search.png",
|
|
83
|
+ tab: "",
|
|
84
|
+ q: "",
|
81
|
85
|
loading: false,
|
82
|
86
|
finished: false,
|
83
|
|
- actid: '',
|
|
87
|
+ actid: "",
|
84
|
88
|
newpage: 1,
|
85
|
89
|
toppage: 1,
|
86
|
90
|
show: false,
|
87
|
|
- refreshing: false,
|
88
|
91
|
pageSize: 10,
|
89
|
92
|
};
|
90
|
93
|
},
|
91
|
94
|
components: {
|
92
|
|
- toast,
|
|
95
|
+ toast
|
|
96
|
+ },
|
|
97
|
+ mounted() {
|
|
98
|
+ window.addEventListener("scroll", this.handleScroll, true);
|
|
99
|
+ // 监听(绑定)滚轮 滚动事件
|
93
|
100
|
},
|
94
|
101
|
computed: {
|
95
|
102
|
...mapactivityState({
|
|
@@ -139,41 +146,67 @@ export default {
|
139
|
146
|
'vote',
|
140
|
147
|
'getMine',
|
141
|
148
|
]),
|
|
149
|
+ handleScroll() {
|
|
150
|
+ // 页面滚动距顶部距离
|
|
151
|
+ var scrollTop =
|
|
152
|
+ window.pageYOffset ||
|
|
153
|
+ document.documentElement.scrollTop ||
|
|
154
|
+ document.body.scrollTop;
|
|
155
|
+ window.console.log(scrollTop);
|
|
156
|
+ if(scrollTop>=280){
|
|
157
|
+ this.isOK =false;
|
|
158
|
+ }else {
|
|
159
|
+ this.isOK=true;
|
|
160
|
+ }
|
|
161
|
+
|
|
162
|
+ var scroll = scrollTop - this.i;
|
|
163
|
+ this.i = scrollTop;
|
|
164
|
+
|
|
165
|
+ // if (scroll < 0) {
|
|
166
|
+ // this.isFixed =false;
|
|
167
|
+ // console.log("up");
|
|
168
|
+ // } else {
|
|
169
|
+ // if(this.i>=280){
|
|
170
|
+ // this.isFixed =true;
|
|
171
|
+ // }
|
|
172
|
+ // console.log("down");
|
|
173
|
+ // }
|
|
174
|
+ },
|
142
|
175
|
newlist() {
|
143
|
176
|
return this.getList({
|
144
|
177
|
actid: this.actid,
|
145
|
178
|
page: this.newpage,
|
146
|
|
- q: this.q,
|
147
|
|
- })
|
|
179
|
+ q: this.q
|
|
180
|
+ });
|
148
|
181
|
},
|
149
|
182
|
toplist() {
|
150
|
183
|
return this.getTopList({
|
151
|
184
|
actid: this.actid,
|
152
|
185
|
page: this.toppage,
|
153
|
|
- q: this.q,
|
154
|
|
- })
|
|
186
|
+ q: this.q
|
|
187
|
+ });
|
155
|
188
|
},
|
156
|
189
|
Vote(memberid) {
|
157
|
190
|
this.vote({
|
158
|
191
|
actid: this.actid,
|
159
|
192
|
memberid: memberid,
|
160
|
|
- openid: this.user,
|
|
193
|
+ openid: this.user
|
161
|
194
|
}).then(() => {
|
162
|
195
|
const newlist = this.newList.map(x => {
|
163
|
196
|
if (x.MemberId == memberid) {
|
164
|
|
- x.Vote = x.Vote + 1
|
|
197
|
+ x.Vote = x.Vote + 1;
|
165
|
198
|
}
|
166
|
|
- return x
|
167
|
|
- })
|
168
|
|
- this.newList = newlist
|
|
199
|
+ return x;
|
|
200
|
+ });
|
|
201
|
+ this.newList = newlist;
|
169
|
202
|
const toplist = this.topList.map(x => {
|
170
|
203
|
if (x.MemberId == memberid) {
|
171
|
|
- x.Vote = x.Vote + 1
|
|
204
|
+ x.Vote = x.Vote + 1;
|
172
|
205
|
}
|
173
|
|
- return x
|
174
|
|
- })
|
175
|
|
- this.topList = toplist
|
176
|
|
- })
|
|
206
|
+ return x;
|
|
207
|
+ });
|
|
208
|
+ this.topList = toplist;
|
|
209
|
+ });
|
177
|
210
|
},
|
178
|
211
|
loadNewList() {
|
179
|
212
|
this.newlist().then((res) => {
|
|
@@ -199,24 +232,24 @@ export default {
|
199
|
232
|
},
|
200
|
233
|
signup() {
|
201
|
234
|
this.$router.push({
|
202
|
|
- path: `/vote/signup/${this.actid}`,
|
|
235
|
+ path: `/vote/signup/${this.actid}`
|
203
|
236
|
});
|
204
|
237
|
},
|
205
|
238
|
gotovotingdetails(memberid) {
|
206
|
239
|
this.$router.push({
|
207
|
240
|
path: `/detail/${this.actid}/${memberid}`
|
208
|
|
- })
|
|
241
|
+ });
|
209
|
242
|
},
|
210
|
243
|
close() {
|
211
|
|
- this.show = false
|
|
244
|
+ this.show = false;
|
212
|
245
|
},
|
213
|
246
|
tolink() {
|
214
|
|
- window.location.href = this.info.AfterVote
|
|
247
|
+ window.location.href = this.info.AfterVote;
|
215
|
248
|
},
|
216
|
249
|
search() {
|
217
|
|
- this.newlist()
|
218
|
|
- this.toplist()
|
219
|
|
- },
|
|
250
|
+ this.newlist();
|
|
251
|
+ this.toplist();
|
|
252
|
+ }
|
220
|
253
|
}
|
221
|
254
|
};
|
222
|
255
|
</script>
|
|
@@ -232,7 +265,7 @@ export default {
|
232
|
265
|
}
|
233
|
266
|
.van-tabs__wrap {
|
234
|
267
|
width: 100%;
|
235
|
|
- z-index: 1;
|
|
268
|
+ z-index: 0;
|
236
|
269
|
}
|
237
|
270
|
.van-tabs__nav--card .van-tab.van-tab--active {
|
238
|
271
|
background-color: rgba(166, 184, 201, 1);
|
|
@@ -273,11 +306,48 @@ export default {
|
273
|
306
|
|
274
|
307
|
.BannerImage {
|
275
|
308
|
width: 100%;
|
276
|
|
- height: 2rem;
|
277
|
|
- margin-bottom: 0.2rem;
|
|
309
|
+ height: 3.4rem;
|
278
|
310
|
}
|
|
311
|
+.searchb{
|
|
312
|
+ width: 93%;
|
|
313
|
+ height: 0.44rem;
|
|
314
|
+ background-color: rgba(201, 214, 224, 1);
|
|
315
|
+ border-radius: 6px;
|
|
316
|
+ border: 0.01rem solid rgba(255, 255, 255, 1);
|
|
317
|
+ display: flex;
|
|
318
|
+ flex-direction: row;
|
|
319
|
+ justify-content: space-between;
|
|
320
|
+ align-items: center;
|
|
321
|
+ position: fixed;
|
|
322
|
+ top: 0;
|
|
323
|
+ left: calc(3.1%);
|
279
|
324
|
|
280
|
|
- .search {
|
|
325
|
+ input {
|
|
326
|
+ // padding: 0.11rem 1.2rem 0.11rem 0.13rem;
|
|
327
|
+ background-color: rgba(255, 255, 255, 0);
|
|
328
|
+ color: rgba(255, 255, 255, 1);
|
|
329
|
+ font-size: 0.16rem;
|
|
330
|
+ font-family: PingFangSC-Regular;
|
|
331
|
+ font-weight: 400;
|
|
332
|
+ line-height: 0.22rem;
|
|
333
|
+ width: 5rem;
|
|
334
|
+ text-indent: 0.1rem;
|
|
335
|
+ }
|
|
336
|
+ input::-webkit-input-placeholder {
|
|
337
|
+ color: rgba(255, 255, 255, 1);
|
|
338
|
+ font-size: 0.16rem;
|
|
339
|
+ font-family: PingFangSC-Regular;
|
|
340
|
+ font-weight: 400;
|
|
341
|
+ line-height: 0.22rem;
|
|
342
|
+ }
|
|
343
|
+ .IconSearch {
|
|
344
|
+ width: 0.2rem;
|
|
345
|
+ height: 0.2rem;
|
|
346
|
+ margin-right: 0.1rem;
|
|
347
|
+ }
|
|
348
|
+
|
|
349
|
+}
|
|
350
|
+ .searchs {
|
281
|
351
|
width: 93%;
|
282
|
352
|
height: 0.44rem;
|
283
|
353
|
background-color: rgba(201, 214, 224, 1);
|
|
@@ -287,7 +357,9 @@ export default {
|
287
|
357
|
flex-direction: row;
|
288
|
358
|
justify-content: space-between;
|
289
|
359
|
align-items: center;
|
290
|
|
- margin-bottom: 0.19rem;
|
|
360
|
+ position: absolute;
|
|
361
|
+ top: 2.8rem;
|
|
362
|
+ left: calc(3.1%);
|
291
|
363
|
|
292
|
364
|
input {
|
293
|
365
|
// padding: 0.11rem 1.2rem 0.11rem 0.13rem;
|
|
@@ -312,20 +384,17 @@ export default {
|
312
|
384
|
width: 0.2rem;
|
313
|
385
|
height: 0.2rem;
|
314
|
386
|
margin-right: 0.1rem;
|
315
|
|
- // font-size: 0.3rem !important;
|
316
|
|
- // color: rgba(255, 255, 255, 1) !important;
|
317
|
|
- // padding-right: 0.1rem;
|
318
|
387
|
}
|
319
|
388
|
}
|
320
|
389
|
.informationimg {
|
321
|
390
|
width: 97%;
|
322
|
391
|
height: 6.24rem;
|
323
|
|
- margin: 0 0.1rem 0.35rem 0;
|
324
|
392
|
}
|
325
|
393
|
|
326
|
394
|
.box {
|
327
|
395
|
width: 89%;
|
328
|
396
|
height: 0.12rem;
|
|
397
|
+ margin-top: 0.35rem;
|
329
|
398
|
background-color: rgba(255, 255, 255, 0.29);
|
330
|
399
|
border-radius: 0.06rem 0.06rem 0 0;
|
331
|
400
|
}
|
|
@@ -447,7 +516,9 @@ export default {
|
447
|
516
|
font-weight: bold;
|
448
|
517
|
color: rgba(255, 255, 255, 1);
|
449
|
518
|
line-height: 0.28rem;
|
450
|
|
- margin-bottom: 0.19rem;
|
|
519
|
+ position: fixed;
|
|
520
|
+ bottom: 0.19rem;
|
|
521
|
+ left: calc(4.25%);
|
451
|
522
|
}
|
452
|
523
|
}
|
453
|
524
|
</style>
|