|
@@ -159,7 +159,7 @@ export default {
|
159
|
159
|
this.isOK=true;
|
160
|
160
|
}
|
161
|
161
|
|
162
|
|
- var scroll = scrollTop - this.i;
|
|
162
|
+ // var scroll = scrollTop - this.i;
|
163
|
163
|
this.i = scrollTop;
|
164
|
164
|
|
165
|
165
|
// if (scroll < 0) {
|
|
@@ -187,26 +187,36 @@ export default {
|
187
|
187
|
});
|
188
|
188
|
},
|
189
|
189
|
Vote(memberid) {
|
190
|
|
- this.vote({
|
191
|
|
- actid: this.actid,
|
192
|
|
- memberid: memberid,
|
193
|
|
- openid: this.user
|
194
|
|
- }).then(() => {
|
195
|
|
- const newlist = this.newList.map(x => {
|
196
|
|
- if (x.MemberId == memberid) {
|
197
|
|
- x.Vote = x.Vote + 1;
|
198
|
|
- }
|
199
|
|
- return x;
|
200
|
|
- });
|
201
|
|
- this.newList = newlist;
|
202
|
|
- const toplist = this.topList.map(x => {
|
203
|
|
- if (x.MemberId == memberid) {
|
204
|
|
- x.Vote = x.Vote + 1;
|
|
190
|
+ this.$dialog.confirm({ message: '确定投票给当前用户?' }).then(() => {
|
|
191
|
+ this.vote({
|
|
192
|
+ actid: this.actid,
|
|
193
|
+ memberid: memberid,
|
|
194
|
+ openid: this.user
|
|
195
|
+ }).then(() => {
|
|
196
|
+ const newlist = this.newList.map(x => {
|
|
197
|
+ if (x.MemberId == memberid) {
|
|
198
|
+ x.Vote = x.Vote + 1;
|
|
199
|
+ }
|
|
200
|
+ return x;
|
|
201
|
+ });
|
|
202
|
+ this.newList = newlist;
|
|
203
|
+ const toplist = this.topList.map(x => {
|
|
204
|
+ if (x.MemberId == memberid) {
|
|
205
|
+ x.Vote = x.Vote + 1;
|
|
206
|
+ }
|
|
207
|
+ return x;
|
|
208
|
+ });
|
|
209
|
+ this.topList = toplist;
|
|
210
|
+
|
|
211
|
+ if (this.activity.AfterVote) {
|
|
212
|
+ this.$dialog.alert({ title: '投票成功', message: '恭喜您获得一次抽奖机会!' }).then(() => {
|
|
213
|
+ window.location.href = this.activity.AfterVote
|
|
214
|
+ })
|
|
215
|
+ } else {
|
|
216
|
+ this.$dialog.alert({ message: '投票成功' })
|
205
|
217
|
}
|
206
|
|
- return x;
|
207
|
218
|
});
|
208
|
|
- this.topList = toplist;
|
209
|
|
- });
|
|
219
|
+ })
|
210
|
220
|
},
|
211
|
221
|
loadNewList() {
|
212
|
222
|
this.newlist().then((res) => {
|