if (friendOpenid) { | if (friendOpenid) { | ||||
this.globalData.friendOpenid = friendOpenid; | this.globalData.friendOpenid = friendOpenid; | ||||
} | } | ||||
var certificationInfo = wx.getStorageSync('certificationInfo'); | |||||
if (certificationInfo) { | |||||
this.globalData.certificationInfo = certificationInfo; | |||||
} | |||||
var userInfoData = wx.getStorageSync("userInfoData"); | var userInfoData = wx.getStorageSync("userInfoData"); | ||||
if (userInfoData){ | if (userInfoData){ | ||||
this.globalData.userInfoData = {}; | this.globalData.userInfoData = {}; | ||||
mobileData:null, | mobileData:null, | ||||
userPhoneType:null, | userPhoneType:null, | ||||
kvurl:null, | kvurl:null, | ||||
kvurlH:0 | |||||
kvurlH:0, | |||||
certificationInfo:false | |||||
}, | }, | ||||
// 获取openId | // 获取openId | ||||
getOpenid: function (code) { | getOpenid: function (code) { |
goScout() { | goScout() { | ||||
app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {}, res => { | app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {}, res => { | ||||
if (res.code == 200) { | if (res.code == 200) { | ||||
if (!app.globalData.certificationInfo) { | |||||
app.globalData.certificationInfo = true; | |||||
wx.setStorageSync("certificationInfo", true); | |||||
} | |||||
app.globalData.certificationState = res.data.certificationState; | app.globalData.certificationState = res.data.certificationState; | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/scout/scout' | url: '/pages/scout/scout' |
// pages/luckyStar/luckyStar.js | // pages/luckyStar/luckyStar.js | ||||
const app = getApp(); | const app = getApp(); | ||||
var query = null; | var query = null; | ||||
var certificationInfoValue = 0; | |||||
Page({ | Page({ | ||||
/** | /** | ||||
clawScale: 1,//爪子的scale值 | clawScale: 1,//爪子的scale值 | ||||
downNum:30,//倒计时时间 | downNum:30,//倒计时时间 | ||||
setInt:null,//倒计时元素 | setInt:null,//倒计时元素 | ||||
pizeTip:0,//抓奖提示框 | |||||
pizeTip:2,//抓奖提示框 | |||||
setGroup:{ | setGroup:{ | ||||
left:null, | left:null, | ||||
right: null, | right: null, | ||||
startDown:-1,//游戏开始倒计时 | startDown:-1,//游戏开始倒计时 | ||||
clawType:false,//是否正在抓取 | clawType:false,//是否正在抓取 | ||||
gameEnd:true, | gameEnd:true, | ||||
ani:null | |||||
ani:null, | |||||
certificationInfo:false,//是否车主认证了 | |||||
}, | }, | ||||
/** | /** | ||||
userData: app.globalData.userInfoData | userData: app.globalData.userInfoData | ||||
}) | }) | ||||
} | } | ||||
if (!app.globalData.certificationInfo){ | |||||
this.getCertificationInfo(); | |||||
}else{ | |||||
this.setData({ | |||||
certificationInfo: true | |||||
}) | |||||
} | |||||
this.getAddress(); | this.getAddress(); | ||||
this.getGameAwardList(); | this.getGameAwardList(); | ||||
}, | }, | ||||
pizeTip: 1 | pizeTip: 1 | ||||
}) | }) | ||||
} else { | } else { | ||||
if (this.data.isAddress) { | |||||
this.setData({ | |||||
pizeTip: 2 | |||||
}) | |||||
} else { | |||||
this.setData({ | |||||
pizeTip: 3 | |||||
}) | |||||
} | |||||
this.setData({ | |||||
pizeTip: 2 | |||||
}) | |||||
} | } | ||||
},800) | },800) | ||||
}, | }, | ||||
url: '../myCenter/myCenter', | url: '../myCenter/myCenter', | ||||
}) | }) | ||||
}, | }, | ||||
invitation: function () {//邀请好友一起来玩 | |||||
}, | |||||
userRegister: function () {//立即注册,探索更多星探好礼 | |||||
wx.navigateTo({ | |||||
url: '../address/address', | |||||
}) | |||||
}, | |||||
// userRegister: function () {//立即注册,探索更多星探好礼 | |||||
// wx.navigateTo({ | |||||
// url: '../address/address', | |||||
// }) | |||||
// }, | |||||
closeWindow:function(){//关闭中奖 | closeWindow:function(){//关闭中奖 | ||||
this.setData({ | this.setData({ | ||||
pizeTip:0, | pizeTip:0, | ||||
}) | }) | ||||
this.getClaw(); | this.getClaw(); | ||||
},200); | },200); | ||||
}, | |||||
getCertificationInfo:function(){ | |||||
app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {}, res => { | |||||
if(res.code==200){ | |||||
this.setData({ | |||||
certificationInfo:true | |||||
}) | |||||
app.globalData.certificationInfo = true; | |||||
wx.setStorageSync("certificationInfo", true); | |||||
}else{ | |||||
certificationInfoValue = res.code; | |||||
} | |||||
}, this); | |||||
}, | |||||
enterStar:function(){// | |||||
if (certificationInfoValue == -307) { | |||||
wx.navigateTo({ | |||||
url: '/pages/mobileVerification/mobileVerification' | |||||
}) | |||||
} else if (certificationInfoValue == -308) { | |||||
wx.navigateTo({ | |||||
url: '/pages/scout/register/register' | |||||
}) | |||||
} | |||||
} | } | ||||
}) | }) |
<view class="successGroup" wx:if="{{pizeTip==1}}"> | <view class="successGroup" wx:if="{{pizeTip==1}}"> | ||||
<image class="luckyPizeType" src="{{imgUrl+'/images/luckyPizeType1.png'}}"></image> | <image class="luckyPizeType" src="{{imgUrl+'/images/luckyPizeType1.png'}}"></image> | ||||
<image class="gameRuleClose" bindtap="closeWindow" style="top:-5rpx;right:-5rpx;" src="{{imgUrl+'/star/closebtn.png'}}"></image> | <image class="gameRuleClose" bindtap="closeWindow" style="top:-5rpx;right:-5rpx;" src="{{imgUrl+'/star/closebtn.png'}}"></image> | ||||
<!-- <image class="successIcon" src="{{imgUrl+'/images/successIcon.png'}}"></image> | |||||
<view class="titleGroup"></view> | |||||
<view class="successTip">幸运满格,大奖到手</view> --> | |||||
<image class="prizePic" src="{{endGameData.awardPicUrl}}" mode="aspectFit"></image> | |||||
<view class="prizeName">{{endGameData.awardName}}</view> | |||||
<!-- <image class="prizePic" src="https://dongfengqichen.jiyou-tech.com/storage/app/public/award/17_1.png" mode="aspectFit"></image> | |||||
<view class="prizeName">NITORI电动太空舱按摩椅</view> --> | |||||
<image class="startRegister" style="margin:0;" wx:if="{{(!isAddress && endGameData.needAddress!=0)}}" bindtap="userRegister" src="{{imgUrl+'/images/luckyPizeTip1.png'}}"></image> | |||||
<!-- <view class="startRegister" wx:if="{{(!isAddress && endGameData.needAddress!=0)}}" bindtap="userRegister">立即领取</view> --> | |||||
<view class="prizeContent"> | |||||
<image class="prizePic" src="{{endGameData.awardPicUrl}}" mode="aspectFit"></image> | |||||
<view class="prizeName">{{endGameData.awardName}}</view> | |||||
<image class="startRegister" style="margin:0;" wx:if="{{(!isAddress && endGameData.needAddress!=0)}}" bindtap="userRegister" src="{{imgUrl+'/images/luckyPizeTip1.png'}}"></image> | |||||
</view> | |||||
</view> | </view> | ||||
<view class="successGroup" wx:if="{{pizeTip==2 || pizeTip==3}}"> | |||||
<image class="luckyPizeType" src="{{imgUrl+'/images/luckyPizeType2.png'}}"></image> | |||||
<view class="successGroup" wx:if="{{pizeTip==2}}"> | |||||
<image class="luckyPizeType" src="{{imgUrl+'/images/luckyPizeType2.png?v=002'}}"></image> | |||||
<image class="gameRuleClose" bindtap="closeWindow" style="top:-5rpx;right:-5rpx;" src="{{imgUrl+'/star/closebtn.png'}}"></image> | <image class="gameRuleClose" bindtap="closeWindow" style="top:-5rpx;right:-5rpx;" src="{{imgUrl+'/star/closebtn.png'}}"></image> | ||||
<!-- <image class="successIcon" src="{{imgUrl+'/images/failIcon.png'}}"></image> | |||||
<view class="titleGroup"></view> | |||||
<view class="failText" style="margin-top:113rpx;">运气就差一点点</view> | |||||
<view class="failText" style="margin-top:20rpx;margin-bottom:82rpx;">重整旗鼓再来抓</view> --> | |||||
<view class="startRegister" wx:if="{{pizeTip==2}}"> | |||||
<image style="width:100%;height:100%;" src="{{imgUrl+'/images/luckyPizeTip2.png'}}"></image><button open-type="share" class="shareBtn" style="width:100%;height:100%;margin:0;padding:0;min-height:0;"></button></view> | |||||
<image class="startRegister" bindtap="userRegister" wx:if="{{pizeTip==3}}" src="{{imgUrl+'/images/luckyPizeTip3.png'}}"></image> | |||||
<!-- <view class="startRegister" bindtap="userRegister" wx:if="{{pizeTip==3}}">立即注册,探索更多星探好礼</view> --> | |||||
<view class="btnsGroup"> | |||||
<!-- <image class="luckyBtns" src="{{imgUrl+'/btns/luckyBtns1.png'}}"></image> | |||||
<view class="luckyBtnsGap"></view> | |||||
<image class="luckyBtns" bindtap="enterStar" wx:if="{{!certificationInfo}}" src="{{imgUrl+'/btns/luckyBtns2.png'}}"></image> --> | |||||
</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="downTimeGroup" wx:if="{{startDown!=-1}}"> | <view class="downTimeGroup" wx:if="{{startDown!=-1}}"> |
.prizePic{ | .prizePic{ | ||||
width: 310rpx; | width: 310rpx; | ||||
height: 116rpx; | height: 116rpx; | ||||
margin-top: 200rpx; | |||||
margin-bottom: 10rpx; | margin-bottom: 10rpx; | ||||
z-index: 9; | |||||
} | } | ||||
.successTip{ | .successTip{ | ||||
font-size:28rpx; | font-size:28rpx; | ||||
line-height:21rpx; | line-height:21rpx; | ||||
text-align: center; | text-align: center; | ||||
margin-bottom: 30rpx; | margin-bottom: 30rpx; | ||||
z-index: 9; | |||||
} | } | ||||
.failText{ | .failText{ | ||||
font-size:28rpx; | font-size:28rpx; | ||||
height:100%; | height:100%; | ||||
overflow: auto; | overflow: auto; | ||||
position:relative; | position:relative; | ||||
} | |||||
.btnsGroup{ | |||||
position: absolute; | |||||
top: 301rpx; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: center; | |||||
flex-direction: column; | |||||
z-index: 9; | |||||
} | |||||
.luckyBtns{ | |||||
width: 296rpx; | |||||
height: 50rpx; | |||||
} | |||||
.luckyBtnsGap{ | |||||
height: 13rpx; | |||||
} | |||||
.prizeContent{ | |||||
position: absolute; | |||||
top: 200rpx; | |||||
z-index: 9; | |||||
} | } |
</view> | </view> | ||||
<view class="thirdAward" style="margin-top:0;">一等奖</view> | <view class="thirdAward" style="margin-top:0;">一等奖</view> | ||||
<view class="firstPrize"> | <view class="firstPrize"> | ||||
<image class="firstPrizePic" src="{{imgUrl+'/images/firstPrizePic2.png'}}"></image> | |||||
<view class="firstPrizeText">NITORI电动太空舱按摩椅</view> | |||||
<image class="firstPrizePic" src="{{imgUrl+'/newPrize/1.png'}}"></image> | |||||
<view class="firstPrizeText">头等舱机票</view> | |||||
</view> | </view> | ||||
<view class="thirdAward">二等奖</view> | <view class="thirdAward">二等奖</view> | ||||
<view class="ticketGroup"> | <view class="ticketGroup"> | ||||
<view class="prizeTicket"> | |||||
<image class="prizeTicketPic" src="{{imgUrl+'/images/prizeTicket1.png'}}"></image> | |||||
<view class="prizeTicketName">欢乐谷全家一日游</view> | |||||
</view> | |||||
<view class="prizeTicket"> | |||||
<image class="prizeTicketPic" src="{{imgUrl+'/images/prizeTicket2.png'}}"></image> | |||||
<view class="prizeTicketName">迪士尼全家一日游</view> | |||||
</view> | |||||
<view class="prizeTicket"> | |||||
<image class="prizeTicketPic" style="width:210rpx;" src="{{imgUrl+'/images/prizeTicket3.png'}}"></image> | |||||
<view class="prizeTicketName">长隆全家一日游</view> | |||||
</view> | |||||
<image class="prizeTicketPic" src="{{imgUrl+'/newPrize/2.png'}}"></image> | |||||
<image class="prizeTicketPic" style="width:147rpx;height:166rpx;" src="{{imgUrl+'/newPrize/3.png'}}"></image> | |||||
<image class="prizeTicketPic" style="width:191rpx;height:131rpx;" src="{{imgUrl+'/newPrize/4.png'}}"></image> | |||||
</view> | |||||
<view class="prizeTicket"> | |||||
<view class="prizeTicketName" style="width:162rpx;">小米扫地机器人</view> | |||||
<view class="prizeTicketName" style="width:167rpx;">索尼无线蓝牙耳机</view> | |||||
<view class="prizeTicketName" style="width:191rpx;">美的烤箱</view> | |||||
</view> | </view> | ||||
<view class="thirdAward">三等奖</view> | <view class="thirdAward">三等奖</view> | ||||
<view class="thirdAwardGroup"> | <view class="thirdAwardGroup"> | ||||
<view class="threeFrame"> | |||||
<view class="threeGroup"> | |||||
<image class="three1" src="{{imgUrl+'/images/three1.png'}}"></image> | |||||
</view> | |||||
<view class="threeText">喜马拉雅智能音响</view> | |||||
<view class="threeFrame" style="margin-right:40rpx;"> | |||||
<image class="three1" src="{{imgUrl+'/newPrize/5.png'}}"></image> | |||||
<view class="threeText">200元油卡</view> | |||||
</view> | </view> | ||||
<view class="threeFrame"> | <view class="threeFrame"> | ||||
<view class="threeGroup"> | |||||
<image class="three2" src="{{imgUrl+'/images/three2.png'}}"></image> | |||||
</view> | |||||
<view class="threeText">松下扫地机器人</view> | |||||
</view> | |||||
<view class="threeFrame"> | |||||
<view class="threeGroup"> | |||||
<image class="three3" src="{{imgUrl+'/images/three3.png'}}"></image> | |||||
</view> | |||||
<view class="threeText">索尼无线蓝牙耳机</view> | |||||
<image class="three2" src="{{imgUrl+'/newPrize/6.png'}}"></image> | |||||
<view class="threeText">100元京东E卡</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="thirdAward">入门奖</view> | <view class="thirdAward">入门奖</view> | ||||
<view class="introductionGroup"> | <view class="introductionGroup"> | ||||
<view class="introduction"> | |||||
<image class="introductionPic" src="{{imgUrl+'/images/Introduction1.png'}}"></image> | |||||
<view class="introductionText">美团外卖20元代金券</view> | |||||
</view><view class="introduction"> | |||||
<image class="introductionPic" src="{{imgUrl+'/images/Introduction2.png'}}"></image> | |||||
<view class="introductionText">饿了么15元代金券</view> | |||||
</view><view class="introduction"> | |||||
<image class="introductionPic" src="{{imgUrl+'/images/Introduction3.png'}}"></image> | |||||
<view class="introductionText">瑞幸咖啡免费券</view> | |||||
<view class="introduction" style="padding-right:51rpx;"> | |||||
<image class="introductionPic" style="width:168rpx;height:107rpx;" src="{{imgUrl+'/newPrize/7.png'}}"></image> | |||||
<view class="introductionText" style="width:168rpx;">50元京东E卡</view> | |||||
</view><view class="introduction" style="padding-right:36rpx;"> | |||||
<image class="introductionPic" style="width:194rpx;height:106rpx;" src="{{imgUrl+'/newPrize/8.png'}}"></image> | |||||
<view class="introductionText" style="width:194rpx;">网易云音乐月卡一张</view> | |||||
</view><view class="introduction"> | </view><view class="introduction"> | ||||
<image class="introductionPic" src="{{imgUrl+'/images/Introduction4.png'}}"></image> | |||||
<view class="introductionText">网易云音乐月卡一张</view> | |||||
<image class="introductionPic" style="width:195rpx;height:107rpx;" src="{{imgUrl+'/newPrize/9.png'}}"></image> | |||||
<view class="introductionText" style="width:195rpx;">爱奇艺月卡一张</view> | |||||
</view><view class="introduction" style="padding-right:30rpx;"> | |||||
<image class="introductionPic" style="width:189rpx;height:102rpx;" src="{{imgUrl+'/newPrize/10.png'}}"></image> | |||||
<view class="introductionText" style="width:189rpx;">瑞幸咖啡免费券三张</view> | |||||
</view><view class="introduction"> | </view><view class="introduction"> | ||||
<image class="introductionPic" src="{{imgUrl+'/images/Introduction5.png'}}"></image> | |||||
<view class="introductionText">腾讯视频月卡一张</view> | |||||
<image class="introductionPic" style="width:194rpx;height:106rpx;" src="{{imgUrl+'/newPrize/11.png'}}"></image> | |||||
<view class="introductionText" style="width:194rpx;">腾讯视频月卡一张</view> | |||||
</view><view class="introduction"> | </view><view class="introduction"> | ||||
<image class="introductionPic" src="{{imgUrl+'/images/Introduction6.png'}}"></image> | |||||
<view class="introductionText">爱奇艺月卡一张</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="immediateFetching"> | <view class="immediateFetching"> |
} | } | ||||
.prizeTicket{ | .prizeTicket{ | ||||
display: flex; | display: flex; | ||||
flex-direction: column; | |||||
justify-content: space-between; | |||||
align-items: center; | align-items: center; | ||||
margin-top: 30rpx; | |||||
padding: 0 45rpx; | |||||
} | } | ||||
.prizeTicketPic{ | .prizeTicketPic{ | ||||
width: 206rpx; | |||||
height: 83rpx; | |||||
width: 162rpx; | |||||
height: 162rpx; | |||||
} | } | ||||
.prizeTicketName{ | .prizeTicketName{ | ||||
font-size:20rpx; | font-size:20rpx; | ||||
font-family:PingFang; | font-family:PingFang; | ||||
font-weight:400; | font-weight:400; | ||||
color:rgba(35,33,34,1); | color:rgba(35,33,34,1); | ||||
margin-top: 30rpx; | |||||
text-align: center; | |||||
} | } | ||||
.thirdAward{ | .thirdAward{ | ||||
width:128rpx; | width:128rpx; | ||||
.thirdAwardGroup{ | .thirdAwardGroup{ | ||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
justify-content: space-between; | |||||
padding: 0 45rpx; | padding: 0 45rpx; | ||||
} | } | ||||
.threeFrame{ | .threeFrame{ | ||||
margin-top: 45rpx; | margin-top: 45rpx; | ||||
} | } | ||||
.threeGroup{ | .threeGroup{ | ||||
width: 168rpx; | |||||
height: 191rpx; | |||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
justify-content: center; | justify-content: center; | ||||
} | } | ||||
.three1{ | .three1{ | ||||
width: 86rpx; | |||||
height: 191rpx; | |||||
width: 190rpx; | |||||
height: 121rpx; | |||||
} | } | ||||
.three2{ | .three2{ | ||||
width: 168rpx; | |||||
height: 168rpx; | |||||
width: 184rpx; | |||||
height: 117rpx; | |||||
} | } | ||||
.three3{ | .three3{ | ||||
width: 147rpx; | width: 147rpx; | ||||
.introductionGroup{ | .introductionGroup{ | ||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
justify-content: space-between; | |||||
flex-wrap: wrap; | flex-wrap: wrap; | ||||
padding: 0 45rpx; | padding: 0 45rpx; | ||||
} | } | ||||
font-family:PingFang; | font-family:PingFang; | ||||
font-weight:400; | font-weight:400; | ||||
color:rgba(35,33,34,1); | color:rgba(35,33,34,1); | ||||
text-align: center; | |||||
} | } | ||||
.immediateFetching{ | .immediateFetching{ | ||||
position: fixed; | position: fixed; | ||||
margin-top: 35rpx; | margin-top: 35rpx; | ||||
} | } | ||||
.firstPrizePic{ | .firstPrizePic{ | ||||
width:119rpx; | |||||
height:204rpx; | |||||
width:460rpx; | |||||
height:172rpx; | |||||
} | } | ||||
.firstPrizeText{ | .firstPrizeText{ | ||||
line-height: 28rpx; | line-height: 28rpx; |
phonebolb:function(_phone){ | phonebolb:function(_phone){ | ||||
app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {}, res => { | app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {}, res => { | ||||
if (res.code == 200) { | if (res.code == 200) { | ||||
app.globalData.certificationState = res.data.certificationState; | |||||
wx.navigateTo({ | |||||
url: '/pages/scout/scout' | |||||
}) | |||||
if (!app.globalData.certificationInfo) { | |||||
app.globalData.certificationInfo = true; | |||||
wx.setStorageSync("certificationInfo", true); | |||||
} | |||||
app.globalData.certificationState = res.data.certificationState; | |||||
wx.navigateTo({ | |||||
url: '/pages/scout/scout' | |||||
}) | |||||
} else if (res.code == -307){ | } else if (res.code == -307){ | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/mobileVerification/mobileVerification' | url: '/pages/mobileVerification/mobileVerification' |