...
|
...
|
@@ -222,6 +222,7 @@ Page({ |
|
|
app = app || getApp();
|
|
|
let params = {
|
|
|
position: this.data.luckPosition,
|
|
|
// uid: "600046506"
|
|
|
};
|
|
|
|
|
|
return clockModel.getBrandPicInfos(params).then(res => {
|
...
|
...
|
@@ -315,17 +316,18 @@ Page({ |
|
|
isUnderway: true
|
|
|
});
|
|
|
// 签到之前再次查询是否已经签到过,防止登录接口延迟出现多次签到情况
|
|
|
return this.clockLoginEvent().then(res => {
|
|
|
awardPicInfos = res.data.awardPicInfos;
|
|
|
if (util.get(res, 'data.isSign', 'N') === 'Y') {
|
|
|
return {
|
|
|
code: 401,
|
|
|
data: {},
|
|
|
message: '今天已经签到过啦,明天再来!'
|
|
|
};
|
|
|
}
|
|
|
return getUserLocation();
|
|
|
}).then(lres => {
|
|
|
// return this.clockLoginEvent().then(res => {
|
|
|
// awardPicInfos = res.data.awardPicInfos;
|
|
|
// if (util.get(res, 'data.isSign', 'N') === 'Y') {
|
|
|
// return {
|
|
|
// code: 401,
|
|
|
// data: {},
|
|
|
// message: '今天已经签到过啦,明天再来!'
|
|
|
// };
|
|
|
// }
|
|
|
// return getUserLocation();
|
|
|
// })
|
|
|
return getUserLocation().then(lres => {
|
|
|
//请求问题,此处提示,可以提示未中奖
|
|
|
if (lres.code !== 200) {
|
|
|
return this._showToast(lres);
|
...
|
...
|
@@ -334,6 +336,7 @@ Page({ |
|
|
return clockModel.signAward({
|
|
|
longitude: lres.data.longitude,
|
|
|
latitude: lres.data.latitude,
|
|
|
// uid: "600046506"
|
|
|
}).then(sres => {
|
|
|
//执行提示,是否中奖
|
|
|
if (sres.code !== 200) {
|
...
|
...
|
|