Authored by bevishuang

签到抽奖优化

@@ -222,6 +222,7 @@ Page({ @@ -222,6 +222,7 @@ Page({
222 app = app || getApp(); 222 app = app || getApp();
223 let params = { 223 let params = {
224 position: this.data.luckPosition, 224 position: this.data.luckPosition,
  225 + // uid: "600046506"
225 }; 226 };
226 227
227 return clockModel.getBrandPicInfos(params).then(res => { 228 return clockModel.getBrandPicInfos(params).then(res => {
@@ -315,17 +316,18 @@ Page({ @@ -315,17 +316,18 @@ Page({
315 isUnderway: true 316 isUnderway: true
316 }); 317 });
317 // 签到之前再次查询是否已经签到过,防止登录接口延迟出现多次签到情况 318 // 签到之前再次查询是否已经签到过,防止登录接口延迟出现多次签到情况
318 - return this.clockLoginEvent().then(res => {  
319 - awardPicInfos = res.data.awardPicInfos;  
320 - if (util.get(res, 'data.isSign', 'N') === 'Y') {  
321 - return {  
322 - code: 401,  
323 - data: {},  
324 - message: '今天已经签到过啦,明天再来!'  
325 - };  
326 - }  
327 - return getUserLocation();  
328 - }).then(lres => { 319 + // return this.clockLoginEvent().then(res => {
  320 + // awardPicInfos = res.data.awardPicInfos;
  321 + // if (util.get(res, 'data.isSign', 'N') === 'Y') {
  322 + // return {
  323 + // code: 401,
  324 + // data: {},
  325 + // message: '今天已经签到过啦,明天再来!'
  326 + // };
  327 + // }
  328 + // return getUserLocation();
  329 + // })
  330 + return getUserLocation().then(lres => {
329 //请求问题,此处提示,可以提示未中奖 331 //请求问题,此处提示,可以提示未中奖
330 if (lres.code !== 200) { 332 if (lres.code !== 200) {
331 return this._showToast(lres); 333 return this._showToast(lres);
@@ -334,6 +336,7 @@ Page({ @@ -334,6 +336,7 @@ Page({
334 return clockModel.signAward({ 336 return clockModel.signAward({
335 longitude: lres.data.longitude, 337 longitude: lres.data.longitude,
336 latitude: lres.data.latitude, 338 latitude: lres.data.latitude,
  339 + // uid: "600046506"
337 }).then(sres => { 340 }).then(sres => {
338 //执行提示,是否中奖 341 //执行提示,是否中奖
339 if (sres.code !== 200) { 342 if (sres.code !== 200) {
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 <view class="overflow-hidden-block-start"> 13 <view class="overflow-hidden-block-start">
14 <image mode="widthFix" wx:if="{{item.path}}" src="{{helper.imgView(item.path, 100, 100)}}"></image> 14 <image mode="widthFix" wx:if="{{item.path}}" src="{{helper.imgView(item.path, 100, 100)}}"></image>
15 </view> 15 </view>
16 - <my-login-page bindloginSuccessCallback="clockLoginEvent"></my-login-page> 16 + <my-login bindloginSuccessCallback="clockAreaTap"></my-login>
17 <button wx:if="{{hasLocationSetting}}" class="form-sub" formType="submit" type="default" hover-class="none"></button> 17 <button wx:if="{{hasLocationSetting}}" class="form-sub" formType="submit" type="default" hover-class="none"></button>
18 <button wx:else class="form-sub" type='default' hover-class='none' bindtap='openMsg'></button> 18 <button wx:else class="form-sub" type='default' hover-class='none' bindtap='openMsg'></button>
19 </view> 19 </view>
@@ -61,11 +61,11 @@ @@ -61,11 +61,11 @@
61 <image mode="widthFix" src="{{helper.image(userPrize.picPath, 180, 180)}}"></image> 61 <image mode="widthFix" src="{{helper.image(userPrize.picPath, 180, 180)}}"></image>
62 </view> 62 </view>
63 <!-- </view> --> 63 <!-- </view> -->
64 - <text class="clock-result-p1 ellipsis">{{userPrize.name}}</text>  
65 - <view class="clock-result-p2">奖品已经放入您的账户</view> 64 + <text class="clock-result-p1 ellipsis" >{{userPrize.name}}</text>
  65 + <view class="clock-result-p2" wx:if="{{userPrize.type !== 4}}">奖品已经放入您的账户</view>
66 66
67 </view> 67 </view>
68 - <navigator url="/pages/home/index" open-type="switchTab" hover-class="none" class="clock-result-go">去看看</navigator> 68 + <navigator url="/pages/home/index" open-type="switchTab" hover-class="none" class="clock-result-go" wx:if="{{userPrize.type === 2}}">去看看</navigator>
69 </view> 69 </view>
70 </view> 70 </view>
71 </block> 71 </block>
@@ -187,7 +187,7 @@ page { @@ -187,7 +187,7 @@ page {
187 height: 180rpx; 187 height: 180rpx;
188 line-height: 180rpx; 188 line-height: 180rpx;
189 /* background-color: #e5e5e5; */ 189 /* background-color: #e5e5e5; */
190 - border-radius: 50%; 190 + /* border-radius: 50%; */
191 overflow: hidden; 191 overflow: hidden;
192 display: inline-block; 192 display: inline-block;
193 } 193 }