suizhijia 5 роки тому
джерело
коміт
cb4583cd92
4 змінених файлів з 76 додано та 10 видалено
  1. +4
    -0
      496_dongfengqichen/pages/scout/scout.js
  2. +47
    -0
      496_dongfengqichen/pages/star/star.js
  3. +7
    -2
      496_dongfengqichen/pages/star/star.wxml
  4. +18
    -8
      496_dongfengqichen/pages/star/star.wxss

+ 4
- 0
496_dongfengqichen/pages/scout/scout.js Переглянути файл

@@ -107,6 +107,10 @@ Page({
*/
onLoad: function (options) {
app.globalData.nowPage = 2;
var enterScout = wx.getStorageSync('enterScout');
if(!enterScout){
wx.setStorageSync('enterScout', true);
}
},

/**

+ 47
- 0
496_dongfengqichen/pages/star/star.js Переглянути файл

@@ -18,6 +18,8 @@ Page({
addressShow:false,
isAddress:false,//是否有地址
starInfo:null,//星探状态
getUserInfoBtn:false,//是否显示获取个人信息的按钮
btnType:1,
},
/**
* 显示规则页
@@ -74,6 +76,9 @@ Page({
app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfoV2", {}, res => {
this.data.starInfo = res.code;
if (res.code == 200) {
this.setData({
btnType:2
})
app.globalData.isStar = res.data;
wx.setStorageSync('isStar', res.data);
app.globalData.authenticationStatus = res.data;
@@ -158,6 +163,9 @@ Page({
if(!app.globalData.isStar){
this.phonebolb();
}else{
this.setData({
btnType:2
})
this.getAddress();
this.getFriendStoreAward();
app.globalData.authenticationStatus = app.globalData.isStar;
@@ -166,6 +174,16 @@ Page({
wx.setStorageSync("certificationInfo", true);
}
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();
},
@@ -292,5 +310,34 @@ Page({
this.setData({
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'
})
}
}
})

+ 7
- 2
496_dongfengqichen/pages/star/star.wxml Переглянути файл

@@ -10,7 +10,10 @@
<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="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>
<image class="logo1" src="{{imgUrl+'/star/logo1.png'}}"></image>
<!-- <image class="logo2" src="{{imgUrl+'/star/logo2.png'}}"></image> -->
@@ -27,7 +30,9 @@
</view>
<text class="text">人加入星探计划</text>
</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">
<image class="starBtn" bindtap="scout" src="{{imgUrl+'/btns/starBtn1.png'}}"></image>
<image class="starBtn" bindtap="everyDay" src="{{imgUrl+'/btns/starBtn2.png'}}"></image>

+ 18
- 8
496_dongfengqichen/pages/star/star.wxss Переглянути файл

@@ -175,14 +175,6 @@ view{
right: 29rpx;
top: 175rpx;
}
.starBtn{
position: absolute;
bottom: 68rpx;
left: 50%;
transform: translateX(-50%);
width: 711rpx;
height: 70rpx;
}
.starRuleTitle{
width: 632rpx;
height: 78rpx;
@@ -192,6 +184,24 @@ view{
width: 750rpx;
/* 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{
position: absolute;
left: 50%;

Завантаження…
Відмінити
Зберегти