@@ -25,6 +25,10 @@ App({ | |||
this.addAppEnter(); | |||
this.getBuyState(); | |||
} | |||
var isStar = wx.getStorageSync('isStar'); | |||
if (isStar) { | |||
this.globalData.isStar = isStar; | |||
} | |||
var entered = wx.getStorageSync('entered'); | |||
if (entered) { | |||
this.globalData.entered = entered; | |||
@@ -124,6 +128,7 @@ App({ | |||
}, | |||
getSecondGuessInfoV2:null,//第二轮价格竞猜结果 | |||
phonebolb:false, | |||
isStar:null,//是否为星探 | |||
}, | |||
// 获取openId | |||
getOpenid: function (code) { |
@@ -59,7 +59,10 @@ Page({ | |||
nums: 2, | |||
current: 0 | |||
} | |||
} | |||
}, | |||
showMaskNum:0,//要显示的弹窗 | |||
addressShow:false, | |||
isAddress:false,//是否有地址 | |||
}, | |||
onLoad: function (options) { | |||
if (app.globalData.isFirstLogin) { | |||
@@ -116,6 +119,7 @@ Page({ | |||
isStartAdvertisingShow: this.data.isOnce ? true : app.globalData.isFirstLogin, | |||
// isRegister: app.globalData.isRegister | |||
}) | |||
this.getFirstMsg(); | |||
}, | |||
onShow: function () { | |||
// if (app.globalData.getBuyState) { | |||
@@ -591,5 +595,41 @@ Page({ | |||
this.setData({ | |||
yuyueShow: !this.data.yuyueShow | |||
}) | |||
}, | |||
getFirstMsg(){ | |||
app.wxRequest(app.globalData.urlRoot + "msg/getFirstMsg", {}, res => { | |||
if(res.code == 200){ | |||
if(res.data.msgId){ | |||
this.getAddress(); | |||
} | |||
this.setData({ | |||
showMaskNum:res.data.msgId | |||
}) | |||
} | |||
},this) | |||
}, | |||
hiddenMask: function () { | |||
this.setData({ | |||
showMaskNum: 0 | |||
}) | |||
}, | |||
addressControl: function () {//跳转到地址管理 | |||
this.setData({ | |||
addressShow: !this.data.addressShow | |||
}) | |||
if (this.data.addressShow) { | |||
app.globalData.skipType = 'mycenter'; | |||
} | |||
}, | |||
getAddress: function () {//获取地址 | |||
app.wxRequest(app.globalData.urlRoot + "address/getAddressV2", {}, res => { | |||
if (res.code == 200) { | |||
if (res.data) { | |||
this.setData({ | |||
isAddress:true | |||
}) | |||
} | |||
} | |||
}, this) | |||
} | |||
}) |
@@ -3,6 +3,7 @@ | |||
"usingComponents": { | |||
"service": "../component/service/index", | |||
"tabBar": "../component/tabBar/index", | |||
"yuyue": "/pages/yuyue/yuyue" | |||
"yuyue": "/pages/yuyue/yuyue", | |||
"userMsg": "/pages/userMsg/userMsg" | |||
} | |||
} |
@@ -85,9 +85,18 @@ | |||
<image class="newImages2-14" bindtap="lookMore" src="{{imgUrl+'/newImages2/100.png'}}"></image> | |||
</view> | |||
</view> | |||
<view class="mask" wx:if="{{showMaskNum}}"> | |||
<view class="ruleContent" wx:if="{{showMaskNum==1}}"> | |||
<image style="width:100%;height:100%;" src="{{imgUrl+'/newImages7/24.png'}}"></image> | |||
<image class="closeBtn2" bindtap="hiddenMask" src="{{imgUrl+'/star/closebtn.png'}}"></image> | |||
<image class="receiveBtn" wx:if="{{!isAddress}}" bindtap="addressControl" src="{{imgUrl+'/newImages7/21.png'}}"></image> | |||
</view> | |||
</view> | |||
<service></service> | |||
<yuyue bindyuyue="openYuyue" wx:if="{{yuyueShow}}"></yuyue> | |||
</view> | |||
<userMsg bindaddress="addressControl" wx:if="{{addressShow}}"></userMsg> | |||
<tabBar wx:if="{{isStartAdvertising==0 || !isStartAdvertisingShow}}"></tabBar> | |||
<image wx:if="{{isStartAdvertisingShow}}" bindtap="isStartAdvertisingFun" mode="widthFix" style="opacity:{{isStartAdvertising}};" src="{{startAdvertisingUrl}}" class='imgBg' catchtouchmove="ture"></image> | |||
</view> |
@@ -434,4 +434,37 @@ view{ | |||
top: 2570rpx; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
} | |||
.mask { | |||
position: fixed; | |||
left: 0; | |||
top: 0; | |||
width: 100%; | |||
height: 100%; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
background-color: rgba(0, 0, 0, 0.5); | |||
z-index: 10; | |||
} | |||
.mask>.ruleContent { | |||
position: relative; | |||
width: 601rpx; | |||
height: 500rpx; | |||
} | |||
.closeBtn2{ | |||
position: absolute; | |||
height: 37rpx; | |||
width: 37rpx; | |||
right:-12rpx; | |||
top:-12rpx; | |||
} | |||
.receiveBtn{ | |||
position: absolute; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
top: 380rpx; | |||
width: 347rpx; | |||
height: 62rpx; | |||
} |
@@ -80,6 +80,7 @@ Page({ | |||
lookPrizeDetail:false, | |||
lookIndex:null, | |||
buyStateCouponCode:"", | |||
starInfo:null,//星探状态 | |||
testData:[ | |||
{ | |||
awardDetailPicContentHeight:0, | |||
@@ -304,6 +305,17 @@ Page({ | |||
}) | |||
} | |||
} | |||
if(!app.globalData.isStar){ | |||
this.phonebolb(); | |||
}else{ | |||
app.globalData.authenticationStatus = app.globalData.isStar; | |||
if (!app.globalData.certificationInfo) { | |||
app.globalData.certificationInfo = true; | |||
wx.setStorageSync("certificationInfo", true); | |||
} | |||
app.globalData.certificationState = app.globalData.isStar.certificationState; | |||
} | |||
}, | |||
/** | |||
* 生命周期函数--监听页面初次渲染完成 | |||
@@ -1068,5 +1080,35 @@ Page({ | |||
this.setData({ | |||
tipWindow2:!this.data.tipWindow2 | |||
}) | |||
}, | |||
enterPoster(){//荐车晋级 | |||
if(this.data.starInfo==200 || app.globalData.isStar){ | |||
wx.navigateTo({ | |||
url: '/pages/poster/poster' | |||
}) | |||
}else if(this.data.starInfo==-307){ | |||
wx.navigateTo({ | |||
url: '/pages/mobileVerification/mobileVerification' | |||
}) | |||
}else if(this.data.starInfo==-308){ | |||
wx.navigateTo({ | |||
url: '/pages/scout/register/register' | |||
}) | |||
} | |||
}, | |||
phonebolb: function (_phone) { | |||
app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {}, res => { | |||
this.data.starInfo = res.code; | |||
if (res.code == 200) { | |||
app.globalData.isStar = res.data; | |||
wx.setStorageSync('isStar', res.data); | |||
app.globalData.authenticationStatus = res.data; | |||
if (!app.globalData.certificationInfo) { | |||
app.globalData.certificationInfo = true; | |||
wx.setStorageSync("certificationInfo", true); | |||
} | |||
app.globalData.certificationState = res.data.certificationState; | |||
} | |||
}, this); | |||
} | |||
}) |
@@ -22,12 +22,15 @@ | |||
<image class="userLevelIcon" src="{{imgUrl+'/newImages2/'+(50+userData.userLevel)+'.png'}}"></image> | |||
<image class="userLevelTip" src="{{imgUrl+'/newImages2/54.png'}}"></image> | |||
<image class="userLevelText" src="{{imgUrl+'/newImages2/'+(47+userData.userLevel)+'.png'}}"></image> | |||
<image class="lookRule" bindtap="scoutRuleControl" data-value="{{true}}" src="{{imgUrl+'/newImages2/47.png'}}"></image> | |||
<!-- <image class="lookRule" bindtap="scoutRuleControl" data-value="{{true}}" src="{{imgUrl+'/newImages2/47.png'}}"></image> --> | |||
<image class="lookRule" bindtap="enterPoster" src="{{imgUrl+'/newImages7/23.png'}}"></image> | |||
<!-- <button class="btn2" style="min-height:0rpx;width:282rpx;height:57rpx;" open-type="getUserInfo" bindgetuserinfo="getUserWxMsg"></button> --> | |||
</view> | |||
<view class="userLevel" wx:if="{{!userData.userLevel}}"> | |||
<image class="userWaitIcon" src="{{imgUrl+'/newImages2/60.png'}}"></image> | |||
<view class="userWaitText">您的星探待激活</view> | |||
<image class="lookRule" bindtap="scoutRuleControl" data-value="{{true}}" src="{{imgUrl+'/newImages2/47.png'}}"></image> | |||
<!-- <image class="lookRule" src="{{imgUrl+'/newImages7/23.png'}}"></image> --> | |||
</view> | |||
</view> | |||
<view class="funList"> |
@@ -1033,4 +1033,14 @@ view{ | |||
right: -32rpx; | |||
width: 42rpx; | |||
height: 42rpx; | |||
} | |||
.btn2{ | |||
width: 100%; | |||
height: 100%; | |||
position: absolute; | |||
top:0; | |||
left: 0; | |||
margin: 0; | |||
padding: 0; | |||
opacity:0; | |||
} |
@@ -8,23 +8,21 @@ Page({ | |||
data: { | |||
imgUrl: app.globalData.urlStatic,//图片路径 | |||
maskShow: false, | |||
ruleShow: false, | |||
phonebol: false,//是否有手机号 | |||
getNumber: null,//数字跳跃 | |||
starNumber: 0,//开始人数 | |||
stopNumber: 0,//结束人数 | |||
numList: [], | |||
isbtn: true,//防重复点击 | |||
selectGroup:[false,false,false] | |||
selectGroup:[false,false,false], | |||
addressShow:false, | |||
isAddress:false,//是否有地址 | |||
starInfo:null,//星探状态 | |||
}, | |||
/** | |||
* 显示规则页 | |||
*/ | |||
showRule: function () { | |||
// this.setData({ | |||
// maskShow:true, | |||
// ruleShow:true | |||
// }) | |||
if (app.globalData.entered) { | |||
this.everyDay(); | |||
} else { | |||
@@ -33,13 +31,14 @@ Page({ | |||
}) | |||
} | |||
}, | |||
/** | |||
* 关闭规则页 | |||
*/ | |||
hiddenRule: function () { | |||
showMask:function(){ | |||
this.setData({ | |||
maskShow: true | |||
}) | |||
}, | |||
hiddenMask: function () { | |||
this.setData({ | |||
maskShow: false, | |||
ruleShow: false | |||
maskShow: false | |||
}) | |||
}, | |||
/** | |||
@@ -57,33 +56,44 @@ Page({ | |||
* 星探任务 | |||
*/ | |||
scout: function () { | |||
if (this.data.isbtn) { | |||
this.setData({ isbtn: false }) | |||
} else { | |||
return; | |||
if(this.data.starInfo==200 || app.globalData.isStar){ | |||
wx.navigateTo({ | |||
url: '/pages/scout/scout' | |||
}) | |||
}else if(this.data.starInfo==-307){ | |||
wx.navigateTo({ | |||
url: '/pages/mobileVerification/mobileVerification' | |||
}) | |||
}else if(this.data.starInfo==-308){ | |||
wx.navigateTo({ | |||
url: '/pages/scout/register/register' | |||
}) | |||
} | |||
this.phonebolb(); | |||
}, | |||
phonebolb: function (_phone) { | |||
app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {}, res => { | |||
this.data.starInfo = res.code; | |||
if (res.code == 200) { | |||
app.globalData.isStar = res.data; | |||
wx.setStorageSync('isStar', res.data); | |||
app.globalData.authenticationStatus = res.data; | |||
if (!app.globalData.certificationInfo) { | |||
app.globalData.certificationInfo = true; | |||
wx.setStorageSync("certificationInfo", true); | |||
} | |||
app.globalData.certificationState = res.data.certificationState; | |||
wx.navigateTo({ | |||
url: '/pages/scout/scout' | |||
}) | |||
// wx.navigateTo({ | |||
// url: '/pages/scout/scout' | |||
// }) | |||
} else if (res.code == -307) { | |||
wx.navigateTo({ | |||
url: '/pages/mobileVerification/mobileVerification' | |||
}) | |||
// wx.navigateTo({ | |||
// url: '/pages/mobileVerification/mobileVerification' | |||
// }) | |||
} else if (res.code == -308) { | |||
wx.navigateTo({ | |||
url: '/pages/scout/register/register' | |||
}) | |||
// wx.navigateTo({ | |||
// url: '/pages/scout/register/register' | |||
// }) | |||
} else { | |||
this.setData({ isbtn: true }) | |||
} | |||
@@ -108,6 +118,25 @@ Page({ | |||
// console.log(res) | |||
// }, this,"POST"); | |||
}, | |||
addressControl: function () {//跳转到地址管理 | |||
this.setData({ | |||
addressShow: !this.data.addressShow | |||
}) | |||
if (this.data.addressShow) { | |||
app.globalData.skipType = 'mycenter'; | |||
} | |||
}, | |||
getAddress: function () {//获取地址 | |||
app.wxRequest(app.globalData.urlRoot + "address/getAddressV2", {}, res => { | |||
if (res.code == 200) { | |||
if (res.data) { | |||
this.setData({ | |||
isAddress:true | |||
}) | |||
} | |||
} | |||
}, this) | |||
}, | |||
/** | |||
* 生命周期函数--监听页面初次渲染完成 | |||
@@ -127,11 +156,29 @@ Page({ | |||
app.addPageEnter("61D8FFCBF9D58A1DFB3F660294CE006A"); | |||
app.globalData.addPageEnterState.star = true; | |||
} | |||
if(!app.globalData.isStar){ | |||
this.phonebolb(); | |||
}else{ | |||
this.getAddress(); | |||
this.getFriendStoreAward(); | |||
app.globalData.authenticationStatus = app.globalData.isStar; | |||
if (!app.globalData.certificationInfo) { | |||
app.globalData.certificationInfo = true; | |||
wx.setStorageSync("certificationInfo", true); | |||
} | |||
app.globalData.certificationState = app.globalData.isStar.certificationState; | |||
} | |||
this.gettime(); | |||
}, | |||
getFriendStoreAward(){//是否需要显示弹窗 | |||
app.wxRequest(app.globalData.urlRoot + "userInfo/getFriendStoreAward", {}, res => { | |||
if (res.code == 200 && res.data && res.data.showState==1) { | |||
this.showMask(); | |||
} | |||
}, this); | |||
}, | |||
gettime() { | |||
app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationCount", {}, res => { | |||
console.log(res) | |||
if (res.code == 200) { | |||
if (res.data) { | |||
this.data.starNumber = res.data.total - 1000 < 0 ? 0 : res.data.total - 1000; | |||
@@ -180,7 +227,7 @@ Page({ | |||
app.getMobile(e.detail.encryptedData, e.detail.iv, res => { | |||
if (res.code == 200) { | |||
if (res.data.result == 0) { | |||
this.phonebolb(res.data.decodeData.phoneNumber); | |||
// this.phonebolb(res.data.decodeData.phoneNumber); | |||
app.globalData.userMobile = res.data.decodeData.phoneNumber; | |||
} else { | |||
this.setData({ isbtn: true }) |
@@ -1,6 +1,7 @@ | |||
{ | |||
"navigationBarTitleText": "星探计划", | |||
"usingComponents": { | |||
"tabBar": "../component/tabBar/index" | |||
"tabBar": "../component/tabBar/index", | |||
"userMsg": "/pages/userMsg/userMsg" | |||
} | |||
} |
@@ -35,12 +35,16 @@ | |||
</view> | |||
<view class="mask" wx:if="{{maskShow}}"> | |||
<view class="ruleContent"> | |||
<image class="starRuleTitle" src="{{imgUrl+'/images/starRuleTitle.png'}}"></image> | |||
<view class="rule"> | |||
<image class="newImages7-22" src="{{imgUrl+'/newImages7/22.png'}}"></image> | |||
<image class="closeBtn2" bindtap="hiddenMask" src="{{imgUrl+'/star/closebtn.png'}}"></image> | |||
<image class="receiveBtn" wx:if="{{(!isAddress && endGameData.needAddress!=0)}}" bindtap="addressControl" src="{{imgUrl+'/newImages7/21.png'}}"></image> | |||
<!-- <image class="starRuleTitle" src="{{imgUrl+'/images/starRuleTitle.png'}}"></image> --> | |||
<!-- <view class="rule"> | |||
<image class="ruleImg" src="{{imgUrl+'/images/starRule.png?v=002'}}"></image> | |||
</view> | |||
<image class="closeBtn" src="{{imgUrl+'/star/closebtn.png'}}" bindtap="hiddenRule"></image> | |||
</view> --> | |||
<!-- <image class="closeBtn" src="{{imgUrl+'/star/closebtn.png'}}" bindtap="hiddenMask"></image> --> | |||
</view> | |||
</view> | |||
</view> | |||
<userMsg bindaddress="addressControl" wx:if="{{addressShow}}"></userMsg> | |||
<tabBar></tabBar> |
@@ -129,12 +129,12 @@ view{ | |||
.mask>.ruleContent { | |||
position: relative; | |||
width: 632rpx; | |||
height: 763rpx; | |||
border-radius: 20rpx; | |||
background-color: white; | |||
width: 601rpx; | |||
height: 500rpx; | |||
/* border-radius: 20rpx; */ | |||
/* background-color: white; */ | |||
} | |||
/* | |||
.mask>.ruleContent>.rule { | |||
position: relative; | |||
width: 563rpx; | |||
@@ -143,7 +143,7 @@ view{ | |||
padding-top: 42rpx; | |||
padding-bottom: 57rpx; | |||
overflow: auto; | |||
} | |||
} */ | |||
.closeBtn { | |||
position: absolute; | |||
@@ -152,7 +152,13 @@ view{ | |||
right:-40rpx; | |||
top:-40rpx; | |||
} | |||
.closeBtn2{ | |||
position: absolute; | |||
height: 37rpx; | |||
width: 37rpx; | |||
right:-12rpx; | |||
top:-12rpx; | |||
} | |||
/* use cross as close button */ | |||
/* .closeBtn::before { | |||
@@ -221,4 +227,16 @@ view{ | |||
.selectImg3_1{ | |||
width: 750rpx; | |||
height: 568rpx; | |||
} | |||
.newImages7-22{ | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.receiveBtn{ | |||
position: absolute; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
top: 380rpx; | |||
width: 347rpx; | |||
height: 62rpx; | |||
} |
@@ -20,7 +20,10 @@ | |||
"ignore": [], | |||
"disablePlugins": [], | |||
"outputPath": "" | |||
} | |||
}, | |||
"useCompilerModule": true, | |||
"userConfirmedUseCompilerModuleSwitch": false, | |||
"compileHotReLoad": false | |||
}, | |||
"compileType": "miniprogram", | |||
"libVersion": "2.8.3", |