...
|
...
|
@@ -3,6 +3,7 @@ import util from '../../utils/util'; |
|
|
import accountModel from '../../models/account/index';
|
|
|
import clockModel from '../../models/activity/clock/index';
|
|
|
import {
|
|
|
goLogin,
|
|
|
getUserLocation
|
|
|
} from '../../common/login';
|
|
|
import resource from '../../common/resource';
|
...
|
...
|
@@ -61,11 +62,26 @@ Page({ |
|
|
});
|
|
|
});
|
|
|
},
|
|
|
onShow: function() {
|
|
|
app = app || getApp();
|
|
|
|
|
|
if (!(app && app.getUid())) {
|
|
|
|
|
|
return goLogin().then(res => {
|
|
|
console.log()
|
|
|
});
|
|
|
} else {
|
|
|
return this.clockLoginEvent().then(res => {
|
|
|
wx.hideLoading();
|
|
|
return res;
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
onReady: function() {
|
|
|
return this.clockLoginEvent().then(res => {
|
|
|
wx.hideLoading();
|
|
|
return res;
|
|
|
});
|
|
|
// return this.clockLoginEvent().then(res => {
|
|
|
// wx.hideLoading();
|
|
|
// return res;
|
|
|
// });
|
|
|
},
|
|
|
onShareAppMessage: function() {
|
|
|
return {
|
...
|
...
|
@@ -312,9 +328,9 @@ Page({ |
|
|
// return Promise.resolve(false);
|
|
|
|
|
|
|
|
|
this.setData({
|
|
|
isUnderway: true
|
|
|
});
|
|
|
// this.setData({
|
|
|
// isUnderway: true
|
|
|
// });
|
|
|
// 签到之前再次查询是否已经签到过,防止登录接口延迟出现多次签到情况
|
|
|
// return this.clockLoginEvent().then(res => {
|
|
|
// awardPicInfos = res.data.awardPicInfos;
|
...
|
...
|
|