| kvurlH:0, | kvurlH:0, | ||||
| certificationInfo:false, | certificationInfo:false, | ||||
| getBuyState:null, | getBuyState:null, | ||||
| entered:false | |||||
| entered:false, | |||||
| authenticationStatus:null | |||||
| }, | }, | ||||
| // 获取openId | // 获取openId | ||||
| getOpenid: function (code) { | getOpenid: function (code) { |
| shareId:null, | shareId:null, | ||||
| isFriendShare:false,//是否朋友分享过来的 | isFriendShare:false,//是否朋友分享过来的 | ||||
| isAddress:false,//是否有地址 | isAddress:false,//是否有地址 | ||||
| isAddressShow:false,//是否显示完善个人信息弹窗 | |||||
| getReward:null, | getReward:null, | ||||
| tipWindow:0, | tipWindow:0, | ||||
| hiddenFriendFrame: false, | hiddenFriendFrame: false, | ||||
| signState:true, | signState:true, | ||||
| signData:null, | signData:null, | ||||
| totalSignDay:0, | totalSignDay:0, | ||||
| addressShow: false, | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 关闭任务窗 | * 关闭任务窗 | ||||
| * 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
| */ | */ | ||||
| onShow: function () { | onShow: function () { | ||||
| }, | }, | ||||
| /** | /** | ||||
| }, this); | }, this); | ||||
| }, | }, | ||||
| getTaskAward:function(){//领取购车券 | getTaskAward:function(){//领取购车券 | ||||
| if (!this.data.isAddress){ | |||||
| this.setData({ | |||||
| isAddressShow:true | |||||
| }) | |||||
| return; | |||||
| } | |||||
| app.wxRequest(app.globalData.urlRoot + "award/getTaskAward", { awardGiveId: this.data.picturlList[this.data.picturlCurrent]['awardGiveId']},res=>{ | app.wxRequest(app.globalData.urlRoot + "award/getTaskAward", { awardGiveId: this.data.picturlList[this.data.picturlCurrent]['awardGiveId']},res=>{ | ||||
| if(res.code==200){ | if(res.code==200){ | ||||
| this.data.picturlList[this.data.picturlCurrent]['awardState'] = -1; | this.data.picturlList[this.data.picturlCurrent]['awardState'] = -1; | ||||
| this.setData({ | this.setData({ | ||||
| getReward:res.data, | |||||
| getReward:res.data[0], | |||||
| picturlList: this.data.picturlList | picturlList: this.data.picturlList | ||||
| }) | }) | ||||
| if (res.data.needAddress != 0 && !this.data.isAddress){ | |||||
| this.setData({ | |||||
| tipWindow: 2 | |||||
| }) | |||||
| } else if (res.data.needAddress == 0){ | |||||
| // if (res.data.needAddress != 0 && !this.data.isAddress){ | |||||
| // this.setData({ | |||||
| // tipWindow: 2 | |||||
| // }) | |||||
| // } else if (res.data.needAddress == 0){ | |||||
| this.setData({ | this.setData({ | ||||
| tipWindow: 1 | tipWindow: 1 | ||||
| }) | }) | ||||
| } | |||||
| // } | |||||
| }else{ | }else{ | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: res.msg, | title: res.msg, | ||||
| this.setData({ | this.setData({ | ||||
| tipWindow:0 | tipWindow:0 | ||||
| }) | }) | ||||
| }, | |||||
| lookAddress: function () { | |||||
| this.addressControl(); | |||||
| }, | |||||
| tipWindow: function () { | |||||
| this.setData({ | |||||
| isAddressShow: false | |||||
| }) | |||||
| }, | |||||
| addressControl: function () {//跳转到地址管理 | |||||
| this.setData({ | |||||
| addressShow: !this.data.addressShow | |||||
| }) | |||||
| if (this.data.addressShow == false){ | |||||
| this.tipWindow(); | |||||
| } | |||||
| if (this.data.isAddress == false && this.data.addressShow==false) { | |||||
| this.getAddress(); | |||||
| } | |||||
| } | } | ||||
| }) | }) |
| { | { | ||||
| "navigationBarTitleText": "东风启辰“星探计划”", | "navigationBarTitleText": "东风启辰“星探计划”", | ||||
| "usingComponents": { | "usingComponents": { | ||||
| "userMsg": "/pages/userMsg/userMsg", | |||||
| "tabBar": "../component/tabBar/index" | "tabBar": "../component/tabBar/index" | ||||
| } | } | ||||
| } | } |
| <swiper-item> | <swiper-item> | ||||
| <view class="fragmentBox"> | <view class="fragmentBox"> | ||||
| <image class="fragmentComplete" src="{{item.fullPicUrl}}"></image> | <image class="fragmentComplete" src="{{item.fullPicUrl}}"></image> | ||||
| <image class="fragmentComplete1" wx:if="{{item.childIdArr[0]}}" src="{{imgUrl+'/newImages/maskIcon1.png'}}"></image> | |||||
| <image class="fragmentComplete2" wx:if="{{item.childIdArr[1]}}" src="{{imgUrl+'/newImages/maskIcon1.png'}}"></image> | |||||
| <image class="fragmentComplete3" wx:if="{{item.childIdArr[2]}}" src="{{imgUrl+'/newImages/maskIcon1.png'}}"></image> | |||||
| <image class="fragmentComplete4" wx:if="{{item.childIdArr[3]}}" src="{{imgUrl+'/newImages/maskIcon1.png'}}"></image> | |||||
| <view class="lockSty lock1"> | |||||
| <image wx:if="{{item.childIdArr[0]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon1.png'}}"></image> | |||||
| <image wx:if="{{!item.childIdArr[0]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon2.png'}}"></image> | |||||
| <image class="fragmentComplete1" wx:if="{{!item.childIdArr[0]}}" src="{{imgUrl+'/newImages/maskIcon1.png'}}"></image> | |||||
| <image class="fragmentComplete2" wx:if="{{!item.childIdArr[1]}}" src="{{imgUrl+'/newImages/maskIcon2.png'}}"></image> | |||||
| <image class="fragmentComplete3" wx:if="{{!item.childIdArr[2]}}" src="{{imgUrl+'/newImages/maskIcon3.png'}}"></image> | |||||
| <image class="fragmentComplete4" wx:if="{{!item.childIdArr[3]}}" src="{{imgUrl+'/newImages/maskIcon4.png'}}"></image> | |||||
| <view class="lockSty lock1" wx:if="{{picturlList[picturlCurrent]['awardState']==0}}"> | |||||
| <image wx:if="{{item.childIdArr[0]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon2.png'}}"></image> | |||||
| <image wx:if="{{!item.childIdArr[0]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon1.png'}}"></image> | |||||
| </view> | </view> | ||||
| <view class="lockSty lock2"> | |||||
| <image wx:if="{{item.childIdArr[1]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon1.png'}}"></image> | |||||
| <image wx:if="{{!item.childIdArr[1]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon2.png'}}"></image> | |||||
| <view class="lockSty lock2" wx:if="{{picturlList[picturlCurrent]['awardState']==0}}"> | |||||
| <image wx:if="{{item.childIdArr[1]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon2.png'}}"></image> | |||||
| <image wx:if="{{!item.childIdArr[1]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon1.png'}}"></image> | |||||
| </view> | </view> | ||||
| <view class="lockSty lock3"> | |||||
| <image wx:if="{{item.childIdArr[2]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon3.png'}}"></image> | |||||
| <image wx:if="{{!item.childIdArr[2]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon4.png'}}"></image> | |||||
| <view class="lockSty lock3" wx:if="{{picturlList[picturlCurrent]['awardState']==0}}"> | |||||
| <image wx:if="{{item.childIdArr[2]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon4.png'}}"></image> | |||||
| <image wx:if="{{!item.childIdArr[2]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon3.png'}}"></image> | |||||
| </view> | </view> | ||||
| <view class="lockSty lock4"> | |||||
| <image wx:if="{{item.childIdArr[3]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon3.png'}}"></image> | |||||
| <image wx:if="{{!item.childIdArr[3]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon4.png'}}"></image> | |||||
| <view class="lockSty lock4" wx:if="{{picturlList[picturlCurrent]['awardState']==0}}"> | |||||
| <image wx:if="{{item.childIdArr[3]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon4.png'}}"></image> | |||||
| <image wx:if="{{!item.childIdArr[3]}}" class="lockIcon" src="{{imgUrl+'/newImages/lockIcon3.png'}}"></image> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </swiper-item> | </swiper-item> | ||||
| <image class="arrowBtn" wx:if="{{picturlCurrent!=0}}" style="left:-30rpx;" src="{{imgUrl+'/star/everyday/arrowLeftBtn.png'}}" bindtap="prevPicturl"></image> | <image class="arrowBtn" wx:if="{{picturlCurrent!=0}}" style="left:-30rpx;" src="{{imgUrl+'/star/everyday/arrowLeftBtn.png'}}" bindtap="prevPicturl"></image> | ||||
| <image class="arrowBtn" wx:if="{{picturlCurrent!=picturlList.length-1}}" style="right:-30rpx;" src="{{imgUrl+'/star/everyday/arrowRightBtn.png'}}" bindtap="nextPicturl"></image> | <image class="arrowBtn" wx:if="{{picturlCurrent!=picturlList.length-1}}" style="right:-30rpx;" src="{{imgUrl+'/star/everyday/arrowRightBtn.png'}}" bindtap="nextPicturl"></image> | ||||
| </view> | </view> | ||||
| <view class="cumulativeGroup" wx:if="{{picturlList[picturlCurrent]['awardState']==0}}">您已累计登陆 {{totalSignDay}} 天</view> | |||||
| <!-- <view class="cumulativeGroup" wx:if="{{picturlList[picturlCurrent]['awardState']==0}}">您已累计登陆 {{totalSignDay}} 天</view> --> | |||||
| <view class="btnBox" style="width:483rpx;" wx:if="{{picturlList[picturlCurrent]['awardState']==0}}"> | |||||
| <view class="receive">您已累计登陆 {{totalSignDay}} 天</view> | |||||
| </view> | |||||
| <view class="btnBox" style="width:483rpx;" wx:if="{{picturlList[picturlCurrent]['awardState']==1}}"> | <view class="btnBox" style="width:483rpx;" wx:if="{{picturlList[picturlCurrent]['awardState']==1}}"> | ||||
| <view class="receive" bindtap="receive">领取购车红包</view> | <view class="receive" bindtap="receive">领取购车红包</view> | ||||
| </view> | </view> | ||||
| <image class="prizePic" src="{{getReward.awardPicUrl}}" mode="aspectFit"></image> | <image class="prizePic" src="{{getReward.awardPicUrl}}" mode="aspectFit"></image> | ||||
| <view class="prizeName">{{getReward.awardName}}</view> | <view class="prizeName">{{getReward.awardName}}</view> | ||||
| <!-- <view class="startRegister" wx:if="{{tipWindow==1}}" bindtap="receive">立即领取</view> --> | <!-- <view class="startRegister" wx:if="{{tipWindow==1}}" bindtap="receive">立即领取</view> --> | ||||
| <view class="startRegister" wx:if="{{tipWindow==2}}" bindtap="userRegister">立即领取</view> | |||||
| <!-- <view class="startRegister" wx:if="{{tipWindow==2}}" bindtap="userRegister">立即领取</view> --> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view class="successPop" wx:if="{{hiddenFriendFrame}}"> | <view class="successPop" wx:if="{{hiddenFriendFrame}}"> | ||||
| <view class="joinBtn" bindtap="hiddenFriendTip">我也要玩</view> | <view class="joinBtn" bindtap="hiddenFriendTip">我也要玩</view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view class="prizeDesc" catchtouchmove="ture" wx:if="{{isAddressShow}}"> | |||||
| <view class="mycenterTipWindowGroup"> | |||||
| <image class="mycenterTipWindow1" src="{{imgUrl+'/images/mycenterTipWindow1.png'}}"></image> | |||||
| <image bindtap="tipWindow" class="closeDescIcon" style="top:-10rpx;right:-10rpx;" src="{{imgUrl+'/images/closeDescIcon.png'}}"></image> | |||||
| <view class="mycenterTipBtnGroup"> | |||||
| <image class="mycenterTipBtn" bindtap="lookAddress" src="{{imgUrl+'/images/mycenterTipBtn1.png'}}"></image> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| <userMsg bindaddress="addressControl" wx:if="{{addressShow}}"></userMsg> | |||||
| <tabBar></tabBar> | <tabBar></tabBar> |
| border-radius: 20rpx; | border-radius: 20rpx; | ||||
| margin-top: -20rpx; | margin-top: -20rpx; | ||||
| margin-bottom: 30rpx; | margin-bottom: 30rpx; | ||||
| } | |||||
| .prizeDesc{ | |||||
| position: fixed; | |||||
| top: 0; | |||||
| left: 0; | |||||
| width: 100%; | |||||
| height: 100%; | |||||
| background-color: rgba(000, 000, 000, 0.34); | |||||
| display: flex; | |||||
| align-items: center; | |||||
| justify-content: center; | |||||
| padding-bottom: 150rpx; | |||||
| box-sizing: border-box; | |||||
| } | |||||
| .mycenterTipWindow1{ | |||||
| width: 100%; | |||||
| height: 100%; | |||||
| } | |||||
| .mycenterTipWindowGroup{ | |||||
| position: relative; | |||||
| width: 611rpx; | |||||
| height: 530rpx; | |||||
| } | |||||
| .mycenterTipBtnGroup{ | |||||
| position: absolute; | |||||
| left: 50%; | |||||
| transform: translateX(-50%); | |||||
| top: 320rpx; | |||||
| } | |||||
| .closeDescIcon{ | |||||
| position: absolute; | |||||
| top: -37rpx; | |||||
| right: -38rpx; | |||||
| width: 38rpx; | |||||
| height: 37rpx; | |||||
| } | |||||
| .mycenterTipBtn{ | |||||
| width: 346rpx; | |||||
| height: 62rpx; | |||||
| } | } |
| <image class="indexBottom" src="{{imgUrl+'/images/indexBottom2.png?v=002'}}"></image> | <image class="indexBottom" src="{{imgUrl+'/images/indexBottom2.png?v=002'}}"></image> | ||||
| <view class="lookMore" bindtap="lookMore"></view> | <view class="lookMore" bindtap="lookMore"></view> | ||||
| </view> | </view> | ||||
| <view class="indexBottom2"></view> | |||||
| <!-- <view class="indexBottom2"></view> --> | |||||
| </view> | </view> | ||||
| <!-- <view class="msgFrame" wx:if="{{!isRegister}}"> --> | <!-- <view class="msgFrame" wx:if="{{!isRegister}}"> --> | ||||
| <view class="msgFrame" wx:if="{{false}}"> | <view class="msgFrame" wx:if="{{false}}"> |
| agreement: false,//是否显示协议 | agreement: false,//是否显示协议 | ||||
| addressShow:false, | addressShow:false, | ||||
| mycenterTipWindow:0, | mycenterTipWindow:0, | ||||
| barNums:0 | |||||
| barNums:0, | |||||
| getState:true | |||||
| }, | }, | ||||
| /** | /** | ||||
| }) | }) | ||||
| return; | return; | ||||
| } | } | ||||
| if (this.data.recordList[e.currentTarget.dataset.value].awardState == 2){ | |||||
| if (this.data.recordList[e.currentTarget.dataset.value].awardState == 0){ | |||||
| this.setData({ | this.setData({ | ||||
| mycenterTipWindow:this.data.isAddress?2:1 | mycenterTipWindow:this.data.isAddress?2:1 | ||||
| }) | }) | ||||
| } | } | ||||
| }, | }, | ||||
| getMyAwardList: function () {//获取获奖记录 | getMyAwardList: function () {//获取获奖记录 | ||||
| var recordNow = this.data.recordNow; | |||||
| if (recordNow==1){ | |||||
| recordNow=3; | |||||
| } else if (recordNow == 3) { | |||||
| recordNow = 1; | |||||
| } | |||||
| app.wxRequest(app.globalData.urlRoot + "award/getMyAwardList", { awardSource: recordNow},res=>{ | |||||
| this.setData({ | |||||
| getState:true | |||||
| }) | |||||
| wx.showLoading({ | |||||
| title: '获取数据中' | |||||
| }) | |||||
| app.wxRequest(app.globalData.urlRoot + "award/getMyAwardList", { awardSource: this.data.recordNow }, res => { | |||||
| wx.hideLoading(); | |||||
| this.setData({ | |||||
| getState: false | |||||
| }) | |||||
| if(res.code == 200){ | if(res.code == 200){ | ||||
| this.setData({ | this.setData({ | ||||
| recordList:res.data | recordList:res.data |
| <view bindtap="selectRecord" data-type='3' class="taskText recordText {{recordNow==3?'taskText2':''}}">星探奖励</view> | <view bindtap="selectRecord" data-type='3' class="taskText recordText {{recordNow==3?'taskText2':''}}">星探奖励</view> | ||||
| </view> | </view> | ||||
| <view class="recordFrame"> | <view class="recordFrame"> | ||||
| <image class="newImages1" wx:if="{{!recordList.length && recordNow==1}}" src="{{imgUrl+'/newImages/1.png'}}"></image> | |||||
| <image class="newImages2" bindtap="enterLucky" wx:if="{{!recordList.length && recordNow==1}}" src="{{imgUrl+'/newImages/2.png'}}"></image> | |||||
| <image class="newImages5" wx:if="{{!recordList.length && recordNow==2}}" src="{{imgUrl+'/newImages/5.png'}}"></image> | |||||
| <image class="newImages6" bindtap="enterEvery" wx:if="{{!recordList.length && recordNow==2}}" src="{{imgUrl+'/newImages/6.png'}}"></image> | |||||
| <image class="newImages8" wx:if="{{!recordList.length && recordNow==3}}" src="{{imgUrl+'/newImages/8.png'}}"></image> | |||||
| <image class="newImages6" bindtap="starGo" wx:if="{{!recordList.length && recordNow==3}}" src="{{imgUrl+'/newImages/6.png'}}"></image> | |||||
| <image class="newImages1" wx:if="{{!recordList.length && recordNow==1 && !getState}}" src="{{imgUrl+'/newImages/1.png'}}"></image> | |||||
| <image class="newImages2" bindtap="enterLucky" wx:if="{{!recordList.length && recordNow==1 && !getState}}" src="{{imgUrl+'/newImages/2.png'}}"></image> | |||||
| <image class="newImages5" wx:if="{{!recordList.length && recordNow==2 && !getState}}" src="{{imgUrl+'/newImages/5.png'}}"></image> | |||||
| <image class="newImages6" bindtap="enterEvery" wx:if="{{!recordList.length && recordNow==2 && !getState}}" src="{{imgUrl+'/newImages/6.png'}}"></image> | |||||
| <image class="newImages8" wx:if="{{!recordList.length && recordNow==3 && !getState}}" src="{{imgUrl+'/newImages/8.png'}}"></image> | |||||
| <image class="newImages6" bindtap="starGo" wx:if="{{!recordList.length && recordNow==3 && !getState}}" src="{{imgUrl+'/newImages/6.png'}}"></image> | |||||
| <view class="recordGroup" wx:if="{{recordList.length}}" wx:for="{{recordList}}" wx:key="index"> | <view class="recordGroup" wx:if="{{recordList.length}}" wx:for="{{recordList}}" wx:key="index"> | ||||
| <view class="recordGroupLeft"> | <view class="recordGroupLeft"> | ||||
| <view class="recordHeadGroup"> | <view class="recordHeadGroup"> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view class="recordPic"> | <view class="recordPic"> | ||||
| <!-- <view class="noLock" wx:if="{{item.awardState == 0}}">未激活</view> --> | |||||
| <image class="recordTip" bindtap="lookDesc" data-value="{{index}}" src="{{imgUrl+'/images/recordTip.png'}}"></image> | <image class="recordTip" bindtap="lookDesc" data-value="{{index}}" src="{{imgUrl+'/images/recordTip.png'}}"></image> | ||||
| <image wx:if="{{item.awardId!=1 && recordNow!=3}}" class="rewardIcon" mode="aspectFit" src="{{item.awardPicurl}}"></image> | |||||
| <image wx:if="{{item.awardId!=1 && recordNow==3}}" class="luckyClaw" mode="aspectFit" src="{{item.awardPicurl}}"></image> | |||||
| <image wx:if="{{item.awardId!=1 && recordNow!=3}}" class="rewardIcon" mode="aspectFit" src="{{item.awardPicurl}}"></image> | |||||
| <image wx:if="{{item.awardId!=1 && recordNow==3}}" class="luckyClaw" mode="aspectFit" src="{{item.awardPicurl}}"></image> | |||||
| <view class="rewardCash" wx:if="{{item.awardId==1}}"> | <view class="rewardCash" wx:if="{{item.awardId==1}}"> | ||||
| <view class="cashGroup"> | <view class="cashGroup"> | ||||
| <view class="cashNum">{{item.awardMoney}}</view> | <view class="cashNum">{{item.awardMoney}}</view> |
| align-items: center; | align-items: center; | ||||
| } | } | ||||
| .rewardName{ | .rewardName{ | ||||
| font-size: 30rpx; | |||||
| font-weight: bold; | |||||
| line-height: 18rpx; | |||||
| font-size:18rpx; | |||||
| font-family:PingFangSC; | |||||
| font-weight:600; | |||||
| color:rgba(89,87,87,1); | |||||
| } | } | ||||
| .rewardTerm{ | .rewardTerm{ | ||||
| font-size: 22rpx; | |||||
| font-weight: bold; | |||||
| margin-top: 10rpx; | |||||
| line-height: 14rpx; | |||||
| font-size:14rpx; | |||||
| font-family:NissanBrand; | |||||
| font-weight:400; | |||||
| color:rgba(89,87,87,1); | |||||
| } | } | ||||
| .detachmentGroup{ | .detachmentGroup{ | ||||
| position: relative; | position: relative; | ||||
| height:159rpx; | height:159rpx; | ||||
| margin: 0 auto; | margin: 0 auto; | ||||
| margin-bottom: 21rpx; | margin-bottom: 21rpx; | ||||
| } | |||||
| .noLock{ | |||||
| width:83rpx; | |||||
| height:32rpx; | |||||
| border: 2rpx solid #5E6E89; | |||||
| box-sizing: border-box; | |||||
| line-height: 28rpx; | |||||
| font-size:18rpx; | |||||
| font-family:PingFangSC; | |||||
| font-weight:600; | |||||
| color:rgba(114,113,113,1); | |||||
| text-align: center; | |||||
| border-radius: 20rpx; | |||||
| margin-right: 14rpx; | |||||
| } | } |
| }, | }, | ||||
| filePath: res.tempFilePaths[i], | filePath: res.tempFilePaths[i], | ||||
| name: "file", | name: "file", | ||||
| formData: { | |||||
| filePath: "static" | |||||
| }, | |||||
| success: res => { | success: res => { | ||||
| if (res.data) { | if (res.data) { | ||||
| var json = JSON.parse(res.data); | var json = JSON.parse(res.data); |
| }) | }) | ||||
| } | } | ||||
| }, | }, | ||||
| getCertificationInfo: function () {//查询认证状态 | |||||
| app.wxRequest(app.globalData.urlRoot + 'userInfo/getCertificationInfo', {}, res => { | |||||
| if (res.code == 200 && res.data && res.data.agentDetail) { | |||||
| this.data.authenticationStatus = true; | |||||
| } | |||||
| }, this) | |||||
| }, | |||||
| // getCertificationInfo: function () {//查询认证状态 | |||||
| // app.wxRequest(app.globalData.urlRoot + 'userInfo/getCertificationInfo', {}, res => { | |||||
| // if (res.code == 200 && res.data && res.data.agentDetail) { | |||||
| // this.data.authenticationStatus = true; | |||||
| // } | |||||
| // }, this) | |||||
| // }, | |||||
| /** | /** | ||||
| * 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
| */ | */ | ||||
| * 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
| */ | */ | ||||
| onShow: function () { | onShow: function () { | ||||
| if (app.globalData.openid) { | |||||
| this.getCertificationInfo(); | |||||
| } else { | |||||
| app.globalData.openidSuccessFuc = this.getCertificationInfo; | |||||
| // if (app.globalData.openid) { | |||||
| // this.getCertificationInfo(); | |||||
| // } else { | |||||
| // app.globalData.openidSuccessFuc = this.getCertificationInfo; | |||||
| // } | |||||
| if (app.globalData.authenticationStatus && app.globalData.authenticationStatus.agentDetail){ | |||||
| this.data.authenticationStatus = true; | |||||
| this.setData({ | |||||
| authenticationShow:false | |||||
| }) | |||||
| } | } | ||||
| app.globalData.certificationState=2; | app.globalData.certificationState=2; | ||||
| this.setData({maskid: app.globalData.certificationState}) | this.setData({maskid: app.globalData.certificationState}) | ||||
| }) | }) | ||||
| }, | }, | ||||
| enterMsg: function () {//去补充资料 | enterMsg: function () {//去补充资料 | ||||
| console.log("去补充资料"); | |||||
| wx.navigateTo({ | |||||
| url: '/pages/supplement/supplement', | |||||
| }) | |||||
| } | } | ||||
| }) | }) |
| phonebolb:function(_phone){ | phonebolb:function(_phone){ | ||||
| app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {}, res => { | app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {}, res => { | ||||
| if (res.code == 200) { | if (res.code == 200) { | ||||
| app.globalData.authenticationStatus = res.data; | |||||
| if (!app.globalData.certificationInfo) { | if (!app.globalData.certificationInfo) { | ||||
| app.globalData.certificationInfo = true; | app.globalData.certificationInfo = true; | ||||
| wx.setStorageSync("certificationInfo", true); | wx.setStorageSync("certificationInfo", true); |
| loadFun:function(){ | loadFun:function(){ | ||||
| this.getJobList(); | this.getJobList(); | ||||
| this.getUserLocation(); | this.getUserLocation(); | ||||
| var authenticationStatus = app.globalData.authenticationStatus; | |||||
| if (authenticationStatus.realName){ | |||||
| this.setData({ | |||||
| realname: authenticationStatus.realName | |||||
| }) | |||||
| } | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
| this.setData({ | this.setData({ | ||||
| jobList:res.data | jobList:res.data | ||||
| }) | }) | ||||
| var authenticationStatus = app.globalData.authenticationStatus; | |||||
| if (authenticationStatus.jobId) { | |||||
| for(let i=0;i<res.data.length;i++){ | |||||
| if (res.data[i].jobId == authenticationStatus.jobId){ | |||||
| this.setData({ | |||||
| jobValue: i, | |||||
| jobDetail: res.data[i].jobDetail | |||||
| }) | |||||
| break; | |||||
| } | |||||
| } | |||||
| } | |||||
| } | } | ||||
| },this) | },this) | ||||
| }, | }, | ||||
| provinceValue: res.data.nearData.provinceIndex, | provinceValue: res.data.nearData.provinceIndex, | ||||
| storeValue: res.data.nearData.cityIndex | storeValue: res.data.nearData.cityIndex | ||||
| }) | }) | ||||
| var authenticationStatus = app.globalData.authenticationStatus; | |||||
| if (authenticationStatus.city) { | |||||
| for (let i = 0; i < res.data.list.length; i++) { | |||||
| if (res.data.list[i].province == authenticationStatus.city){ | |||||
| this.setData({ | |||||
| provinceValue: i, | |||||
| storeArr: this.data.provinceArr[i].children, | |||||
| storeValue: 0 | |||||
| }) | |||||
| break; | |||||
| } | |||||
| } | |||||
| } | |||||
| } else { | } else { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: res.msg, | title: res.msg, | ||||
| } | } | ||||
| app.wxRequest(app.globalData.urlRoot + "certificationInfo/submitCertificationInfoData", data,res=>{ | app.wxRequest(app.globalData.urlRoot + "certificationInfo/submitCertificationInfoData", data,res=>{ | ||||
| if (res.code == 200) { | if (res.code == 200) { | ||||
| app.globalData.authenticationStatus.realName = this.data.realname | |||||
| app.globalData.authenticationStatus.jobId = this.data.jobList[this.data.jobValue].jobId | |||||
| app.globalData.authenticationStatus.jobDetail = this.data.storeArr[this.data.storeValue]['agent_detail'] | |||||
| app.globalData.authenticationStatus.city = this.data.provinceArr[this.data.provinceValue]['province'] | |||||
| app.globalData.authenticationStatus.agentDetail = this.data.storeArr[this.data.storeValue]['agent_detail'] | |||||
| wx.navigateBack({ | wx.navigateBack({ | ||||
| delta: 1, | delta: 1, | ||||
| }) | }) |
| <view class="msgFrame"> | <view class="msgFrame"> | ||||
| <view class="inputGroup"> | <view class="inputGroup"> | ||||
| <view class="inputTitle">姓名</view> | <view class="inputTitle">姓名</view> | ||||
| <input class="inputSty" bindinput="getRealname" placeholder="请输入姓名"></input> | |||||
| <input class="inputSty" bindinput="getRealname" value="{{realname}}" placeholder="请输入姓名"></input> | |||||
| </view> | </view> | ||||
| <view class="inputGroup"> | <view class="inputGroup"> | ||||
| <view class="inputTitle">当前城市</view> | <view class="inputTitle">当前城市</view> | ||||
| </view> | </view> | ||||
| <view class="inputGroup"> | <view class="inputGroup"> | ||||
| <view class="inputTitle">职业</view> | <view class="inputTitle">职业</view> | ||||
| <picker mode='selector' range="{{jobList}}" range-key="jobDetail" bindchange="jobChange"> | |||||
| <picker mode='selector' range="{{jobList}}" range-key="jobDetail" bindchange="jobChange" value="{{jobValue}}"> | |||||
| <view class="inputSty" style="display:flex;align-items: center;justify-content: space-between;"> | <view class="inputSty" style="display:flex;align-items: center;justify-content: space-between;"> | ||||
| <view>职业:{{jobList[jobValue].jobDetail}}</view> | <view>职业:{{jobList[jobValue].jobDetail}}</view> | ||||
| <image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> | <image src="{{imgUrl+'/images/selectIcon.png'}}" class="selectIcon"></image> |