| }, this, "POST"); | }, this, "POST"); | ||||
| }, | }, | ||||
| getMobile: function (encryptedData, iv, callback, thisArg){//和后台置换手机号 | 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"); | |||||
| }) | |||||
| } | } | ||||
| }) | }) |
| "pages/poster/poster", | "pages/poster/poster", | ||||
| "pages/coupon/coupon", | "pages/coupon/coupon", | ||||
| "pages/receiveRegister/receiveRegister", | "pages/receiveRegister/receiveRegister", | ||||
| "pages/address/address" | |||||
| "pages/address/address", | |||||
| "pages/mobileVerification/mobileVerification" | |||||
| ], | ], | ||||
| "window": { | "window": { | ||||
| "backgroundTextStyle": "light", | "backgroundTextStyle": "light", |
| * 用户点击右上角分享 | * 用户点击右上角分享 | ||||
| */ | */ | ||||
| onShareAppMessage: function () { | onShareAppMessage: function () { | ||||
| return app.sharePack(); | |||||
| }, | }, | ||||
| addressChange:function(e){//所在地区发生改变 | addressChange:function(e){//所在地区发生改变 | ||||
| this.data.submitData.province = e.detail.value[0]; | this.data.submitData.province = e.detail.value[0]; |
| showClose:false, | showClose:false, | ||||
| maskShow: false, | maskShow: false, | ||||
| taskShow: 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, | isShare:false, | ||||
| picturlList: [], | picturlList: [], | ||||
| picturlCurrent:0, | picturlCurrent:0, | ||||
| isRegister:false,//是否已注册 | isRegister:false,//是否已注册 | ||||
| shareId:null, | shareId:null, | ||||
| isFriendShare:false,//是否朋友分享过来的 | isFriendShare:false,//是否朋友分享过来的 | ||||
| isAddress:false,//是否有地址 | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 关闭任务窗 | * 关闭任务窗 | ||||
| }) | }) | ||||
| } else { | } else { | ||||
| this.setData({ | this.setData({ | ||||
| taskName: '集齐启辰星【大灯】碎片1/4', | |||||
| taskImgUrl: 'https://www.jiyou-tech.com/2020/496_qichen/static/star/everyday/taskImg2.png', | |||||
| isSign: false, | isSign: false, | ||||
| isShare: true, | isShare: true, | ||||
| showClose: true | showClose: true | ||||
| loadFun: function () { | loadFun: function () { | ||||
| this.getTaskProgress(); | this.getTaskProgress(); | ||||
| this.getOrderInfo(); | this.getOrderInfo(); | ||||
| // this.getShareId(); | |||||
| this.getShareId(); | |||||
| this.getAddress(); | |||||
| if (this.data.isFriendShare) { | if (this.data.isFriendShare) { | ||||
| this.useShareId(); | this.useShareId(); | ||||
| } | } | ||||
| }, this); | }, this); | ||||
| }, | }, | ||||
| receive:function(){//领取购车红包 | 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 () {//查看当日是否签到 | getSignInfo: function () {//查看当日是否签到 | ||||
| app.wxRequest(app.globalData.urlRoot + "task/getSignInfo", {}, res => { | app.wxRequest(app.globalData.urlRoot + "task/getSignInfo", {}, res => { | ||||
| app.wxRequest(app.globalData.urlRoot + "task/getShareId", {}, res => { | app.wxRequest(app.globalData.urlRoot + "task/getShareId", {}, res => { | ||||
| this.getSignInfo(); | this.getSignInfo(); | ||||
| if (res.code == 200) { | if (res.code == 200) { | ||||
| this.setData({ | |||||
| taskName: "集齐启辰星【" + res.data.shortName+"】碎片1/4", | |||||
| taskImgUrl: res.data.popPicUrl, | |||||
| }) | |||||
| this.data.shareId = res.data.shareId; | this.data.shareId = res.data.shareId; | ||||
| } | } | ||||
| }, this) | }, this) |
| <image class="fragmentComplete2" src="{{item.childIdArr['picArr'][1]}}"></image> | <image class="fragmentComplete2" src="{{item.childIdArr['picArr'][1]}}"></image> | ||||
| <image class="fragmentComplete3" src="{{item.childIdArr['picArr'][2]}}"></image> | <image class="fragmentComplete3" src="{{item.childIdArr['picArr'][2]}}"></image> | ||||
| <image class="fragmentComplete4" src="{{item.childIdArr['picArr'][3]}}"></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> | ||||
| <view class="fragmentBox" wx:if="{{item.fullPicUrl}}"> | <view class="fragmentBox" wx:if="{{item.fullPicUrl}}"> | ||||
| <image class="fragmentComplete" src="{{item.fullPicUrl}}"></image> | <image class="fragmentComplete" src="{{item.fullPicUrl}}"></image> | ||||
| <image class="arrowBtn" style="left:-30rpx;" src="{{imgUrl+'/star/everyday/arrowLeftBtn.png'}}" bindtap="prevPicturl"></image> | <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> | <image class="arrowBtn" style="right:-30rpx;" src="{{imgUrl+'/star/everyday/arrowRightBtn.png'}}" bindtap="nextPicturl"></image> | ||||
| </view> | </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" style="margin-right:20rpx;" bindtap="goScout">星探任务</view> | ||||
| <view class="btn select" style="margin-left:20rpx;">每日任务</view> | <view class="btn select" style="margin-left:20rpx;">每日任务</view> | ||||
| </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 class="receive" bindtap="receive">领取购车红包</view> | ||||
| </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="mask" wx:if="{{maskShow}}"> | ||||
| <view class="taskBox" wx:if="{{taskShow}}"> | <view class="taskBox" wx:if="{{taskShow}}"> | ||||
| <text wx:if="{{showClose}}" class="closeBtn" style="right:-35rpx;top:-50rpx;" bindtap="hiddenTask"></text> | <text wx:if="{{showClose}}" class="closeBtn" style="right:-35rpx;top:-50rpx;" bindtap="hiddenTask"></text> | ||||
| <view class="title">今日任务</view> | <view class="title">今日任务</view> | ||||
| <view class="contentBox"> | <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}}">分享再获取一张碎片 | <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> | <button open-type="share" class="shareBtn" style="width:100%;height:100%;margin:0;padding:0;min-height:0;"></button> | ||||
| </view> | </view> |
| background-color: #345489; | background-color: #345489; | ||||
| color: #ffffff; | color: #ffffff; | ||||
| } | } | ||||
| .mask { | |||||
| .mask{ | |||||
| position: fixed; | position: fixed; | ||||
| left: 0; | left: 0; | ||||
| top: 0; | top: 0; | ||||
| width: 100%; | width: 100%; | ||||
| height: 100%; | |||||
| height: calc(100vh - 150rpx); | |||||
| display: flex; | display: flex; | ||||
| align-items: center; | align-items: center; | ||||
| justify-content: center; | justify-content: center; | ||||
| top: 0; | top: 0; | ||||
| z-index: 2; | z-index: 2; | ||||
| opacity: 0; | 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; | |||||
| } | } |
| if (e.detail.errMsg=='getPhoneNumber:ok'){ | if (e.detail.errMsg=='getPhoneNumber:ok'){ | ||||
| app.getMobile(e.detail.encryptedData, e.detail.iv,res=>{ | app.getMobile(e.detail.encryptedData, e.detail.iv,res=>{ | ||||
| if (res.code == 200) { | 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 { | } else { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: res.msg, | title: res.msg, |
| <view class="all" wx:if="{{mainShow}}"> | <view class="all" wx:if="{{mainShow}}"> | ||||
| <view class="main"> | <view class="main"> | ||||
| <view class="contentFrame"> | <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"> | <view class="swiperFrame"> | ||||
| <swiper class="swiperSty" autoplay current="{{swiperCurrent}}" bindchange="swiperChange"> | <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> | <swiper-item wx:for="{{bannerList}}" wx:key="index"><image src="{{item.bannerUrl}}" style="width:100%;" mode="aspectFill"></image></swiper-item> | ||||
| <view class="bannerName">{{bannerList[swiperCurrent].bannerName}}</view> | <view class="bannerName">{{bannerList[swiperCurrent].bannerName}}</view> | ||||
| </view> | </view> | ||||
| <image class="indexBottom" src="{{imgUrl+'/images/indexBottom.png'}}"></image> | <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> | </view> | ||||
| <image wx:if="{{isStartAdvertisingShow}}" style="opacity:{{isStartAdvertising}};" src="{{startAdvertisingUrl}}" class='imgBg' catchtouchmove="ture"></image> | |||||
| <!-- <view class="msgFrame" wx:if="{{!isRegister}}"> --> | <!-- <view class="msgFrame" wx:if="{{!isRegister}}"> --> | ||||
| <view class="msgFrame"> | <view class="msgFrame"> | ||||
| <view class="inputGroup"> | <view class="inputGroup"> | ||||
| <service></service> | <service></service> | ||||
| </view> | </view> | ||||
| <tabBar></tabBar> | <tabBar></tabBar> | ||||
| <image wx:if="{{isStartAdvertisingShow}}" style="opacity:{{isStartAdvertising}};" src="{{startAdvertisingUrl}}" class='imgBg' catchtouchmove="ture"></image> | |||||
| </view> | </view> |
| width: 750rpx; | width: 750rpx; | ||||
| height: 1356rpx; | height: 1356rpx; | ||||
| transition: opacity 1000ms; | transition: opacity 1000ms; | ||||
| z-index: 9; | |||||
| z-index: 100; | |||||
| } | } | ||||
| .msgFrame{ | .msgFrame{ | ||||
| position: fixed; | position: fixed; | ||||
| position: relative; | position: relative; | ||||
| width:750rpx; | width:750rpx; | ||||
| height:530rpx; | height:530rpx; | ||||
| margin-bottom: 18rpx; | |||||
| margin: 35rpx 0; | |||||
| } | } | ||||
| #video{ | #video{ | ||||
| width: 100%; | width: 100%; | ||||
| top:0; | top:0; | ||||
| width: 100%; | width: 100%; | ||||
| height: 100%; | height: 100%; | ||||
| } | |||||
| .indexBottom2Group{ | |||||
| position: relative; | |||||
| } | |||||
| .lookMore{ | |||||
| position: absolute; | |||||
| right: 34rpx; | |||||
| bottom: 25rpx; | |||||
| width: 188rpx; | |||||
| height: 40rpx; | |||||
| } | } |
| */ | */ | ||||
| data: { | data: { | ||||
| imgUrl: app.globalData.urlStatic,//图片路径 | imgUrl: app.globalData.urlStatic,//图片路径 | ||||
| ruleShow: false,//是否显示游戏玩法 | |||||
| ruleShow: true,//是否显示游戏玩法 | |||||
| ruleCloseShow: false,//是否显示游戏玩法关闭按钮 | ruleCloseShow: false,//是否显示游戏玩法关闭按钮 | ||||
| clawTop:95,//爪子的top值 | clawTop:95,//爪子的top值 | ||||
| clawLeft: 293,//爪子的left值 | clawLeft: 293,//爪子的left值 | ||||
| clawScale: 1,//爪子的scale值 | clawScale: 1,//爪子的scale值 | ||||
| downNum:30,//倒计时时间 | downNum:30,//倒计时时间 | ||||
| setInt:null,//倒计时元素 | setInt:null,//倒计时元素 | ||||
| pizeTip:1,//抓奖提示框 | |||||
| pizeTip:0,//抓奖提示框 | |||||
| setGroup:{ | setGroup:{ | ||||
| left:null, | left:null, | ||||
| right: null, | right: null, | ||||
| bottom: null, | bottom: null, | ||||
| }, | }, | ||||
| gameSign: null, //游戏结束时需要 | gameSign: null, //游戏结束时需要 | ||||
| startType:1,//开始类型:1通过游戏玩法里的开始按钮,2:通过抓取按钮 | |||||
| gameState:false,//游戏状态 | gameState:false,//游戏状态 | ||||
| endGameData:null,//中奖数据 | |||||
| isRegister:false,//是否已注册 | |||||
| }, | }, | ||||
| /** | /** | ||||
| */ | */ | ||||
| onLoad: function (options) { | onLoad: function (options) { | ||||
| app.globalData.nowPage = 3; | app.globalData.nowPage = 3; | ||||
| if (app.globalData.openid) { | |||||
| this.getOrderInfo(); | |||||
| this.endGame(); | |||||
| } else { | |||||
| app.globalData.openidSuccessFuc = this.getOrderInfo; | |||||
| } | |||||
| }, | }, | ||||
| /** | /** | ||||
| }) | }) | ||||
| }, | }, | ||||
| openGameRule: function () {//打开游戏玩法 | openGameRule: function () {//打开游戏玩法 | ||||
| console.log(this.data.gameState); | |||||
| if(!this.data.gameState){ | if(!this.data.gameState){ | ||||
| this.setData({ | this.setData({ | ||||
| ruleShow: true | ruleShow: true | ||||
| } | } | ||||
| }, | }, | ||||
| gameStart: function () {//开始游戏按钮 | 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 () {//开始游戏 | beginGame: function () {//开始游戏 | ||||
| app.wxRequest(app.globalData.urlRoot + "dollGame/beginGame", {}, res => { | app.wxRequest(app.globalData.urlRoot + "dollGame/beginGame", {}, res => { | ||||
| }, | }, | ||||
| endGame:function(){//结束游戏 | endGame:function(){//结束游戏 | ||||
| app.wxRequest(app.globalData.urlRoot + "dollGame/endGame", { sign:this.data.gameSign}, res => { | app.wxRequest(app.globalData.urlRoot + "dollGame/endGame", { sign:this.data.gameSign}, res => { | ||||
| console.log(res); | |||||
| if(res.code=200){ | if(res.code=200){ | ||||
| this.setData({ | |||||
| endGameData: res.data | |||||
| }) | |||||
| }else{ | }else{ | ||||
| console.log(res); | console.log(res); | ||||
| } | } | ||||
| clawTop: this.data.clawScale > 1 ? 490 - (2 * (this.data.clawScale-1) * 90) : 490 + (2 * (1 - this.data.clawScale) * 90 ) | clawTop: this.data.clawScale > 1 ? 490 - (2 * (this.data.clawScale-1) * 90) : 490 + (2 * (1 - this.data.clawScale) * 90 ) | ||||
| }) | }) | ||||
| this.closeSetInt(); | 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.gameState = true; | ||||
| this.data.setInt = setInterval(()=>{ | this.data.setInt = setInterval(()=>{ | ||||
| this.data.downNum -= 1; | this.data.downNum -= 1; | ||||
| downNum: this.data.downNum | downNum: this.data.downNum | ||||
| }) | }) | ||||
| if (this.data.downNum < 1) { | if (this.data.downNum < 1) { | ||||
| this.closeSetInt(); | |||||
| // this.closeSetInt(); | |||||
| this.getClaw(); | |||||
| } | } | ||||
| },1000); | },1000); | ||||
| }, | }, | ||||
| closeSetInt: function () {//关闭倒计时 | closeSetInt: function () {//关闭倒计时 | ||||
| this.data.gameState = false; | |||||
| clearInterval(this.data.setInt); | clearInterval(this.data.setInt); | ||||
| this.setData({ | this.setData({ | ||||
| downNum: 30, | downNum: 30, | ||||
| url: '../prizes/prizes' | 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 | |||||
| }) | |||||
| } | } | ||||
| }) | }) |
| </view> | </view> | ||||
| <view class="successPop" wx:if="{{pizeTip}}"> | <view class="successPop" wx:if="{{pizeTip}}"> | ||||
| <view class="successGroup" wx:if="{{pizeTip==1}}"> | <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> | <image class="successIcon" src="{{imgUrl+'/images/successIcon.png'}}"></image> | ||||
| <view class="titleGroup"></view> | <view class="titleGroup"></view> | ||||
| <view class="successTip">幸运满格,大奖到手</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> | ||||
| <view class="successGroup" wx:if="{{pizeTip==2 || pizeTip==3}}"> | <view class="successGroup" wx:if="{{pizeTip==2 || pizeTip==3}}"> | ||||
| <image class="gameRuleClose" style="top:-31rpx;right:-29rpx;" src="{{imgUrl+'/images/gameRuleClose.png'}}"></image> | <image class="gameRuleClose" style="top:-31rpx;right:-29rpx;" src="{{imgUrl+'/images/gameRuleClose.png'}}"></image> | ||||
| <view class="titleGroup"></view> | <view class="titleGroup"></view> | ||||
| <view class="failText" style="margin-top:113rpx;">运气就差一点点</view> | <view class="failText" style="margin-top:113rpx;">运气就差一点点</view> | ||||
| <view class="failText" style="margin-top:20rpx;margin-bottom:82rpx;">重整旗鼓再来抓</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> | </view> | ||||
| </view> | </view> |
| font-weight:400; | font-weight:400; | ||||
| color:rgba(255,255,255,1); | color:rgba(255,255,255,1); | ||||
| line-height:50rpx; | line-height:50rpx; | ||||
| position: relative; | |||||
| } | } | ||||
| .prizePic{ | .prizePic{ | ||||
| width: 310rpx; | width: 310rpx; | ||||
| font-weight:400; | font-weight:400; | ||||
| color:rgba(255,255,255,1); | color:rgba(255,255,255,1); | ||||
| border-radius: 20rpx; | border-radius: 20rpx; | ||||
| } | |||||
| .shareBtn{ | |||||
| position: absolute; | |||||
| left: 0; | |||||
| top: 0; | |||||
| z-index: 2; | |||||
| opacity: 0; | |||||
| } | } |
| // 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 | |||||
| } | |||||
| }) |
| { | |||||
| "navigationBarTitleText": "东风启辰“星探计划”", | |||||
| "usingComponents": { | |||||
| "tabBar": "../component/tabBar/index" | |||||
| } | |||||
| } |
| <!--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> |
| /* 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); | |||||
| } |
| if (e.detail.errMsg == 'getPhoneNumber:ok') { | if (e.detail.errMsg == 'getPhoneNumber:ok') { | ||||
| app.getMobile(e.detail.encryptedData, e.detail.iv, res => { | app.getMobile(e.detail.encryptedData, e.detail.iv, res => { | ||||
| if (res.code == 200) { | 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 { | } else { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: res.msg, | title: res.msg, |
| <image class="userLevelIcon" src="{{imgUrl+'/images/userLevelIcon'+userData.userLevel+'.png'}}"></image> | <image class="userLevelIcon" src="{{imgUrl+'/images/userLevelIcon'+userData.userLevel+'.png'}}"></image> | ||||
| <view class="userLevelTip">您的级别为</view> | <view class="userLevelTip">您的级别为</view> | ||||
| <image class="userLevelText" src="{{imgUrl+'/images/userLevelText'+userData.userLevel+'.png'}}"></image> | <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> | ||||
| <view class="userLevel" wx:if="{{!userData.userLevel}}"> | <view class="userLevel" wx:if="{{!userData.userLevel}}"> | ||||
| <image class="userWaitIcon" src="{{imgUrl+'/images/userWaitIcon.png'}}"></image> | <image class="userWaitIcon" src="{{imgUrl+'/images/userWaitIcon.png'}}"></image> | ||||
| <view class="recordGroup" wx:for="{{recordList}}" wx:key="index"> | <view class="recordGroup" wx:for="{{recordList}}" wx:key="index"> | ||||
| <view class="recordGroupLeft"> | <view class="recordGroupLeft"> | ||||
| <view class="recordHeadGroup"> | <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> | ||||
| <view class="recordMainGroup"> | <view class="recordMainGroup"> | ||||
| <view class="rewardName">{{item.awardName}}</view> | <view class="rewardName">{{item.awardName}}</view> | ||||
| </view> | </view> | ||||
| <view class="prizeDesc" catchtouchmove="ture" style="background-color:'rgba(000,000,000,0.8)';" wx:if="{{ruleShow}}"> | <view class="prizeDesc" catchtouchmove="ture" style="background-color:'rgba(000,000,000,0.8)';" wx:if="{{ruleShow}}"> | ||||
| <view class="ruleImgGroup"> | <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> | <image bindtap="lookRule" data-value="{{false}}" class="closeDescIcon" src="{{imgUrl+'/images/closeDescIcon.png'}}"></image> | ||||
| </view> | </view> | ||||
| </view> | </view> |
| height: 37rpx; | height: 37rpx; | ||||
| } | } | ||||
| .ruleImgGroup{ | .ruleImgGroup{ | ||||
| width: 500rpx; | |||||
| height: 864rpx; | |||||
| width: 631rpx; | |||||
| height: 923rpx; | |||||
| position: relative; | position: relative; | ||||
| } | } | ||||
| .ruleImg{ | .ruleImg{ | ||||
| width: 100%; | width: 100%; | ||||
| height: 100%; | |||||
| height: 1160rpx; | |||||
| border-radius: 20rpx; | |||||
| } | } | ||||
| .prizeCustomGroup{ | .prizeCustomGroup{ | ||||
| width:453rpx; | width:453rpx; |
| * 用户点击右上角分享 | * 用户点击右上角分享 | ||||
| */ | */ | ||||
| onShareAppMessage: function () { | onShareAppMessage: function () { | ||||
| return app.sharePack(); | |||||
| }, | }, | ||||
| getCode: function (e) {//获取验证码 | getCode: function (e) {//获取验证码 | ||||
| if (!app.mobileVerify(this.data.subscribeData.mobile)) { | if (!app.mobileVerify(this.data.subscribeData.mobile)) { | ||||
| if (e.detail.errMsg == 'getPhoneNumber:ok') { | if (e.detail.errMsg == 'getPhoneNumber:ok') { | ||||
| app.getMobile(e.detail.encryptedData, e.detail.iv, res => { | app.getMobile(e.detail.encryptedData, e.detail.iv, res => { | ||||
| if (res.code == 200) { | 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 { | } else { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: res.msg, | title: res.msg, |
| }, | }, | ||||
| phonebolb:function(_phone){ | phonebolb:function(_phone){ | ||||
| app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {mobile:_phone}, res => { | app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {mobile:_phone}, res => { | ||||
| console.log(res) | |||||
| if (res.code == 200) { | if (res.code == 200) { | ||||
| if(res.data!=null){ | if(res.data!=null){ | ||||
| app.globalData.certificationState=res.data.certificationState; | app.globalData.certificationState=res.data.certificationState; |
| <image class="bg" src="{{imgUrl+'/star/bg.jpg'}}"></image> | <image class="bg" src="{{imgUrl+'/star/bg.jpg'}}"></image> | ||||
| <image class="logo1" src="{{imgUrl+'/star/logo1.png'}}"></image> | <image class="logo1" src="{{imgUrl+'/star/logo1.png'}}"></image> | ||||
| <image class="logo2" src="{{imgUrl+'/star/logo2.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"> | <view class="propagandaBox"> | ||||
| <text class="text">已有</text> | <text class="text">已有</text> | ||||
| <view class="numBox"> | <view class="numBox"> | ||||
| </view> | </view> | ||||
| <view class="mask" wx:if="{{maskShow}}"> | <view class="mask" wx:if="{{maskShow}}"> | ||||
| <view class="ruleContent"> | <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> | <image class="closeBtn" src="{{imgUrl+'/star/closebtn.png'}}" bindtap="hiddenRule"></image> | ||||
| <!-- <view class="closeBtn" style="right:-40rpx;top:-45rpx;" bindtap="hiddenRule"></view> --> | <!-- <view class="closeBtn" style="right:-40rpx;top:-45rpx;" bindtap="hiddenRule"></view> --> | ||||
| </view> | </view> |
| padding-left: 20rpx; | padding-left: 20rpx; | ||||
| box-sizing: border-box; | box-sizing: border-box; | ||||
| } | } | ||||
| .ruleBtnColor{ | |||||
| background-color: #345489; | |||||
| } | |||||
| .propagandaBox { | .propagandaBox { | ||||
| position: absolute; | position: absolute; | ||||
| width: 100%; | width: 100%; | ||||
| .mask>.ruleContent { | .mask>.ruleContent { | ||||
| position: relative; | position: relative; | ||||
| width: 562rpx; | |||||
| height: 971rpx; | |||||
| width: 631rpx; | |||||
| height: 923rpx; | |||||
| border-radius: 20rpx; | border-radius: 20rpx; | ||||
| background-color: #ffffff; | |||||
| } | } | ||||
| .mask>.ruleContent>.rule { | .mask>.ruleContent>.rule { | ||||
| position: relative; | position: relative; | ||||
| width: 100%; | width: 100%; | ||||
| height: 100%; | height: 100%; | ||||
| overflow: auto; | |||||
| } | } | ||||
| .closeBtn { | .closeBtn { | ||||
| /* .closeBtn::before { | /* .closeBtn::before { | ||||
| content: "\2716"; | content: "\2716"; | ||||
| } */ | } */ | ||||
| .ruleImg{ | |||||
| width: 631rpx; | |||||
| height: 1160rpx; | |||||
| border-radius: 20rpx; | |||||
| } |
| "pathName": "pages/receiveRegister/receiveRegister", | "pathName": "pages/receiveRegister/receiveRegister", | ||||
| "query": "" | "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": "" | |||||
| } | |||||
| ] | ] | ||||
| } | } | ||||
| } | } |