| @@ -17,6 +17,10 @@ App({ | |||
| if (friendOpenid) { | |||
| this.globalData.friendOpenid = friendOpenid; | |||
| } | |||
| var certificationInfo = wx.getStorageSync('certificationInfo'); | |||
| if (certificationInfo) { | |||
| this.globalData.certificationInfo = certificationInfo; | |||
| } | |||
| var userInfoData = wx.getStorageSync("userInfoData"); | |||
| if (userInfoData){ | |||
| this.globalData.userInfoData = {}; | |||
| @@ -73,7 +77,8 @@ App({ | |||
| mobileData:null, | |||
| userPhoneType:null, | |||
| kvurl:null, | |||
| kvurlH:0 | |||
| kvurlH:0, | |||
| certificationInfo:false | |||
| }, | |||
| // 获取openId | |||
| getOpenid: function (code) { | |||
| @@ -83,6 +83,10 @@ Page({ | |||
| goScout() { | |||
| app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {}, res => { | |||
| if (res.code == 200) { | |||
| if (!app.globalData.certificationInfo) { | |||
| app.globalData.certificationInfo = true; | |||
| wx.setStorageSync("certificationInfo", true); | |||
| } | |||
| app.globalData.certificationState = res.data.certificationState; | |||
| wx.navigateTo({ | |||
| url: '/pages/scout/scout' | |||
| @@ -1,6 +1,7 @@ | |||
| // pages/luckyStar/luckyStar.js | |||
| const app = getApp(); | |||
| var query = null; | |||
| var certificationInfoValue = 0; | |||
| Page({ | |||
| /** | |||
| @@ -15,7 +16,7 @@ Page({ | |||
| clawScale: 1,//爪子的scale值 | |||
| downNum:30,//倒计时时间 | |||
| setInt:null,//倒计时元素 | |||
| pizeTip:0,//抓奖提示框 | |||
| pizeTip:2,//抓奖提示框 | |||
| setGroup:{ | |||
| left:null, | |||
| right: null, | |||
| @@ -45,7 +46,8 @@ Page({ | |||
| startDown:-1,//游戏开始倒计时 | |||
| clawType:false,//是否正在抓取 | |||
| gameEnd:true, | |||
| ani:null | |||
| ani:null, | |||
| certificationInfo:false,//是否车主认证了 | |||
| }, | |||
| /** | |||
| @@ -66,6 +68,13 @@ Page({ | |||
| userData: app.globalData.userInfoData | |||
| }) | |||
| } | |||
| if (!app.globalData.certificationInfo){ | |||
| this.getCertificationInfo(); | |||
| }else{ | |||
| this.setData({ | |||
| certificationInfo: true | |||
| }) | |||
| } | |||
| this.getAddress(); | |||
| this.getGameAwardList(); | |||
| }, | |||
| @@ -297,15 +306,9 @@ Page({ | |||
| pizeTip: 1 | |||
| }) | |||
| } else { | |||
| if (this.data.isAddress) { | |||
| this.setData({ | |||
| pizeTip: 2 | |||
| }) | |||
| } else { | |||
| this.setData({ | |||
| pizeTip: 3 | |||
| }) | |||
| } | |||
| this.setData({ | |||
| pizeTip: 2 | |||
| }) | |||
| } | |||
| },800) | |||
| }, | |||
| @@ -378,14 +381,11 @@ Page({ | |||
| url: '../myCenter/myCenter', | |||
| }) | |||
| }, | |||
| invitation: function () {//邀请好友一起来玩 | |||
| }, | |||
| userRegister: function () {//立即注册,探索更多星探好礼 | |||
| wx.navigateTo({ | |||
| url: '../address/address', | |||
| }) | |||
| }, | |||
| // userRegister: function () {//立即注册,探索更多星探好礼 | |||
| // wx.navigateTo({ | |||
| // url: '../address/address', | |||
| // }) | |||
| // }, | |||
| closeWindow:function(){//关闭中奖 | |||
| this.setData({ | |||
| pizeTip:0, | |||
| @@ -490,5 +490,29 @@ Page({ | |||
| }) | |||
| this.getClaw(); | |||
| },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' | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| @@ -59,27 +59,20 @@ | |||
| <view class="successGroup" wx:if="{{pizeTip==1}}"> | |||
| <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="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 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="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 class="downTimeGroup" wx:if="{{startDown!=-1}}"> | |||
| @@ -212,9 +212,7 @@ view{ | |||
| .prizePic{ | |||
| width: 310rpx; | |||
| height: 116rpx; | |||
| margin-top: 200rpx; | |||
| margin-bottom: 10rpx; | |||
| z-index: 9; | |||
| } | |||
| .successTip{ | |||
| font-size:28rpx; | |||
| @@ -234,7 +232,6 @@ view{ | |||
| line-height:21rpx; | |||
| text-align: center; | |||
| margin-bottom: 30rpx; | |||
| z-index: 9; | |||
| } | |||
| .failText{ | |||
| font-size:28rpx; | |||
| @@ -401,4 +398,25 @@ view{ | |||
| height:100%; | |||
| overflow: auto; | |||
| 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; | |||
| } | |||
| @@ -6,65 +6,49 @@ | |||
| </view> | |||
| <view class="thirdAward" style="margin-top:0;">一等奖</view> | |||
| <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 class="thirdAward">二等奖</view> | |||
| <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 class="thirdAward">三等奖</view> | |||
| <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 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 class="thirdAward">入门奖</view> | |||
| <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"> | |||
| <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"> | |||
| <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"> | |||
| <image class="introductionPic" src="{{imgUrl+'/images/Introduction6.png'}}"></image> | |||
| <view class="introductionText">爱奇艺月卡一张</view> | |||
| </view> | |||
| </view> | |||
| <view class="immediateFetching"> | |||
| @@ -26,12 +26,14 @@ view{ | |||
| } | |||
| .prizeTicket{ | |||
| display: flex; | |||
| flex-direction: column; | |||
| justify-content: space-between; | |||
| align-items: center; | |||
| margin-top: 30rpx; | |||
| padding: 0 45rpx; | |||
| } | |||
| .prizeTicketPic{ | |||
| width: 206rpx; | |||
| height: 83rpx; | |||
| width: 162rpx; | |||
| height: 162rpx; | |||
| } | |||
| .prizeTicketName{ | |||
| font-size:20rpx; | |||
| @@ -39,7 +41,7 @@ view{ | |||
| font-family:PingFang; | |||
| font-weight:400; | |||
| color:rgba(35,33,34,1); | |||
| margin-top: 30rpx; | |||
| text-align: center; | |||
| } | |||
| .thirdAward{ | |||
| width:128rpx; | |||
| @@ -58,7 +60,6 @@ view{ | |||
| .thirdAwardGroup{ | |||
| display: flex; | |||
| align-items: center; | |||
| justify-content: space-between; | |||
| padding: 0 45rpx; | |||
| } | |||
| .threeFrame{ | |||
| @@ -68,19 +69,17 @@ view{ | |||
| margin-top: 45rpx; | |||
| } | |||
| .threeGroup{ | |||
| width: 168rpx; | |||
| height: 191rpx; | |||
| display: flex; | |||
| align-items: center; | |||
| justify-content: center; | |||
| } | |||
| .three1{ | |||
| width: 86rpx; | |||
| height: 191rpx; | |||
| width: 190rpx; | |||
| height: 121rpx; | |||
| } | |||
| .three2{ | |||
| width: 168rpx; | |||
| height: 168rpx; | |||
| width: 184rpx; | |||
| height: 117rpx; | |||
| } | |||
| .three3{ | |||
| width: 147rpx; | |||
| @@ -97,7 +96,6 @@ view{ | |||
| .introductionGroup{ | |||
| display: flex; | |||
| align-items: center; | |||
| justify-content: space-between; | |||
| flex-wrap: wrap; | |||
| padding: 0 45rpx; | |||
| } | |||
| @@ -119,6 +117,7 @@ view{ | |||
| font-family:PingFang; | |||
| font-weight:400; | |||
| color:rgba(35,33,34,1); | |||
| text-align: center; | |||
| } | |||
| .immediateFetching{ | |||
| position: fixed; | |||
| @@ -136,8 +135,8 @@ view{ | |||
| margin-top: 35rpx; | |||
| } | |||
| .firstPrizePic{ | |||
| width:119rpx; | |||
| height:204rpx; | |||
| width:460rpx; | |||
| height:172rpx; | |||
| } | |||
| .firstPrizeText{ | |||
| line-height: 28rpx; | |||
| @@ -59,10 +59,14 @@ Page({ | |||
| phonebolb:function(_phone){ | |||
| app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {}, res => { | |||
| 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){ | |||
| wx.navigateTo({ | |||
| url: '/pages/mobileVerification/mobileVerification' | |||