@@ -276,6 +276,7 @@ Page({ | |||
// if (!app.globalData.isRegister) { | |||
// this.getOrderInfo(); | |||
// } | |||
console.log(app.globalData.userInfoData); | |||
if (app.globalData.userInfoData) { | |||
this.data.userData.avatarUrl = app.globalData.userInfoData.avatarUrl; | |||
this.data.userData.nickName = app.globalData.userInfoData.nickName; |
@@ -305,7 +305,7 @@ Page({ | |||
if(res.code==200){ | |||
if(res.data){ | |||
if (res.data.certificationNum){ | |||
res.data.certificationNum = 9990; | |||
// res.data.certificationNum = 9990; | |||
this.data.rankNum = res.data.certificationNum.toString().split(""); | |||
// console.log(this.data.rankNum); | |||
// } |
@@ -14,7 +14,7 @@ Page({ | |||
userData:{ | |||
avatarUrl: null, | |||
nickName: null, | |||
userLevel: 0 | |||
userLevel: 1 | |||
}, | |||
isbtn:true,//防重复点击 | |||
maskid:0,//现实的弹窗 | |||
@@ -39,14 +39,15 @@ Page({ | |||
} | |||
this.data.userData.avatarUrl = e.detail.userInfo.avatarUrl; | |||
this.data.userData.nickName = e.detail.userInfo.nickName; | |||
this.data.userData.userLevel = 0; | |||
this.data.userData.userLevel = 1; | |||
this.setData({ | |||
userData: this.data.userData | |||
userData: this.data.userData, | |||
iconShow:false | |||
}) | |||
app.submitUserMsg(e.detail.userInfo.avatarUrl, e.detail.userInfo.nickName); | |||
wx.navigateTo({ | |||
url:'../poster/poster' | |||
}) | |||
// wx.navigateTo({ | |||
// url:'../poster/poster' | |||
// }) | |||
} | |||
}, | |||
getUserInfo:function(e){//获取个人信息 | |||
@@ -78,6 +79,8 @@ Page({ | |||
* 海报页 | |||
*/ | |||
getPoster:function(){ | |||
console.log(this.data.authenticationStatus); | |||
// return; | |||
if (this.data.authenticationStatus) { | |||
wx.navigateTo({ | |||
url: '../poster/poster' |
@@ -4,10 +4,12 @@ | |||
<image class="bg" src="{{imgUrl+'/newImages/scoutbg.jpg?v=004'}}"></image> | |||
<image class="reward" wx:if="{{maskid<4}}" src="{{imgUrl+'/newImages2/6.png?v=003'}}"></image> | |||
<image class="reward" wx:if="{{maskid>3}}" src="{{imgUrl+'/newImages2/7.png?v=002'}}"></image> | |||
<image class="scoutbtn1" bindtap="getPoster" src="{{imgUrl+'/newImages3/7.png'}}"></image> | |||
<view style="position:relative;"> | |||
<image class="scoutbtn1" bindtap="getPoster" src="{{imgUrl+'/newImages3/7.png'}}"></image> | |||
<button class="btn2" style="min-height:0rpx;width:100%;height:100%;" wx:if="{{iconShow}}" open-type="getUserInfo" bindgetuserinfo="getUserWxMsg"></button> | |||
</view> | |||
<!-- <image class="scoutbtn1" wx:if="{{maskid>3}}" bindtap="getPoster" src="{{imgUrl+'/newImages2/8.png'}}"></image> --> | |||
<!-- <image class="scoutbtn1" wx:if="{{maskid<4}}" bindtap="getPoster" src="{{imgUrl+'/newImages2/8.png'}}"></image> --> | |||
<button class="btn2" wx:if="{{iconShow}}" open-type="getUserInfo" bindgetuserinfo="getUserWxMsg"></button> | |||
</view> | |||
<view class="mask" wx:if="{{maskShow}}"> | |||
<view class="tipContent" wx:if="{{tipShow}}"> |
@@ -30,11 +30,13 @@ | |||
margin: 20rpx auto 40rpx auto; | |||
} | |||
.btn2{ | |||
text-align: center; | |||
width: 654rpx; | |||
height: 58rpx; | |||
background-color: #2a558d; | |||
margin: -110rpx auto 35rpx auto; | |||
width: 100%; | |||
height: 100%; | |||
position: absolute; | |||
top:0; | |||
left: 0; | |||
margin: 0; | |||
padding: 0; | |||
opacity:0; | |||
} | |||
.mask { |
@@ -38,7 +38,8 @@ Component({ | |||
parentOpenid: app.globalData.parentOpenid,//好友openid | |||
scene: app.globalData.sceneSource | |||
}, | |||
mobileType:2 | |||
mobileType:2, | |||
userData:null | |||
}, | |||
ready:function(){ | |||
if (app.globalData.openid) { | |||
@@ -74,6 +75,11 @@ Component({ | |||
subscribeData: this.data.subscribeData | |||
}) | |||
} | |||
if (app.globalData.userInfoData) { | |||
this.setData({ | |||
userData: app.globalData.userInfoData | |||
}) | |||
} | |||
this.getUserLocation();//获取用户当前位置 | |||
}, | |||
getDistributorList: function (longitude, latitude) {//获取经销商列表 | |||
@@ -331,6 +337,17 @@ Component({ | |||
this.setData({ | |||
mobileType: this.data.mobileType==1?2:1 | |||
}) | |||
}, | |||
getUserWxMsg:function(e){//通过微信获取用户信息 | |||
if (e.detail.errMsg == "getUserInfo:ok") { | |||
this.data.userData = {}; | |||
this.data.userData.avatarUrl = e.detail.userInfo.avatarUrl; | |||
this.data.userData.nickName = e.detail.userInfo.nickName; | |||
this.setData({ | |||
userData: this.data.userData | |||
}) | |||
app.submitUserMsg(e.detail.userInfo.avatarUrl, e.detail.userInfo.nickName); | |||
} | |||
} | |||
} | |||
}) |
@@ -50,9 +50,9 @@ | |||
</view> | |||
</view> | |||
</view> | |||
<view class="subscribeBtn" bindtap="subscribeFun" style="margin-top:34rpx;"> | |||
<image style="width:100%;height:100%;" src="{{imgUrl+'/newImages3/21.png'}}"></image> | |||
<button wx:if="{{userData}}" class="getUserMsgBtn" open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="getUserWxMsg" style="width:100%;height:100%;min-height:0;padding:0;margin:0;"></button> | |||
<view class="subscribeBtn" style="margin-top:34rpx;"> | |||
<image style="width:100%;height:100%;" bindtap="subscribeFun" src="{{imgUrl+'/newImages3/21.png'}}"></image> | |||
<button wx:if="{{!userData}}" class="getUserMsgBtn" open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="getUserWxMsg" style="width:100%;height:100%;min-height:0;padding:0;margin:0;"></button> | |||
</view> | |||
<view class="subscribeBtn" bindtap="lookMore"> | |||
<image style="width:100%;height:100%;" src="{{imgUrl+'/newImages3/22.png'}}"></image> |