|
@@ -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> -->
|
|
@@ -55,7 +55,7 @@
|
55
|
55
|
|
56
|
56
|
<script>
|
57
|
57
|
import { createNamespacedHelpers } from "vuex";
|
58
|
|
-import toast from '../../components/toast.vue'
|
|
58
|
+import toast from "../../components/toast.vue";
|
59
|
59
|
|
60
|
60
|
const {
|
61
|
61
|
mapState: mapactivityState,
|
|
@@ -66,79 +66,109 @@ export default {
|
66
|
66
|
name: "lotterylist",
|
67
|
67
|
data() {
|
68
|
68
|
return {
|
69
|
|
- // AudioPlay: '',
|
70
|
|
- IconSearch: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/voting/yttj_icon_search.png',
|
71
|
|
- tab:'',
|
72
|
|
- q:'',
|
|
69
|
+ // AudioPlay: ''
|
|
70
|
+ isOK:true,
|
|
71
|
+ searchs:'searchs',
|
|
72
|
+ searchb:'searchb',
|
|
73
|
+ IconSearch:
|
|
74
|
+ "https://spaceofcheng.oss-cn-beijing.aliyuncs.com/voting/yttj_icon_search.png",
|
|
75
|
+ tab: "",
|
|
76
|
+ q: "",
|
73
|
77
|
loading: false,
|
74
|
78
|
finished: false,
|
75
|
|
- actid: '',
|
|
79
|
+ actid: "",
|
76
|
80
|
newpage: 1,
|
77
|
81
|
toppage: 1,
|
78
|
|
- show: false,
|
|
82
|
+ show: false
|
79
|
83
|
};
|
80
|
84
|
},
|
81
|
85
|
components: {
|
82
|
|
- toast,
|
|
86
|
+ toast
|
|
87
|
+ },
|
|
88
|
+ mounted() {
|
|
89
|
+ window.addEventListener("scroll", this.handleScroll, true);
|
|
90
|
+ // 监听(绑定)滚轮 滚动事件
|
83
|
91
|
},
|
84
|
92
|
computed: {
|
85
|
93
|
...mapactivityState({
|
86
|
94
|
activity: s => s.activity || {},
|
87
|
95
|
newList: x => x.list,
|
88
|
96
|
topList: x => x.toplist,
|
89
|
|
- user: x => x.user,
|
|
97
|
+ user: x => x.user
|
90
|
98
|
})
|
91
|
99
|
},
|
92
|
100
|
created() {
|
93
|
|
- this.actid = this.$route.params.actid
|
|
101
|
+ this.actid = this.$route.params.actid;
|
94
|
102
|
this.getActivity({
|
95
|
|
- actid: this.actid,
|
96
|
|
- })
|
97
|
|
- this.newlist()
|
98
|
|
- this.toplist()
|
|
103
|
+ actid: this.actid
|
|
104
|
+ });
|
|
105
|
+ this.newlist();
|
|
106
|
+ this.toplist();
|
99
|
107
|
},
|
100
|
108
|
methods: {
|
101
|
|
- ...mapactivityActions([
|
102
|
|
- 'getList',
|
103
|
|
- 'getTopList',
|
104
|
|
- 'getActivity',
|
105
|
|
- 'vote',
|
106
|
|
- ]),
|
|
109
|
+ handleScroll() {
|
|
110
|
+ // 页面滚动距顶部距离
|
|
111
|
+ var scrollTop =
|
|
112
|
+ window.pageYOffset ||
|
|
113
|
+ document.documentElement.scrollTop ||
|
|
114
|
+ document.body.scrollTop;
|
|
115
|
+ window.console.log(scrollTop);
|
|
116
|
+ if(scrollTop>=280){
|
|
117
|
+ this.isOK =false;
|
|
118
|
+ }else {
|
|
119
|
+ this.isOK=true;
|
|
120
|
+ }
|
|
121
|
+
|
|
122
|
+ var scroll = scrollTop - this.i;
|
|
123
|
+ this.i = scrollTop;
|
|
124
|
+
|
|
125
|
+ // if (scroll < 0) {
|
|
126
|
+ // this.isFixed =false;
|
|
127
|
+ // console.log("up");
|
|
128
|
+ // } else {
|
|
129
|
+ // if(this.i>=280){
|
|
130
|
+ // this.isFixed =true;
|
|
131
|
+ // }
|
|
132
|
+ // console.log("down");
|
|
133
|
+ // }
|
|
134
|
+ },
|
|
135
|
+
|
|
136
|
+ ...mapactivityActions(["getList", "getTopList", "getActivity", "vote"]),
|
107
|
137
|
newlist() {
|
108
|
138
|
this.getList({
|
109
|
139
|
actid: this.actid,
|
110
|
140
|
page: this.newpage,
|
111
|
|
- q: this.q,
|
112
|
|
- })
|
|
141
|
+ q: this.q
|
|
142
|
+ });
|
113
|
143
|
},
|
114
|
144
|
toplist() {
|
115
|
145
|
this.getTopList({
|
116
|
146
|
actid: this.actid,
|
117
|
147
|
page: this.toppage,
|
118
|
|
- q: this.q,
|
119
|
|
- })
|
|
148
|
+ q: this.q
|
|
149
|
+ });
|
120
|
150
|
},
|
121
|
151
|
Vote(memberid) {
|
122
|
152
|
this.vote({
|
123
|
153
|
actid: this.actid,
|
124
|
154
|
memberid: memberid,
|
125
|
|
- openid: this.user,
|
|
155
|
+ openid: this.user
|
126
|
156
|
}).then(() => {
|
127
|
157
|
const newlist = this.newList.map(x => {
|
128
|
158
|
if (x.MemberId == memberid) {
|
129
|
|
- x.Vote = x.Vote + 1
|
|
159
|
+ x.Vote = x.Vote + 1;
|
130
|
160
|
}
|
131
|
|
- return x
|
132
|
|
- })
|
133
|
|
- this.newList = newlist
|
|
161
|
+ return x;
|
|
162
|
+ });
|
|
163
|
+ this.newList = newlist;
|
134
|
164
|
const toplist = this.topList.map(x => {
|
135
|
165
|
if (x.MemberId == memberid) {
|
136
|
|
- x.Vote = x.Vote + 1
|
|
166
|
+ x.Vote = x.Vote + 1;
|
137
|
167
|
}
|
138
|
|
- return x
|
139
|
|
- })
|
140
|
|
- this.topList = toplist
|
141
|
|
- })
|
|
168
|
+ return x;
|
|
169
|
+ });
|
|
170
|
+ this.topList = toplist;
|
|
171
|
+ });
|
142
|
172
|
},
|
143
|
173
|
onLoad() {
|
144
|
174
|
// 异步更新数据
|
|
@@ -157,24 +187,24 @@ export default {
|
157
|
187
|
},
|
158
|
188
|
signup() {
|
159
|
189
|
this.$router.push({
|
160
|
|
- path: `/vote/signup/${this.actid}`,
|
|
190
|
+ path: `/vote/signup/${this.actid}`
|
161
|
191
|
});
|
162
|
192
|
},
|
163
|
193
|
gotovotingdetails(memberid) {
|
164
|
194
|
this.$router.push({
|
165
|
195
|
path: `/detail/${this.actid}/${memberid}`
|
166
|
|
- })
|
|
196
|
+ });
|
167
|
197
|
},
|
168
|
198
|
close() {
|
169
|
|
- this.show = false
|
|
199
|
+ this.show = false;
|
170
|
200
|
},
|
171
|
201
|
tolink() {
|
172
|
|
- window.location.href = this.info.AfterVote
|
|
202
|
+ window.location.href = this.info.AfterVote;
|
173
|
203
|
},
|
174
|
204
|
search() {
|
175
|
|
- this.newlist()
|
176
|
|
- this.toplist()
|
177
|
|
- },
|
|
205
|
+ this.newlist();
|
|
206
|
+ this.toplist();
|
|
207
|
+ }
|
178
|
208
|
}
|
179
|
209
|
};
|
180
|
210
|
</script>
|
|
@@ -190,7 +220,7 @@ export default {
|
190
|
220
|
}
|
191
|
221
|
.van-tabs__wrap {
|
192
|
222
|
width: 100%;
|
193
|
|
- z-index: 1;
|
|
223
|
+ z-index: 0;
|
194
|
224
|
}
|
195
|
225
|
.van-tabs__nav--card .van-tab.van-tab--active {
|
196
|
226
|
background-color: rgba(166, 184, 201, 1);
|
|
@@ -231,11 +261,48 @@ export default {
|
231
|
261
|
|
232
|
262
|
.BannerImage {
|
233
|
263
|
width: 100%;
|
234
|
|
- height: 2rem;
|
235
|
|
- margin-bottom: 0.2rem;
|
|
264
|
+ height: 3.4rem;
|
236
|
265
|
}
|
|
266
|
+.searchb{
|
|
267
|
+ width: 93%;
|
|
268
|
+ height: 0.44rem;
|
|
269
|
+ background-color: rgba(201, 214, 224, 1);
|
|
270
|
+ border-radius: 6px;
|
|
271
|
+ border: 0.01rem solid rgba(255, 255, 255, 1);
|
|
272
|
+ display: flex;
|
|
273
|
+ flex-direction: row;
|
|
274
|
+ justify-content: space-between;
|
|
275
|
+ align-items: center;
|
|
276
|
+ position: fixed;
|
|
277
|
+ top: 0;
|
|
278
|
+ left: calc(3.1%);
|
237
|
279
|
|
238
|
|
- .search {
|
|
280
|
+ input {
|
|
281
|
+ // padding: 0.11rem 1.2rem 0.11rem 0.13rem;
|
|
282
|
+ background-color: rgba(255, 255, 255, 0);
|
|
283
|
+ color: rgba(255, 255, 255, 1);
|
|
284
|
+ font-size: 0.16rem;
|
|
285
|
+ font-family: PingFangSC-Regular;
|
|
286
|
+ font-weight: 400;
|
|
287
|
+ line-height: 0.22rem;
|
|
288
|
+ width: 5rem;
|
|
289
|
+ text-indent: 0.1rem;
|
|
290
|
+ }
|
|
291
|
+ input::-webkit-input-placeholder {
|
|
292
|
+ color: rgba(255, 255, 255, 1);
|
|
293
|
+ font-size: 0.16rem;
|
|
294
|
+ font-family: PingFangSC-Regular;
|
|
295
|
+ font-weight: 400;
|
|
296
|
+ line-height: 0.22rem;
|
|
297
|
+ }
|
|
298
|
+ .IconSearch {
|
|
299
|
+ width: 0.2rem;
|
|
300
|
+ height: 0.2rem;
|
|
301
|
+ margin-right: 0.1rem;
|
|
302
|
+ }
|
|
303
|
+
|
|
304
|
+}
|
|
305
|
+ .searchs {
|
239
|
306
|
width: 93%;
|
240
|
307
|
height: 0.44rem;
|
241
|
308
|
background-color: rgba(201, 214, 224, 1);
|
|
@@ -245,7 +312,9 @@ export default {
|
245
|
312
|
flex-direction: row;
|
246
|
313
|
justify-content: space-between;
|
247
|
314
|
align-items: center;
|
248
|
|
- margin-bottom: 0.19rem;
|
|
315
|
+ position: absolute;
|
|
316
|
+ top: 2.8rem;
|
|
317
|
+ left: calc(3.1%);
|
249
|
318
|
|
250
|
319
|
input {
|
251
|
320
|
// padding: 0.11rem 1.2rem 0.11rem 0.13rem;
|
|
@@ -270,20 +339,17 @@ export default {
|
270
|
339
|
width: 0.2rem;
|
271
|
340
|
height: 0.2rem;
|
272
|
341
|
margin-right: 0.1rem;
|
273
|
|
- // font-size: 0.3rem !important;
|
274
|
|
- // color: rgba(255, 255, 255, 1) !important;
|
275
|
|
- // padding-right: 0.1rem;
|
276
|
342
|
}
|
277
|
343
|
}
|
278
|
344
|
.informationimg {
|
279
|
345
|
width: 97%;
|
280
|
346
|
height: 6.24rem;
|
281
|
|
- margin: 0 0.1rem 0.35rem 0;
|
282
|
347
|
}
|
283
|
348
|
|
284
|
349
|
.box {
|
285
|
350
|
width: 89%;
|
286
|
351
|
height: 0.12rem;
|
|
352
|
+ margin-top: 0.35rem;
|
287
|
353
|
background-color: rgba(255, 255, 255, 0.29);
|
288
|
354
|
border-radius: 0.06rem 0.06rem 0 0;
|
289
|
355
|
}
|
|
@@ -403,7 +469,9 @@ export default {
|
403
|
469
|
font-weight: bold;
|
404
|
470
|
color: rgba(255, 255, 255, 1);
|
405
|
471
|
line-height: 0.28rem;
|
406
|
|
- margin-bottom: 0.19rem;
|
|
472
|
+ position: fixed;
|
|
473
|
+ bottom: 0.19rem;
|
|
474
|
+ left: calc(4.25%);
|
407
|
475
|
}
|
408
|
476
|
}
|
409
|
477
|
</style>
|