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({ | ||||
/** | /** | ||||
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> | <image class="prizePic" src="{{endGameData.awardPicUrl}}" mode="aspectFit"></image> | ||||
<view class="prizeName">{{endGameData.awardName}}</view> | <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> | <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> | </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}}"> |
height:100%; | height:100%; | ||||
overflow: auto; | overflow: auto; | ||||
position:relative; | position:relative; | ||||
} | |||||
.btnsGroup{ | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: center; | |||||
flex-direction: column; | |||||
z-index: 9; | |||||
margin-top: 301rpx; | |||||
} | |||||
.luckyBtns{ | |||||
width: 296rpx; | |||||
height: 50rpx; | |||||
} | |||||
.luckyBtnsGap{ | |||||
height: 13rpx; | |||||
} | } |
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' |