...
|
...
|
@@ -4,7 +4,8 @@ import event from '../../common/event'; |
|
|
import LimitModel from '../../models/limit/index';
|
|
|
import helper from '../../utils/helper';
|
|
|
import wx from '../../utils/wx';
|
|
|
import {Actionsheet} from '../../vendors/zanui/index';
|
|
|
import { Actionsheet } from '../../vendors/zanui/index';
|
|
|
import { stringify } from '../../vendors/query-stringify';
|
|
|
|
|
|
let app = getApp();
|
|
|
let router = global.router;
|
...
|
...
|
@@ -102,7 +103,7 @@ Page(Object.assign({ |
|
|
tempScrollTop: 0, // 手动滚动页面时保存当前滚动的位置
|
|
|
showMsg: 0, // 0不显示提示框, 1显示提示框
|
|
|
hidePopup: 0, // 用于显示头像旁边的气泡 0:显示 1:不显示
|
|
|
hideInviteButton: 0, // 用户显示邀请按钮
|
|
|
hideInviteButton: 1, // 用户显示邀请按钮
|
|
|
actionSheet: {
|
|
|
componentId: 'shareActionSheet',
|
|
|
show: false,
|
...
|
...
|
@@ -162,6 +163,11 @@ Page(Object.assign({ |
|
|
*/
|
|
|
onShow: function(options) {
|
|
|
setTimeout(this.hidePopup, 4000);
|
|
|
if (app.getUid()) {
|
|
|
this.setData({
|
|
|
hideInviteButton: 0
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -343,17 +349,21 @@ Page(Object.assign({ |
|
|
* 点击参加活动按钮
|
|
|
*/
|
|
|
joinInQueue: function(e) {
|
|
|
let uid = app.getUid() || this.data.test_uid[this.data.now_test_uid_index];
|
|
|
let uid = app.getUid();
|
|
|
let activityId = this.data.activityInfo.activityId;
|
|
|
let isEnd = this.data.activityInfo.isEnd === 0 ? 0 : 1;
|
|
|
|
|
|
if (activityId && uid && !isEnd) {
|
|
|
this.addQueue(this.data.activityInfo.activityId, uid);
|
|
|
} else if (isEnd) {
|
|
|
|
|
|
this.setData({
|
|
|
showMsg: 1
|
|
|
});
|
|
|
} else if (!uid) {
|
|
|
let pages = getCurrentPages();
|
|
|
let referer = pages[pages.length - 1].route + '?' + stringify(this.data.shareInfo);
|
|
|
|
|
|
router.go('userCenter', { referer });
|
|
|
}
|
|
|
},
|
|
|
|
...
|
...
|
|