| @@ -173,14 +173,21 @@ App({ | |||
| }, this, "POST"); | |||
| }, | |||
| getMobile: function (encryptedData, iv, callback, thisArg){//和后台置换手机号 | |||
| this.wxRequest(this.globalData.urlRoot + "userInfo/getUserPhoneNumber", { encryptedData: encryptedData, iv: iv }, res => { | |||
| if(res.code == 200){ | |||
| wx.setStorageSync('userMobile', res.data.decodeData.phoneNumber); | |||
| this.globalData.userMobile = res.data.decodeData.phoneNumber; | |||
| } | |||
| if (callback && thisArg) { | |||
| callback.call(thisArg, res); | |||
| wx.checkSession({ | |||
| success: res => { | |||
| this.wxRequest(this.globalData.urlRoot + "userInfo/getUserPhoneNumber", { encryptedData: encryptedData, iv: iv }, res => { | |||
| if (res.code == 200) { | |||
| wx.setStorageSync('userMobile', res.data.decodeData.phoneNumber); | |||
| this.globalData.userMobile = res.data.decodeData.phoneNumber; | |||
| } | |||
| if (callback && thisArg) { | |||
| callback.call(thisArg, res); | |||
| } | |||
| }, this, "POST"); | |||
| }, | |||
| fail: res => { | |||
| this.getOpenid(res.code); | |||
| } | |||
| }, this, "POST"); | |||
| }) | |||
| } | |||
| }) | |||
| @@ -12,7 +12,8 @@ | |||
| "pages/poster/poster", | |||
| "pages/coupon/coupon", | |||
| "pages/receiveRegister/receiveRegister", | |||
| "pages/address/address" | |||
| "pages/address/address", | |||
| "pages/mobileVerification/mobileVerification" | |||
| ], | |||
| "window": { | |||
| "backgroundTextStyle": "light", | |||
| @@ -87,7 +87,7 @@ Page({ | |||
| * 用户点击右上角分享 | |||
| */ | |||
| onShareAppMessage: function () { | |||
| return app.sharePack(); | |||
| }, | |||
| addressChange:function(e){//所在地区发生改变 | |||
| this.data.submitData.province = e.detail.value[0]; | |||
| @@ -10,15 +10,16 @@ Page({ | |||
| showClose:false, | |||
| maskShow: false, | |||
| taskShow: false, | |||
| taskName:'集齐启辰星【大灯】碎片', | |||
| taskImgUrl:'https://www.jiyou-tech.com/2020/496_qichen/static/star/everyday/taskImg1.png', | |||
| isSign:true, | |||
| taskName:'', | |||
| taskImgUrl:'', | |||
| isSign:false, | |||
| isShare:false, | |||
| picturlList: [], | |||
| picturlCurrent:0, | |||
| isRegister:false,//是否已注册 | |||
| shareId:null, | |||
| isFriendShare:false,//是否朋友分享过来的 | |||
| isAddress:false,//是否有地址 | |||
| }, | |||
| /** | |||
| * 关闭任务窗 | |||
| @@ -41,8 +42,6 @@ Page({ | |||
| }) | |||
| } else { | |||
| this.setData({ | |||
| taskName: '集齐启辰星【大灯】碎片1/4', | |||
| taskImgUrl: 'https://www.jiyou-tech.com/2020/496_qichen/static/star/everyday/taskImg2.png', | |||
| isSign: false, | |||
| isShare: true, | |||
| showClose: true | |||
| @@ -103,7 +102,8 @@ Page({ | |||
| loadFun: function () { | |||
| this.getTaskProgress(); | |||
| this.getOrderInfo(); | |||
| // this.getShareId(); | |||
| this.getShareId(); | |||
| this.getAddress(); | |||
| if (this.data.isFriendShare) { | |||
| this.useShareId(); | |||
| } | |||
| @@ -190,15 +190,53 @@ Page({ | |||
| }, this); | |||
| }, | |||
| receive:function(){//领取购车红包 | |||
| if (this.data.isRegister){ | |||
| wx.redirectTo({ | |||
| url: '../myCenter/myCenter' | |||
| }) | |||
| }else{ | |||
| wx.navigateTo({ | |||
| url: '../receiveRegister/receiveRegister', | |||
| }) | |||
| } | |||
| this.getTaskAward(); | |||
| }, | |||
| getAddress: function () {//获取地址 | |||
| app.wxRequest(app.globalData.urlRoot + "address/getAddress", {}, res => { | |||
| if (res.code == 200) { | |||
| if(res.data){ | |||
| this.data.isAddress = true; | |||
| } | |||
| } else { | |||
| wx.showToast({ | |||
| title: res.msg, | |||
| icon: "none" | |||
| }) | |||
| } | |||
| }, this); | |||
| }, | |||
| 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.isRegister){ | |||
| // if (res.data.needAddress) { | |||
| // if (!this.data.isAddress) { | |||
| // wx.navigateTo({ | |||
| // url: '../address/address', | |||
| // }) | |||
| // }else{ | |||
| // wx.redirectTo({ | |||
| // url: '../myCenter/myCenter' | |||
| // }) | |||
| // } | |||
| // }else{ | |||
| wx.redirectTo({ | |||
| url: '../myCenter/myCenter' | |||
| }) | |||
| // } | |||
| }else{ | |||
| wx.navigateTo({ | |||
| url: '../receiveRegister/receiveRegister', | |||
| }) | |||
| } | |||
| }else{ | |||
| wx.showToast({ | |||
| title: res.msg, | |||
| icon:"none" | |||
| }) | |||
| } | |||
| },this); | |||
| }, | |||
| getSignInfo: function () {//查看当日是否签到 | |||
| app.wxRequest(app.globalData.urlRoot + "task/getSignInfo", {}, res => { | |||
| @@ -227,6 +265,10 @@ Page({ | |||
| app.wxRequest(app.globalData.urlRoot + "task/getShareId", {}, res => { | |||
| this.getSignInfo(); | |||
| if (res.code == 200) { | |||
| this.setData({ | |||
| taskName: "集齐启辰星【" + res.data.shortName+"】碎片1/4", | |||
| taskImgUrl: res.data.popPicUrl, | |||
| }) | |||
| this.data.shareId = res.data.shareId; | |||
| } | |||
| }, this) | |||
| @@ -18,6 +18,26 @@ | |||
| <image class="fragmentComplete2" src="{{item.childIdArr['picArr'][1]}}"></image> | |||
| <image class="fragmentComplete3" src="{{item.childIdArr['picArr'][2]}}"></image> | |||
| <image class="fragmentComplete4" src="{{item.childIdArr['picArr'][3]}}"></image> | |||
| <view class="lockSty lock1"> | |||
| <image wx:if="{{item.childIdArr['lockArr'][0]}}" class="lockIcon" src="{{imgUrl+'/images/lockIcon.png'}}"></image> | |||
| <image wx:if="{{!item.childIdArr['lockArr'][0]}}" class="nolockIcon" src="{{imgUrl+'/images/nolockIcon.png'}}"></image> | |||
| <view class="lockText">{{item.childIdArr['lockArr'][0]?"已解锁":"待解锁"}}</view> | |||
| </view> | |||
| <view class="lockSty lock2"> | |||
| <image wx:if="{{item.childIdArr['lockArr'][1]}}" class="lockIcon" src="{{imgUrl+'/images/lockIcon.png'}}"></image> | |||
| <image wx:if="{{!item.childIdArr['lockArr'][1]}}" class="nolockIcon" src="{{imgUrl+'/images/nolockIcon.png'}}"></image> | |||
| <view class="lockText">{{item.childIdArr['lockArr'][1]?"已解锁":"待解锁"}}</view> | |||
| </view> | |||
| <view class="lockSty lock3"> | |||
| <image wx:if="{{item.childIdArr['lockArr'][2]}}" class="lockIcon" src="{{imgUrl+'/images/lockIcon.png'}}"></image> | |||
| <image wx:if="{{!item.childIdArr['lockArr'][2]}}" class="nolockIcon" src="{{imgUrl+'/images/nolockIcon.png'}}"></image> | |||
| <view class="lockText">{{item.childIdArr['lockArr'][2]?"已解锁":"待解锁"}}</view> | |||
| </view> | |||
| <view class="lockSty lock4"> | |||
| <image wx:if="{{item.childIdArr['lockArr'][3]}}" class="lockIcon" src="{{imgUrl+'/images/lockIcon.png'}}"></image> | |||
| <image wx:if="{{!item.childIdArr['lockArr'][3]}}" class="nolockIcon" src="{{imgUrl+'/images/nolockIcon.png'}}"></image> | |||
| <view class="lockText">{{item.childIdArr['lockArr'][3]?"已解锁":"待解锁"}}</view> | |||
| </view> | |||
| </view> | |||
| <view class="fragmentBox" wx:if="{{item.fullPicUrl}}"> | |||
| <image class="fragmentComplete" src="{{item.fullPicUrl}}"></image> | |||
| @@ -28,21 +48,26 @@ | |||
| <image class="arrowBtn" style="left:-30rpx;" src="{{imgUrl+'/star/everyday/arrowLeftBtn.png'}}" bindtap="prevPicturl"></image> | |||
| <image class="arrowBtn" style="right:-30rpx;" src="{{imgUrl+'/star/everyday/arrowRightBtn.png'}}" bindtap="nextPicturl"></image> | |||
| </view> | |||
| <view class="btnBox" wx:if="{{!picturlList[picturlCurrent]['fullPicUrl']}}"> | |||
| <view class="btnBox" wx:if="{{picturlList[picturlCurrent]['awardState']==0}}"> | |||
| <view class="btn" style="margin-right:20rpx;" bindtap="goScout">星探任务</view> | |||
| <view class="btn select" style="margin-left:20rpx;">每日任务</view> | |||
| </view> | |||
| <view class="btnBox" style="width:677rpx;" wx:if="{{picturlList[picturlCurrent]['fullPicUrl']}}"> | |||
| <view class="btnBox" style="width:677rpx;" wx:if="{{picturlList[picturlCurrent]['awardState']==1}}"> | |||
| <view class="receive" bindtap="receive">领取购车红包</view> | |||
| </view> | |||
| <view class="btnBox" style="width:677rpx;" wx:if="{{picturlList[picturlCurrent]['awardState']==-1}}"> | |||
| <view class="receive" style="background-color:gray;">已领取</view> | |||
| </view> | |||
| <view class="mask" wx:if="{{maskShow}}"> | |||
| <view class="taskBox" wx:if="{{taskShow}}"> | |||
| <text wx:if="{{showClose}}" class="closeBtn" style="right:-35rpx;top:-50rpx;" bindtap="hiddenTask"></text> | |||
| <view class="title">今日任务</view> | |||
| <view class="contentBox"> | |||
| <view class="name">{{taskName}}</view> | |||
| <image class="taskImg" src="{{taskImgUrl}}"></image> | |||
| <view class="btn" wx:if="{{isSign}}" bindtap="signIn">签到解锁</view> | |||
| <view class="name" wx:if="{{isShare}}">{{taskName}}</view> | |||
| <image class="taskImg" src="{{taskImgUrl}}" wx:if="{{isShare}}"></image> | |||
| <view class="signBtnGroup"> | |||
| <view class="btn" wx:if="{{isSign}}" bindtap="signIn">签到解锁</view> | |||
| </view> | |||
| <view class="btn" wx:if="{{isShare}}">分享再获取一张碎片 | |||
| <button open-type="share" class="shareBtn" style="width:100%;height:100%;margin:0;padding:0;min-height:0;"></button> | |||
| </view> | |||
| @@ -152,13 +152,12 @@ | |||
| background-color: #345489; | |||
| color: #ffffff; | |||
| } | |||
| .mask { | |||
| .mask{ | |||
| position: fixed; | |||
| left: 0; | |||
| top: 0; | |||
| width: 100%; | |||
| height: 100%; | |||
| height: calc(100vh - 150rpx); | |||
| display: flex; | |||
| align-items: center; | |||
| justify-content: center; | |||
| @@ -250,4 +249,70 @@ | |||
| top: 0; | |||
| z-index: 2; | |||
| opacity: 0; | |||
| } | |||
| .lockSty{ | |||
| position: absolute; | |||
| width:114rpx; | |||
| height:31rpx; | |||
| background-color: #E8A400; | |||
| line-height: 31rpx; | |||
| font-size:16rpx; | |||
| font-family:PingFang; | |||
| font-weight:300; | |||
| color:rgba(0,0,0,1); | |||
| display: flex; | |||
| align-items: center; | |||
| justify-content: center; | |||
| } | |||
| .lockIcon{ | |||
| width: 15rpx; | |||
| height: 21rpx; | |||
| margin-right: 10rpx; | |||
| } | |||
| .nolockIcon{ | |||
| width: 16rpx; | |||
| height: 21rpx; | |||
| margin-right: 10rpx; | |||
| } | |||
| .lock1{ | |||
| top: 3rpx; | |||
| left: 110rpx; | |||
| border-bottom-left-radius: 10rpx; | |||
| border-bottom-right-radius: 10rpx; | |||
| } | |||
| .lock2{ | |||
| top: 3rpx; | |||
| right: 90rpx; | |||
| border-bottom-left-radius: 10rpx; | |||
| border-bottom-right-radius: 10rpx; | |||
| } | |||
| .lock3{ | |||
| bottom: 3rpx; | |||
| left: 110rpx; | |||
| border-top-left-radius: 10rpx; | |||
| border-top-right-radius: 10rpx; | |||
| } | |||
| .lock4{ | |||
| bottom: 3rpx; | |||
| right: 90rpx; | |||
| border-top-left-radius: 10rpx; | |||
| border-top-right-radius: 10rpx; | |||
| } | |||
| .signBtnGroup{ | |||
| position: absolute; | |||
| left: 50%; | |||
| top: 50%; | |||
| transform: translate(-50%,-50%); | |||
| } | |||
| .signBtnGroup>.btn{ | |||
| width: 347rpx; | |||
| height: 62rpx; | |||
| line-height: 62rpx; | |||
| text-align: center; | |||
| color: #ffffff; | |||
| font-size: 28rpx; | |||
| border-radius: 10rpx; | |||
| margin: 42rpx auto 0 auto; | |||
| background-color: #345486; | |||
| position: relative; | |||
| } | |||
| @@ -120,10 +120,13 @@ Page({ | |||
| if (e.detail.errMsg=='getPhoneNumber:ok'){ | |||
| app.getMobile(e.detail.encryptedData, e.detail.iv,res=>{ | |||
| if (res.code == 200) { | |||
| this.data.subscribeData.mobile = res.data.decodeData.phoneNumber; | |||
| this.setData({ | |||
| subscribeData: this.data.subscribeData | |||
| }) | |||
| res.data=null; | |||
| if(res.data){ | |||
| this.data.subscribeData.mobile = res.data.decodeData.phoneNumber; | |||
| this.setData({ | |||
| subscribeData: this.data.subscribeData | |||
| }) | |||
| } | |||
| } else { | |||
| wx.showToast({ | |||
| title: res.msg, | |||
| @@ -2,11 +2,6 @@ | |||
| <view class="all" wx:if="{{mainShow}}"> | |||
| <view class="main"> | |||
| <view class="contentFrame"> | |||
| <view class="videoSty"> | |||
| <video id="video" poster="{{videoList.posterUrl}}" src="{{videoList.videoUrl}}"></video> | |||
| <image wx:if="{{!videoVideoControls}}" class="videoPoster" src="{{videoList.posterUrl}}"></image> | |||
| <image wx:if="{{!videoVideoControls}}" bindtap="hideVideoControls" class="videoPlay" src="{{imgUrl+'/images/videoPlay.png'}}"></image> | |||
| </view> | |||
| <view class="swiperFrame"> | |||
| <swiper class="swiperSty" autoplay current="{{swiperCurrent}}" bindchange="swiperChange"> | |||
| <swiper-item wx:for="{{bannerList}}" wx:key="index"><image src="{{item.bannerUrl}}" style="width:100%;" mode="aspectFill"></image></swiper-item> | |||
| @@ -21,8 +16,16 @@ | |||
| <view class="bannerName">{{bannerList[swiperCurrent].bannerName}}</view> | |||
| </view> | |||
| <image class="indexBottom" src="{{imgUrl+'/images/indexBottom.png'}}"></image> | |||
| <view class="videoSty"> | |||
| <video id="video" poster="{{videoList.posterUrl}}" src="{{videoList.videoUrl}}"></video> | |||
| <image wx:if="{{!videoVideoControls}}" class="videoPoster" src="{{videoList.posterUrl}}"></image> | |||
| <image wx:if="{{!videoVideoControls}}" bindtap="hideVideoControls" class="videoPlay" src="{{imgUrl+'/images/videoPlay.png'}}"></image> | |||
| </view> | |||
| <view class="indexBottom2Group"> | |||
| <image class="indexBottom" style="height:204rpx;" src="{{imgUrl+'/images/indexBottom2.png?v=002'}}"></image> | |||
| <view class="lookMore"></view> | |||
| </view> | |||
| </view> | |||
| <image wx:if="{{isStartAdvertisingShow}}" style="opacity:{{isStartAdvertising}};" src="{{startAdvertisingUrl}}" class='imgBg' catchtouchmove="ture"></image> | |||
| <!-- <view class="msgFrame" wx:if="{{!isRegister}}"> --> | |||
| <view class="msgFrame"> | |||
| <view class="inputGroup"> | |||
| @@ -55,4 +58,5 @@ | |||
| <service></service> | |||
| </view> | |||
| <tabBar></tabBar> | |||
| <image wx:if="{{isStartAdvertisingShow}}" style="opacity:{{isStartAdvertising}};" src="{{startAdvertisingUrl}}" class='imgBg' catchtouchmove="ture"></image> | |||
| </view> | |||
| @@ -16,7 +16,7 @@ view{ | |||
| width: 750rpx; | |||
| height: 1356rpx; | |||
| transition: opacity 1000ms; | |||
| z-index: 9; | |||
| z-index: 100; | |||
| } | |||
| .msgFrame{ | |||
| position: fixed; | |||
| @@ -100,7 +100,7 @@ view{ | |||
| position: relative; | |||
| width:750rpx; | |||
| height:530rpx; | |||
| margin-bottom: 18rpx; | |||
| margin: 35rpx 0; | |||
| } | |||
| #video{ | |||
| width: 100%; | |||
| @@ -193,4 +193,14 @@ view{ | |||
| top:0; | |||
| width: 100%; | |||
| height: 100%; | |||
| } | |||
| .indexBottom2Group{ | |||
| position: relative; | |||
| } | |||
| .lookMore{ | |||
| position: absolute; | |||
| right: 34rpx; | |||
| bottom: 25rpx; | |||
| width: 188rpx; | |||
| height: 40rpx; | |||
| } | |||
| @@ -7,14 +7,14 @@ Page({ | |||
| */ | |||
| data: { | |||
| imgUrl: app.globalData.urlStatic,//图片路径 | |||
| ruleShow: false,//是否显示游戏玩法 | |||
| ruleShow: true,//是否显示游戏玩法 | |||
| ruleCloseShow: false,//是否显示游戏玩法关闭按钮 | |||
| clawTop:95,//爪子的top值 | |||
| clawLeft: 293,//爪子的left值 | |||
| clawScale: 1,//爪子的scale值 | |||
| downNum:30,//倒计时时间 | |||
| setInt:null,//倒计时元素 | |||
| pizeTip:1,//抓奖提示框 | |||
| pizeTip:0,//抓奖提示框 | |||
| setGroup:{ | |||
| left:null, | |||
| right: null, | |||
| @@ -22,8 +22,9 @@ Page({ | |||
| bottom: null, | |||
| }, | |||
| gameSign: null, //游戏结束时需要 | |||
| startType:1,//开始类型:1通过游戏玩法里的开始按钮,2:通过抓取按钮 | |||
| gameState:false,//游戏状态 | |||
| endGameData:null,//中奖数据 | |||
| isRegister:false,//是否已注册 | |||
| }, | |||
| /** | |||
| @@ -31,6 +32,12 @@ Page({ | |||
| */ | |||
| onLoad: function (options) { | |||
| app.globalData.nowPage = 3; | |||
| if (app.globalData.openid) { | |||
| this.getOrderInfo(); | |||
| this.endGame(); | |||
| } else { | |||
| app.globalData.openidSuccessFuc = this.getOrderInfo; | |||
| } | |||
| }, | |||
| /** | |||
| @@ -87,6 +94,7 @@ Page({ | |||
| }) | |||
| }, | |||
| openGameRule: function () {//打开游戏玩法 | |||
| console.log(this.data.gameState); | |||
| if(!this.data.gameState){ | |||
| this.setData({ | |||
| ruleShow: true | |||
| @@ -94,14 +102,11 @@ Page({ | |||
| } | |||
| }, | |||
| gameStart: function () {//开始游戏按钮 | |||
| if(this.data.startType==1){ | |||
| this.data.startType = 2; | |||
| this.setData({ | |||
| ruleShow: false, | |||
| ruleCloseShow: true | |||
| }) | |||
| this.beginGame(); | |||
| } | |||
| this.setData({ | |||
| ruleShow: false, | |||
| ruleCloseShow: true | |||
| }) | |||
| this.beginGame(); | |||
| }, | |||
| beginGame: function () {//开始游戏 | |||
| app.wxRequest(app.globalData.urlRoot + "dollGame/beginGame", {}, res => { | |||
| @@ -122,9 +127,10 @@ Page({ | |||
| }, | |||
| endGame:function(){//结束游戏 | |||
| app.wxRequest(app.globalData.urlRoot + "dollGame/endGame", { sign:this.data.gameSign}, res => { | |||
| console.log(res); | |||
| if(res.code=200){ | |||
| this.setData({ | |||
| endGameData: res.data | |||
| }) | |||
| }else{ | |||
| console.log(res); | |||
| } | |||
| @@ -199,8 +205,26 @@ Page({ | |||
| clawTop: this.data.clawScale > 1 ? 490 - (2 * (this.data.clawScale-1) * 90) : 490 + (2 * (1 - this.data.clawScale) * 90 ) | |||
| }) | |||
| this.closeSetInt(); | |||
| setTimeout(() => { | |||
| this.data.gameState = false; | |||
| if (this.data.endGameData) { | |||
| this.setData({ | |||
| pizeTip: 1 | |||
| }) | |||
| } else { | |||
| if (this.data.isRegister) { | |||
| this.setData({ | |||
| pizeTip: 2 | |||
| }) | |||
| } else { | |||
| this.setData({ | |||
| pizeTip: 3 | |||
| }) | |||
| } | |||
| } | |||
| },1000) | |||
| }, | |||
| downTimeFun:function(){//游戏倒计时 | |||
| downTimeFun: function () {//游戏倒计时 | |||
| this.data.gameState = true; | |||
| this.data.setInt = setInterval(()=>{ | |||
| this.data.downNum -= 1; | |||
| @@ -211,12 +235,12 @@ Page({ | |||
| downNum: this.data.downNum | |||
| }) | |||
| if (this.data.downNum < 1) { | |||
| this.closeSetInt(); | |||
| // this.closeSetInt(); | |||
| this.getClaw(); | |||
| } | |||
| },1000); | |||
| }, | |||
| closeSetInt: function () {//关闭倒计时 | |||
| this.data.gameState = false; | |||
| clearInterval(this.data.setInt); | |||
| this.setData({ | |||
| downNum: 30, | |||
| @@ -237,5 +261,32 @@ Page({ | |||
| url: '../prizes/prizes' | |||
| }) | |||
| } | |||
| }, | |||
| getOrderInfo: function () {//查询是否已注册 | |||
| app.wxRequest(app.globalData.urlRoot +"userInfo/getOrderInfo",{},res=>{ | |||
| if(res.code==200){ | |||
| if (res.data) { | |||
| this.data.isRegister = true; | |||
| } | |||
| } | |||
| },this) | |||
| }, | |||
| receive:function(){//立即领取 | |||
| wx.redirectTo({ | |||
| url: '../myCenter/myCenter', | |||
| }) | |||
| }, | |||
| invitation: function () {//邀请好友一起来玩 | |||
| }, | |||
| userRegister: function () {//立即注册,探索更多星探好礼 | |||
| wx.navigateTo({ | |||
| url: '../receiveRegister/receiveRegister', | |||
| }) | |||
| }, | |||
| closeWindow:function(){//关闭中奖 | |||
| this.setData({ | |||
| pizeTip:0 | |||
| }) | |||
| } | |||
| }) | |||
| @@ -42,13 +42,15 @@ | |||
| </view> | |||
| <view class="successPop" wx:if="{{pizeTip}}"> | |||
| <view class="successGroup" wx:if="{{pizeTip==1}}"> | |||
| <image class="gameRuleClose" style="top:-31rpx;right:-29rpx;" src="{{imgUrl+'/images/gameRuleClose.png'}}"></image> | |||
| <image class="gameRuleClose" 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="{{imgUrl+'/images/prizePic1.png'}}" mode="aspectFit"></image> | |||
| <view class="prizeName">头等舱机票一张</view> | |||
| <view class="startRegister">立即领取</view> | |||
| <!-- <image class="prizePic" src="{{imgUrl+'/images/prizePic1.png'}}" mode="aspectFit"></image> --> | |||
| <!-- <view class="prizeName">头等舱机票一张</view> --> | |||
| <image class="prizePic" src="{{endGameData.awardPicUrl}}" mode="aspectFit"></image> | |||
| <view class="prizeName">{{endGameData.awardName}}</view> | |||
| <view class="startRegister" bindtap="receive">立即领取</view> | |||
| </view> | |||
| <view class="successGroup" wx:if="{{pizeTip==2 || pizeTip==3}}"> | |||
| <image class="gameRuleClose" style="top:-31rpx;right:-29rpx;" src="{{imgUrl+'/images/gameRuleClose.png'}}"></image> | |||
| @@ -56,7 +58,8 @@ | |||
| <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">{{pizeTip==2?"邀请好友一起来玩":"立即注册,探索更多星探好礼"}}</view> | |||
| <view class="startRegister" wx:if="{{pizeTip==2}}">邀请好友一起来玩<button open-type="share" class="shareBtn" style="width:100%;height:100%;margin:0;padding:0;min-height:0;"></button></view> | |||
| <view class="startRegister" bindtap="userRegister" wx:if="{{pizeTip==3}}">立即注册,探索更多星探好礼</view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| @@ -241,6 +241,7 @@ view{ | |||
| font-weight:400; | |||
| color:rgba(255,255,255,1); | |||
| line-height:50rpx; | |||
| position: relative; | |||
| } | |||
| .prizePic{ | |||
| width: 310rpx; | |||
| @@ -335,4 +336,11 @@ view{ | |||
| font-weight:400; | |||
| color:rgba(255,255,255,1); | |||
| border-radius: 20rpx; | |||
| } | |||
| .shareBtn{ | |||
| position: absolute; | |||
| left: 0; | |||
| top: 0; | |||
| z-index: 2; | |||
| opacity: 0; | |||
| } | |||
| @@ -0,0 +1,132 @@ | |||
| // pages/mobileVerification/mobileVerification.js | |||
| const app = getApp() | |||
| Page({ | |||
| /** | |||
| * 页面的初始数据 | |||
| */ | |||
| data: { | |||
| imgUrl: app.globalData.urlStatic,//图片路径 | |||
| isAgreement: true,//是否同意协议 | |||
| verificationCode: '获取验证码',//验证码文案 | |||
| sendCode: true, | |||
| mobileText:"",//手机号 | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad: function (options) { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面初次渲染完成 | |||
| */ | |||
| onReady: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| onShow: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面隐藏 | |||
| */ | |||
| onHide: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面卸载 | |||
| */ | |||
| onUnload: function () { | |||
| }, | |||
| /** | |||
| * 页面相关事件处理函数--监听用户下拉动作 | |||
| */ | |||
| onPullDownRefresh: function () { | |||
| }, | |||
| /** | |||
| * 页面上拉触底事件的处理函数 | |||
| */ | |||
| onReachBottom: function () { | |||
| }, | |||
| /** | |||
| * 用户点击右上角分享 | |||
| */ | |||
| onShareAppMessage: function () { | |||
| return app.sharePack(); | |||
| }, | |||
| agreementState: function () {//协议 | |||
| this.setData({ | |||
| isAgreement: !this.data.isAgreement | |||
| }) | |||
| }, | |||
| getCode: function (e) {//获取验证码 | |||
| if (!app.mobileVerify(this.data.mobileText)) { | |||
| if (this.data.mobileText) { | |||
| wx.showToast({ | |||
| title: '请输入正确的电话', | |||
| icon: 'none' | |||
| }) | |||
| } else { | |||
| wx.showToast({ | |||
| title: '请输入电话', | |||
| icon: 'none' | |||
| }) | |||
| } | |||
| return; | |||
| } | |||
| if (!this.data.sendCode) { | |||
| return; | |||
| } | |||
| this.data.sendCode = false; | |||
| app.wxRequest(app.globalData.urlRoot + "captcha/sendCaptcha", { mobile: this.data.mobileText }, res => { | |||
| if (res.code == 200) { | |||
| this.countDown(); | |||
| wx.showToast({ | |||
| title: '验证码获取成功', | |||
| icon: "none" | |||
| }) | |||
| this.setData({ | |||
| verificationCode: 60 | |||
| }) | |||
| } else { | |||
| this.data.sendCode = true; | |||
| wx.showToast({ | |||
| title: res.msg, | |||
| icon: "none" | |||
| }) | |||
| } | |||
| }, this) | |||
| }, | |||
| countDown: function () {//倒计时 | |||
| setTimeout(() => { | |||
| this.setData({ | |||
| verificationCode: this.data.verificationCode - 1 | |||
| }) | |||
| if (this.data.verificationCode > 0) { | |||
| this.countDown(); | |||
| } else { | |||
| this.setData({ | |||
| verificationCode: "获取验证码" | |||
| }) | |||
| this.data.sendCode = true; | |||
| } | |||
| }, 1000); | |||
| }, | |||
| getMoblie:function(e){//获取用户输入的手机号 | |||
| this.data.mobileText = e.detail.value | |||
| } | |||
| }) | |||
| @@ -0,0 +1,6 @@ | |||
| { | |||
| "navigationBarTitleText": "东风启辰“星探计划”", | |||
| "usingComponents": { | |||
| "tabBar": "../component/tabBar/index" | |||
| } | |||
| } | |||
| @@ -0,0 +1,30 @@ | |||
| <!--pages/mobileVerification/mobileVerification.wxml--> | |||
| <view class="all" > | |||
| <view class="main"> | |||
| <image class="bg" src="{{imgUrl+'/star/bg.jpg'}}"></image> | |||
| <view class="msgFrame"> | |||
| <view class="titleGroup"> | |||
| <image class="mobilepagelogo" src="{{imgUrl+'/images/mobilepagelogo.png'}}"></image> | |||
| <view class="goodsName">启辰</view> | |||
| <view class="goodsText">申请</view> | |||
| </view> | |||
| <view class="inputFrame"> | |||
| <view class="inputGroup"> | |||
| <view class="mobileFirst">+86</view> | |||
| <image class="mobilepagedown" src="{{imgUrl+'/images/mobilepagedown.png'}}"></image> | |||
| <input class="inputText" bindinput="getMoblie" placeholder="手机号" type="number" maxlength='11'></input> | |||
| </view> | |||
| <view class="inputGroup" style="justify-content: space-between;margin-top:30rpx;"> | |||
| <input class="inputText" placeholder="短信验证码"></input> | |||
| <view class="codeSty" bindtap="getCode">{{verificationCode}}</view> | |||
| </view> | |||
| </view> | |||
| <view class="agreementGroup" bindtap="agreementState"> | |||
| <image class="agreeIcon" src="{{imgUrl+(isAgreement?'/images/agreeIcon.png':'/images/disagreeIcon.png')}}"></image> | |||
| <view class="agreementText">我仔细阅读并接受所附的《用户协议与隐私政策》</view> | |||
| </view> | |||
| <view class="submitBtn">提交</view> | |||
| </view> | |||
| </view> | |||
| <tabBar></tabBar> | |||
| </view> | |||
| @@ -0,0 +1,129 @@ | |||
| /* pages/mobileVerification/mobileVerification.wxss */ | |||
| image{ | |||
| display: block; | |||
| } | |||
| view{ | |||
| -webkit-overflow-scrolling: touch; | |||
| } | |||
| .main{ | |||
| height: calc(100vh - 150rpx); | |||
| overflow: auto; | |||
| } | |||
| .bg { | |||
| position: fixed; | |||
| top: 0; | |||
| left: 0; | |||
| width: 750rpx; | |||
| height: 1353rpx; | |||
| } | |||
| .msgFrame{ | |||
| position: absolute; | |||
| left: 0; | |||
| bottom: 150rpx; | |||
| width: 750rpx; | |||
| padding: 30rpx 20rpx; | |||
| background-color: white; | |||
| box-sizing: border-box; | |||
| border-top-left-radius: 20rpx; | |||
| border-top-right-radius: 20rpx; | |||
| } | |||
| .mobilepagelogo{ | |||
| width: 50rpx; | |||
| height: 50rpx; | |||
| } | |||
| .titleGroup{ | |||
| display: flex; | |||
| align-items: center; | |||
| } | |||
| .goodsName{ | |||
| margin-left: 5rpx; | |||
| font-size:30rpx; | |||
| line-height: 30rpx; | |||
| font-family:PingFangSC; | |||
| font-weight:bold; | |||
| color:rgba(30,27,28,1); | |||
| } | |||
| .goodsText{ | |||
| margin-left: 30rpx; | |||
| font-size:30rpx; | |||
| line-height: 30rpx; | |||
| font-family:PingFangSC; | |||
| font-weight:400; | |||
| color:rgba(30,27,28,1); | |||
| } | |||
| .inputFrame{ | |||
| margin-top: 30rpx; | |||
| } | |||
| .mobileFirst{ | |||
| font-size:32rpx; | |||
| line-height: 32rpx; | |||
| font-family:NissanBrand; | |||
| font-weight:300; | |||
| color:rgba(30,27,28,1); | |||
| } | |||
| .inputGroup{ | |||
| display: flex; | |||
| align-items: center; | |||
| padding: 0 22rpx; | |||
| box-sizing: border-box; | |||
| background-color: #F0EDF1; | |||
| border: 1rpx solid #DEDBDE; | |||
| height: 70rpx; | |||
| border-radius: 20rpx; | |||
| } | |||
| .mobilepagedown{ | |||
| width: 21rpx; | |||
| height: 11rpx; | |||
| margin-left: 17rpx; | |||
| margin-right: 55rpx; | |||
| } | |||
| .inputText{ | |||
| width: 500rpx; | |||
| line-height: 26rpx; | |||
| font-size:26rpx; | |||
| font-family:PingFangSC; | |||
| font-weight:400; | |||
| color:black; | |||
| } | |||
| .codeSty{ | |||
| width:162rpx; | |||
| height:50rpx; | |||
| background-color: #16538E; | |||
| border-radius: 20rpx; | |||
| line-height: 50rpx; | |||
| text-align: center; | |||
| font-size:26rpx; | |||
| font-family:PingFangSC; | |||
| font-weight:400; | |||
| color:rgba(255,255,255,1); | |||
| } | |||
| .submitBtn{ | |||
| width:710rpx; | |||
| height:71rpx; | |||
| background-color: #16538E; | |||
| text-align: center; | |||
| line-height: 71rpx; | |||
| font-size:30rpx; | |||
| font-family:PingFangSC; | |||
| font-weight:400; | |||
| color:rgba(255,255,255,1); | |||
| border-radius: 20rpx; | |||
| } | |||
| .agreementGroup{ | |||
| display: flex; | |||
| align-items: center; | |||
| margin-top: 35rpx; | |||
| margin-bottom: 60rpx; | |||
| } | |||
| .agreeIcon{ | |||
| width: 29rpx; | |||
| height: 28rpx; | |||
| margin-right: 17rpx; | |||
| } | |||
| .agreementText{ | |||
| line-height: 24rpx; | |||
| font-size:24rpx; | |||
| font-family:PingFangSC; | |||
| font-weight:300; | |||
| color:rgba(156,157,157,1); | |||
| } | |||
| @@ -488,10 +488,12 @@ Page({ | |||
| if (e.detail.errMsg == 'getPhoneNumber:ok') { | |||
| app.getMobile(e.detail.encryptedData, e.detail.iv, res => { | |||
| if (res.code == 200) { | |||
| this.data.subscribeData.mobile = res.data.decodeData.phoneNumber; | |||
| this.setData({ | |||
| subscribeData: this.data.subscribeData | |||
| }) | |||
| if(res.data){ | |||
| this.data.subscribeData.mobile = res.data.decodeData.phoneNumber; | |||
| this.setData({ | |||
| subscribeData: this.data.subscribeData | |||
| }) | |||
| } | |||
| } else { | |||
| wx.showToast({ | |||
| title: res.msg, | |||
| @@ -22,7 +22,7 @@ | |||
| <image class="userLevelIcon" src="{{imgUrl+'/images/userLevelIcon'+userData.userLevel+'.png'}}"></image> | |||
| <view class="userLevelTip">您的级别为</view> | |||
| <image class="userLevelText" src="{{imgUrl+'/images/userLevelText'+userData.userLevel+'.png'}}"></image> | |||
| <view class="lookRule">星探规则</view> | |||
| <view class="lookRule" bindtap="lookRule" data-value="{{true}}">星探规则</view> | |||
| </view> | |||
| <view class="userLevel" wx:if="{{!userData.userLevel}}"> | |||
| <image class="userWaitIcon" src="{{imgUrl+'/images/userWaitIcon.png'}}"></image> | |||
| @@ -96,7 +96,7 @@ | |||
| <view class="recordGroup" wx:for="{{recordList}}" wx:key="index"> | |||
| <view class="recordGroupLeft"> | |||
| <view class="recordHeadGroup"> | |||
| <image class="recordUserImg" src="{{imgUrl+'/images/defaultHead.png'}}"></image> | |||
| <image class="recordUserImg" src="{{userData.avatarUrl&&recordNow!=1?userData.avatarUrl:imgUrl+'/images/defaultHead.png'}}"></image> | |||
| </view> | |||
| <view class="recordMainGroup"> | |||
| <view class="rewardName">{{item.awardName}}</view> | |||
| @@ -190,7 +190,9 @@ | |||
| </view> | |||
| <view class="prizeDesc" catchtouchmove="ture" style="background-color:'rgba(000,000,000,0.8)';" wx:if="{{ruleShow}}"> | |||
| <view class="ruleImgGroup"> | |||
| <image class="ruleImg" src="{{imgUrl+'/images/rule.png'}}"></image> | |||
| <view class="ruleImgGroup" style="overflow: auto;"> | |||
| <image class="ruleImg" src="{{imgUrl+'/star/xingRule.png?v=002'}}"></image> | |||
| </view> | |||
| <image bindtap="lookRule" data-value="{{false}}" class="closeDescIcon" src="{{imgUrl+'/images/closeDescIcon.png'}}"></image> | |||
| </view> | |||
| </view> | |||
| @@ -539,13 +539,14 @@ view{ | |||
| height: 37rpx; | |||
| } | |||
| .ruleImgGroup{ | |||
| width: 500rpx; | |||
| height: 864rpx; | |||
| width: 631rpx; | |||
| height: 923rpx; | |||
| position: relative; | |||
| } | |||
| .ruleImg{ | |||
| width: 100%; | |||
| height: 100%; | |||
| height: 1160rpx; | |||
| border-radius: 20rpx; | |||
| } | |||
| .prizeCustomGroup{ | |||
| width:453rpx; | |||
| @@ -89,7 +89,7 @@ Page({ | |||
| * 用户点击右上角分享 | |||
| */ | |||
| onShareAppMessage: function () { | |||
| return app.sharePack(); | |||
| }, | |||
| getCode: function (e) {//获取验证码 | |||
| if (!app.mobileVerify(this.data.subscribeData.mobile)) { | |||
| @@ -163,10 +163,12 @@ Page({ | |||
| if (e.detail.errMsg == 'getPhoneNumber:ok') { | |||
| app.getMobile(e.detail.encryptedData, e.detail.iv, res => { | |||
| if (res.code == 200) { | |||
| this.data.subscribeData.mobile = res.data.decodeData.phoneNumber; | |||
| this.setData({ | |||
| subscribeData: this.data.subscribeData | |||
| }) | |||
| if (res.data) { | |||
| this.data.subscribeData.mobile = res.data.decodeData.phoneNumber; | |||
| this.setData({ | |||
| subscribeData: this.data.subscribeData | |||
| }) | |||
| } | |||
| } else { | |||
| wx.showToast({ | |||
| title: res.msg, | |||
| @@ -58,7 +58,6 @@ Page({ | |||
| }, | |||
| phonebolb:function(_phone){ | |||
| app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {mobile:_phone}, res => { | |||
| console.log(res) | |||
| if (res.code == 200) { | |||
| if(res.data!=null){ | |||
| app.globalData.certificationState=res.data.certificationState; | |||
| @@ -4,7 +4,8 @@ | |||
| <image class="bg" src="{{imgUrl+'/star/bg.jpg'}}"></image> | |||
| <image class="logo1" src="{{imgUrl+'/star/logo1.png'}}"></image> | |||
| <image class="logo2" src="{{imgUrl+'/star/logo2.png'}}"></image> | |||
| <view class="ruleBtn" bindtap="showRule">规则说明</view> | |||
| <view class="ruleBtn" wx:if="{{!maskShow}}" bindtap="showRule">规则说明</view> | |||
| <view class="ruleBtn ruleBtnColor" wx:if="{{maskShow}}" bindtap="showRule">规则说明</view> | |||
| <view class="propagandaBox"> | |||
| <text class="text">已有</text> | |||
| <view class="numBox"> | |||
| @@ -23,7 +24,9 @@ | |||
| </view> | |||
| <view class="mask" wx:if="{{maskShow}}"> | |||
| <view class="ruleContent"> | |||
| <image class="rule" src="{{imgUrl+'/star/rule.png'}}"></image> | |||
| <view class="rule"> | |||
| <image class="ruleImg" src="{{imgUrl+'/star/xingRule.png?v=002'}}"></image> | |||
| </view> | |||
| <image class="closeBtn" src="{{imgUrl+'/star/closebtn.png'}}" bindtap="hiddenRule"></image> | |||
| <!-- <view class="closeBtn" style="right:-40rpx;top:-45rpx;" bindtap="hiddenRule"></view> --> | |||
| </view> | |||
| @@ -44,7 +44,9 @@ | |||
| padding-left: 20rpx; | |||
| box-sizing: border-box; | |||
| } | |||
| .ruleBtnColor{ | |||
| background-color: #345489; | |||
| } | |||
| .propagandaBox { | |||
| position: absolute; | |||
| width: 100%; | |||
| @@ -122,16 +124,16 @@ | |||
| .mask>.ruleContent { | |||
| position: relative; | |||
| width: 562rpx; | |||
| height: 971rpx; | |||
| width: 631rpx; | |||
| height: 923rpx; | |||
| border-radius: 20rpx; | |||
| background-color: #ffffff; | |||
| } | |||
| .mask>.ruleContent>.rule { | |||
| position: relative; | |||
| width: 100%; | |||
| height: 100%; | |||
| overflow: auto; | |||
| } | |||
| .closeBtn { | |||
| @@ -147,3 +149,8 @@ | |||
| /* .closeBtn::before { | |||
| content: "\2716"; | |||
| } */ | |||
| .ruleImg{ | |||
| width: 631rpx; | |||
| height: 1160rpx; | |||
| border-radius: 20rpx; | |||
| } | |||
| @@ -96,12 +96,18 @@ | |||
| "pathName": "pages/receiveRegister/receiveRegister", | |||
| "query": "" | |||
| }, | |||
| { | |||
| "id": -1, | |||
| "name": "地址管理", | |||
| "pathName": "pages/address/address", | |||
| "query": "" | |||
| } | |||
| { | |||
| "id": -1, | |||
| "name": "地址管理", | |||
| "pathName": "pages/address/address", | |||
| "query": "" | |||
| }, | |||
| { | |||
| "id": -1, | |||
| "name": "手机验证", | |||
| "pathName": "pages/mobileVerification/mobileVerification", | |||
| "query": "" | |||
| } | |||
| ] | |||
| } | |||
| } | |||