@@ -20,6 +20,9 @@ Page({ | |||
shareId:null, | |||
isFriendShare:false,//是否朋友分享过来的 | |||
isAddress:false,//是否有地址 | |||
getReward:null, | |||
tipWindow:0, | |||
}, | |||
/** | |||
* 关闭任务窗 | |||
@@ -197,13 +200,20 @@ Page({ | |||
getTaskAward:function(){//领取购车券 | |||
wx.wxRequest(app.globalData.urlRoot + "task/getTaskAward", { awardGiveId: this.data.picturlList[this.data.picturlCurrent]['awardGiveId']},res=>{ | |||
if(res.code==200){ | |||
if (this.data.isAddress){ | |||
wx.redirectTo({ | |||
url: '/pages/myCenter/myCenter' | |||
}) | |||
}else{ | |||
wx.navigateTo({ | |||
url: '/pages/address/address', | |||
this.setData({ | |||
getReward:res.data | |||
}) | |||
if (res.data.needAddress && this.data.isAddress) { | |||
this.setData({ | |||
tipWindow:2 | |||
}) | |||
} else if (res.data.needAddress==0){ | |||
this.setData({ | |||
tipWindow: 2 | |||
}) | |||
} else if (res.data.needAddress && !this.data.isAddress){ | |||
this.setData({ | |||
tipWindow: 1 | |||
}) | |||
} | |||
}else{ | |||
@@ -214,6 +224,16 @@ Page({ | |||
} | |||
},this); | |||
}, | |||
receive:function(){ | |||
wx.redirectTo({ | |||
url: '/pages/myCenter/myCenter' | |||
}) | |||
}, | |||
userRegister: function () { | |||
wx.navigateTo({ | |||
url: '/pages/address/address', | |||
}) | |||
}, | |||
getSignInfo: function () {//查看当日是否签到 | |||
app.wxRequest(app.globalData.urlRoot + "task/getSignInfo", {}, res => { | |||
this.getShareId(); |
@@ -82,4 +82,16 @@ | |||
<view class="openTask" bindtap="ruleControl" data-state="{{false}}">开启任务</view> | |||
</view> | |||
</view> | |||
<view class="successPop" wx:if="{{tipWindow}}"> | |||
<view class="successGroup"> | |||
<image class="gameRuleClose2" bindtap="closeWindow" style="top:-31rpx;right:-29rpx;" src="{{imgUrl+'/images/gameRuleClose.png'}}"></image> | |||
<image class="successIcon" src="{{imgUrl+'/images/successIcon.png'}}"></image> | |||
<view class="titleGroup"></view> | |||
<view class="successTip">幸运满格,大奖到手</view> | |||
<image class="prizePic" src="{{getReward.awardPicUrl}}" mode="aspectFit"></image> | |||
<view class="prizeName">{{getReward.awardName}}</view> | |||
<view class="startRegister" wx:if="{{tipWindow==1}}" bindtap="receive">立即领取</view> | |||
<view class="startRegister" wx:if="{{tipWindow==2}}" bindtap="userRegister">立即注册</view> | |||
</view> | |||
</view> | |||
<tabBar></tabBar> |
@@ -358,4 +358,84 @@ | |||
.gameRuleIcon{ | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.successPop{ | |||
position: fixed; | |||
top: 0; | |||
left: 0; | |||
width: 100%; | |||
height: calc(100vh - 150rpx); | |||
background-color: rgba( 000, 000, 000, 0.3); | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
} | |||
.successGroup{ | |||
position: relative; | |||
width:455rpx; | |||
height:426rpx; | |||
background-color: white; | |||
display: flex; | |||
flex-direction: column; | |||
align-items: center; | |||
border-radius: 20rpx; | |||
} | |||
.successIcon{ | |||
position: absolute; | |||
top: -33rpx; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
width: 114rpx; | |||
height: 114rpx; | |||
} | |||
.titleGroup{ | |||
width: 100%; | |||
height: 63rpx; | |||
background-color: #355485; | |||
border-top-left-radius: 20rpx; | |||
border-top-right-radius: 20rpx; | |||
} | |||
.prizePic{ | |||
width: 310rpx; | |||
height: 116rpx; | |||
margin-bottom: 10rpx; | |||
} | |||
.successTip{ | |||
font-size:28rpx; | |||
font-family:PingFangSC; | |||
font-weight:bold; | |||
color:rgba(52,84,132,1); | |||
line-height: 28rpx; | |||
text-align: center; | |||
margin-top: 50rpx; | |||
margin-bottom: 13rpx; | |||
} | |||
.prizeName{ | |||
font-size:21rpx; | |||
font-family:PingFangSC; | |||
font-weight:400; | |||
color:rgba(0,0,0,1); | |||
line-height:21rpx; | |||
text-align: center; | |||
margin-bottom: 30rpx; | |||
} | |||
.gameRuleClose2{ | |||
position: absolute; | |||
top: 0rpx; | |||
right: -10rpx; | |||
width: 31rpx; | |||
height: 29rpx; | |||
} | |||
.startRegister{ | |||
width:278rpx; | |||
height:50rpx; | |||
background-color: #345489; | |||
border-radius: 15rpx; | |||
text-align: center; | |||
font-size:21rpx; | |||
font-family:PingFangSC; | |||
font-weight:400; | |||
color:rgba(255,255,255,1); | |||
line-height:50rpx; | |||
position: relative; | |||
} |
@@ -14,7 +14,7 @@ | |||
<view class="prizeTipLine"></view> | |||
</view> | |||
<view class="tipContentGroup"> | |||
<scroll-view class="scrollSty" bindscrolltolower="getMore" scroll-left="{{scrollNum}}" scroll-x="{{true}}"><view class="tipContent" wx:for="{{gameAwardList}}" wx:key="index">{{"恭喜"+item.nickName+"获得"+item.awardName}}</view></scroll-view> | |||
<scroll-view class="scrollSty" bindscrolltolower="getMore" scroll-left="{{scrollNum}}" scroll-x="{{true}}"><view class="tipContent" style="width: 672rpx;"></view><view class="tipContent" wx:for="{{gameAwardList}}" wx:key="index">{{"恭喜"+item.nickName+"获得"+item.awardName}}</view></scroll-view> | |||
<!-- <view class="scrollMask"></view> --> | |||
</view> | |||
<view class="prizeLookGroup"> |
@@ -380,4 +380,8 @@ view{ | |||
width: 100%; | |||
height: 100%; | |||
opacity: 0; | |||
} | |||
.scrollFirstView{ | |||
width:712rpx; | |||
height:72rpx; | |||
} |