*/ | */ | ||||
onLoad: function (options) { | onLoad: function (options) { | ||||
app.globalData.nowPage = 2; | app.globalData.nowPage = 2; | ||||
var enterScout = wx.getStorageSync('enterScout'); | |||||
if(!enterScout){ | |||||
wx.setStorageSync('enterScout', true); | |||||
} | |||||
}, | }, | ||||
/** | /** |
addressShow:false, | addressShow:false, | ||||
isAddress:false,//是否有地址 | isAddress:false,//是否有地址 | ||||
starInfo:null,//星探状态 | starInfo:null,//星探状态 | ||||
getUserInfoBtn:false,//是否显示获取个人信息的按钮 | |||||
btnType:1, | |||||
}, | }, | ||||
/** | /** | ||||
* 显示规则页 | * 显示规则页 | ||||
app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfoV2", {}, res => { | app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfoV2", {}, res => { | ||||
this.data.starInfo = res.code; | this.data.starInfo = res.code; | ||||
if (res.code == 200) { | if (res.code == 200) { | ||||
this.setData({ | |||||
btnType:2 | |||||
}) | |||||
app.globalData.isStar = res.data; | app.globalData.isStar = res.data; | ||||
wx.setStorageSync('isStar', res.data); | wx.setStorageSync('isStar', res.data); | ||||
app.globalData.authenticationStatus = res.data; | app.globalData.authenticationStatus = res.data; | ||||
if(!app.globalData.isStar){ | if(!app.globalData.isStar){ | ||||
this.phonebolb(); | this.phonebolb(); | ||||
}else{ | }else{ | ||||
this.setData({ | |||||
btnType:2 | |||||
}) | |||||
this.getAddress(); | this.getAddress(); | ||||
this.getFriendStoreAward(); | this.getFriendStoreAward(); | ||||
app.globalData.authenticationStatus = app.globalData.isStar; | app.globalData.authenticationStatus = app.globalData.isStar; | ||||
wx.setStorageSync("certificationInfo", true); | wx.setStorageSync("certificationInfo", true); | ||||
} | } | ||||
app.globalData.certificationState = app.globalData.isStar.certificationState; | app.globalData.certificationState = app.globalData.isStar.certificationState; | ||||
var enterScout = wx.getStorageSync('enterScout'); | |||||
app.globalData.userInfoData = {avatarUrl:"",nickName:""}; | |||||
if(app.globalData.isStar.agentDetail && enterScout){ | |||||
if(!app.globalData.userInfoData || !app.globalData.userInfoData.avatarUrl){ | |||||
this.setData({ | |||||
getUserInfoBtn:true | |||||
}) | |||||
} | |||||
} | |||||
} | } | ||||
this.gettime(); | this.gettime(); | ||||
}, | }, | ||||
this.setData({ | this.setData({ | ||||
selectGroup:this.data.selectGroup | selectGroup:this.data.selectGroup | ||||
}) | }) | ||||
}, | |||||
skipPoster(){ | |||||
var enterScout = wx.getStorageSync('enterScout'); | |||||
if(app.globalData.isStar && app.globalData.isStar.agentDetail && enterScout){ | |||||
if(app.globalData.userInfoData && app.globalData.userInfoData.avatarUrl){ | |||||
wx.navigateTo({ | |||||
url:'../poster/poster' | |||||
}) | |||||
} | |||||
}else{ | |||||
wx.navigateTo({ | |||||
url:'../scout/scout' | |||||
}) | |||||
} | |||||
}, | |||||
getUserWxMsg:function(e){//通过微信获取用户信息 | |||||
if (e.detail.errMsg == "getUserInfo:ok") { | |||||
if(app.globalData.userInfoData){ | |||||
app.globalData.userInfoData.avatarUrl = e.detail.userInfo.avatarUrl; | |||||
app.globalData.userInfoData.nickName = e.detail.userInfo.nickName; | |||||
} | |||||
this.setData({ | |||||
getUserInfoBtn:false | |||||
}) | |||||
app.submitUserMsg(e.detail.userInfo.avatarUrl, e.detail.userInfo.nickName); | |||||
wx.navigateTo({ | |||||
url:'../poster/poster' | |||||
}) | |||||
} | |||||
} | } | ||||
}) | }) |
<image class="selectImg3" wx:if="{{!selectGroup[2]}}" bindtap="cutSelect" data-type="2" src="{{imgUrl+'/newImages7/9.png'}}"></image> | <image class="selectImg3" wx:if="{{!selectGroup[2]}}" bindtap="cutSelect" data-type="2" src="{{imgUrl+'/newImages7/9.png'}}"></image> | ||||
<image class="selectImg3_1" wx:if="{{selectGroup[2]}}" bindtap="cutSelect" data-type="2" src="{{imgUrl+'/newImages7/12.png'}}"></image> | <image class="selectImg3_1" wx:if="{{selectGroup[2]}}" bindtap="cutSelect" data-type="2" src="{{imgUrl+'/newImages7/12.png'}}"></image> | ||||
<image class="selectImg4" src="{{imgUrl+'/newImages7/14.png'}}"></image> | <image class="selectImg4" src="{{imgUrl+'/newImages7/14.png'}}"></image> | ||||
<image class="starBtn" bindtap="scout" src="{{imgUrl+'/newImages2/4.png'}}"></image> | |||||
<view class="starBtn" wx:if="{{btnType==2}}" bindtap="skipPoster" style="background-color:blue;color:white;text-align:center;">跳转到海报的按钮</view> | |||||
<button bindgetuserinfo="getUserWxMsg" wx:if="{{getUserInfoBtn && btnType==2}}" style="top:auto;width:733rpx;height:70rpx;min-height:0;padding:0;margin:0;" class="getUserMsgBtn starBtn" open-type="getUserInfo" lang="zh_CN"></button> | |||||
<image class="starBtn" wx:if="{{btnType==1}}" bindtap="scout" src="{{imgUrl+'/newImages2/4.png'}}"></image> | |||||
</view> | </view> | ||||
<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> | </view> | ||||
<text class="text">人加入星探计划</text> | <text class="text">人加入星探计划</text> | ||||
</view> | </view> | ||||
<image class="newImages2-4" bindtap="scout" src="{{imgUrl+'/newImages2/4.png'}}"></image> | |||||
<view class="newImages2-4" wx:if="{{btnType==2}}" bindtap="skipPoster" style="background-color:blue;color:white;text-align:center;">跳转到海报的按钮</view> | |||||
<button bindgetuserinfo="getUserWxMsg" wx:if="{{getUserInfoBtn && btnType==2}}" style="top:auto;width:733rpx;height:70rpx;min-height:0;padding:0;margin:0;" class="getUserMsgBtn newImages2-4" open-type="getUserInfo" lang="zh_CN"></button> | |||||
<image class="newImages2-4" wx:if="{{btnType==1}}" bindtap="scout" src="{{imgUrl+'/newImages2/4.png'}}"></image> | |||||
<!-- <view class="btnBox"> | <!-- <view class="btnBox"> | ||||
<image class="starBtn" bindtap="scout" src="{{imgUrl+'/btns/starBtn1.png'}}"></image> | <image class="starBtn" bindtap="scout" src="{{imgUrl+'/btns/starBtn1.png'}}"></image> | ||||
<image class="starBtn" bindtap="everyDay" src="{{imgUrl+'/btns/starBtn2.png'}}"></image> | <image class="starBtn" bindtap="everyDay" src="{{imgUrl+'/btns/starBtn2.png'}}"></image> |
right: 29rpx; | right: 29rpx; | ||||
top: 175rpx; | top: 175rpx; | ||||
} | } | ||||
.starBtn{ | |||||
position: absolute; | |||||
bottom: 68rpx; | |||||
left: 50%; | |||||
transform: translateX(-50%); | |||||
width: 711rpx; | |||||
height: 70rpx; | |||||
} | |||||
.starRuleTitle{ | .starRuleTitle{ | ||||
width: 632rpx; | width: 632rpx; | ||||
height: 78rpx; | height: 78rpx; | ||||
width: 750rpx; | width: 750rpx; | ||||
/* height: 3756rpx; */ | /* height: 3756rpx; */ | ||||
} | } | ||||
.getUserMsgBtn{ | |||||
position: absolute; | |||||
left: 0; | |||||
top: 0; | |||||
width: 100%; | |||||
height: 100%; | |||||
opacity: 0; | |||||
margin: 0; | |||||
padding:0; | |||||
} | |||||
.starBtn{ | |||||
position: absolute; | |||||
bottom: 68rpx; | |||||
left: 50%; | |||||
transform: translateX(-50%); | |||||
width: 711rpx; | |||||
height: 70rpx; | |||||
} | |||||
.newImages2-4{ | .newImages2-4{ | ||||
position: absolute; | position: absolute; | ||||
left: 50%; | left: 50%; |