this.addAppEnter(); | this.addAppEnter(); | ||||
this.getBuyState(); | this.getBuyState(); | ||||
} | } | ||||
var isStar = wx.getStorageSync('isStar'); | |||||
if (isStar) { | |||||
this.globalData.isStar = isStar; | |||||
} | |||||
var entered = wx.getStorageSync('entered'); | var entered = wx.getStorageSync('entered'); | ||||
if (entered) { | if (entered) { | ||||
this.globalData.entered = entered; | this.globalData.entered = entered; | ||||
}, | }, | ||||
getSecondGuessInfoV2:null,//第二轮价格竞猜结果 | getSecondGuessInfoV2:null,//第二轮价格竞猜结果 | ||||
phonebolb:false, | phonebolb:false, | ||||
isStar:null,//是否为星探 | |||||
}, | }, | ||||
// 获取openId | // 获取openId | ||||
getOpenid: function (code) { | getOpenid: function (code) { |
nums: 2, | nums: 2, | ||||
current: 0 | current: 0 | ||||
} | } | ||||
} | |||||
}, | |||||
showMaskNum:0,//要显示的弹窗 | |||||
addressShow:false, | |||||
isAddress:false,//是否有地址 | |||||
}, | }, | ||||
onLoad: function (options) { | onLoad: function (options) { | ||||
if (app.globalData.isFirstLogin) { | if (app.globalData.isFirstLogin) { | ||||
isStartAdvertisingShow: this.data.isOnce ? true : app.globalData.isFirstLogin, | isStartAdvertisingShow: this.data.isOnce ? true : app.globalData.isFirstLogin, | ||||
// isRegister: app.globalData.isRegister | // isRegister: app.globalData.isRegister | ||||
}) | }) | ||||
this.getFirstMsg(); | |||||
}, | }, | ||||
onShow: function () { | onShow: function () { | ||||
// if (app.globalData.getBuyState) { | // if (app.globalData.getBuyState) { | ||||
this.setData({ | this.setData({ | ||||
yuyueShow: !this.data.yuyueShow | 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) | |||||
} | } | ||||
}) | }) |
"usingComponents": { | "usingComponents": { | ||||
"service": "../component/service/index", | "service": "../component/service/index", | ||||
"tabBar": "../component/tabBar/index", | "tabBar": "../component/tabBar/index", | ||||
"yuyue": "/pages/yuyue/yuyue" | |||||
"yuyue": "/pages/yuyue/yuyue", | |||||
"userMsg": "/pages/userMsg/userMsg" | |||||
} | } | ||||
} | } |
<image class="newImages2-14" bindtap="lookMore" src="{{imgUrl+'/newImages2/100.png'}}"></image> | <image class="newImages2-14" bindtap="lookMore" src="{{imgUrl+'/newImages2/100.png'}}"></image> | ||||
</view> | </view> | ||||
</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> | <service></service> | ||||
<yuyue bindyuyue="openYuyue" wx:if="{{yuyueShow}}"></yuyue> | <yuyue bindyuyue="openYuyue" wx:if="{{yuyueShow}}"></yuyue> | ||||
</view> | </view> | ||||
<userMsg bindaddress="addressControl" wx:if="{{addressShow}}"></userMsg> | |||||
<tabBar wx:if="{{isStartAdvertising==0 || !isStartAdvertisingShow}}"></tabBar> | <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> | <image wx:if="{{isStartAdvertisingShow}}" bindtap="isStartAdvertisingFun" mode="widthFix" style="opacity:{{isStartAdvertising}};" src="{{startAdvertisingUrl}}" class='imgBg' catchtouchmove="ture"></image> | ||||
</view> | </view> |
top: 2570rpx; | top: 2570rpx; | ||||
left: 50%; | left: 50%; | ||||
transform: translateX(-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; | |||||
} | } |
lookPrizeDetail:false, | lookPrizeDetail:false, | ||||
lookIndex:null, | lookIndex:null, | ||||
buyStateCouponCode:"", | buyStateCouponCode:"", | ||||
starInfo:null,//星探状态 | |||||
testData:[ | testData:[ | ||||
{ | { | ||||
awardDetailPicContentHeight:0, | awardDetailPicContentHeight:0, | ||||
}) | }) | ||||
} | } | ||||
} | } | ||||
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; | |||||
} | |||||
}, | }, | ||||
/** | /** | ||||
* 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
this.setData({ | this.setData({ | ||||
tipWindow2:!this.data.tipWindow2 | 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); | |||||
} | } | ||||
}) | }) |
<image class="userLevelIcon" src="{{imgUrl+'/newImages2/'+(50+userData.userLevel)+'.png'}}"></image> | <image class="userLevelIcon" src="{{imgUrl+'/newImages2/'+(50+userData.userLevel)+'.png'}}"></image> | ||||
<image class="userLevelTip" src="{{imgUrl+'/newImages2/54.png'}}"></image> | <image class="userLevelTip" src="{{imgUrl+'/newImages2/54.png'}}"></image> | ||||
<image class="userLevelText" src="{{imgUrl+'/newImages2/'+(47+userData.userLevel)+'.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> | ||||
<view class="userLevel" wx:if="{{!userData.userLevel}}"> | <view class="userLevel" wx:if="{{!userData.userLevel}}"> | ||||
<image class="userWaitIcon" src="{{imgUrl+'/newImages2/60.png'}}"></image> | <image class="userWaitIcon" src="{{imgUrl+'/newImages2/60.png'}}"></image> | ||||
<view class="userWaitText">您的星探待激活</view> | <view class="userWaitText">您的星探待激活</view> | ||||
<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" src="{{imgUrl+'/newImages7/23.png'}}"></image> --> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="funList"> | <view class="funList"> |
right: -32rpx; | right: -32rpx; | ||||
width: 42rpx; | width: 42rpx; | ||||
height: 42rpx; | height: 42rpx; | ||||
} | |||||
.btn2{ | |||||
width: 100%; | |||||
height: 100%; | |||||
position: absolute; | |||||
top:0; | |||||
left: 0; | |||||
margin: 0; | |||||
padding: 0; | |||||
opacity:0; | |||||
} | } |
data: { | data: { | ||||
imgUrl: app.globalData.urlStatic,//图片路径 | imgUrl: app.globalData.urlStatic,//图片路径 | ||||
maskShow: false, | maskShow: false, | ||||
ruleShow: false, | |||||
phonebol: false,//是否有手机号 | phonebol: false,//是否有手机号 | ||||
getNumber: null,//数字跳跃 | getNumber: null,//数字跳跃 | ||||
starNumber: 0,//开始人数 | starNumber: 0,//开始人数 | ||||
stopNumber: 0,//结束人数 | stopNumber: 0,//结束人数 | ||||
numList: [], | numList: [], | ||||
isbtn: true,//防重复点击 | isbtn: true,//防重复点击 | ||||
selectGroup:[false,false,false] | |||||
selectGroup:[false,false,false], | |||||
addressShow:false, | |||||
isAddress:false,//是否有地址 | |||||
starInfo:null,//星探状态 | |||||
}, | }, | ||||
/** | /** | ||||
* 显示规则页 | * 显示规则页 | ||||
*/ | */ | ||||
showRule: function () { | showRule: function () { | ||||
// this.setData({ | |||||
// maskShow:true, | |||||
// ruleShow:true | |||||
// }) | |||||
if (app.globalData.entered) { | if (app.globalData.entered) { | ||||
this.everyDay(); | this.everyDay(); | ||||
} else { | } else { | ||||
}) | }) | ||||
} | } | ||||
}, | }, | ||||
/** | |||||
* 关闭规则页 | |||||
*/ | |||||
hiddenRule: function () { | |||||
showMask:function(){ | |||||
this.setData({ | |||||
maskShow: true | |||||
}) | |||||
}, | |||||
hiddenMask: function () { | |||||
this.setData({ | this.setData({ | ||||
maskShow: false, | |||||
ruleShow: false | |||||
maskShow: false | |||||
}) | }) | ||||
}, | }, | ||||
/** | /** | ||||
* 星探任务 | * 星探任务 | ||||
*/ | */ | ||||
scout: function () { | 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) { | phonebolb: function (_phone) { | ||||
app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {}, res => { | app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {}, res => { | ||||
this.data.starInfo = res.code; | |||||
if (res.code == 200) { | if (res.code == 200) { | ||||
app.globalData.isStar = res.data; | |||||
wx.setStorageSync('isStar', res.data); | |||||
app.globalData.authenticationStatus = res.data; | 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); | ||||
} | } | ||||
app.globalData.certificationState = res.data.certificationState; | app.globalData.certificationState = res.data.certificationState; | ||||
wx.navigateTo({ | |||||
url: '/pages/scout/scout' | |||||
}) | |||||
// wx.navigateTo({ | |||||
// url: '/pages/scout/scout' | |||||
// }) | |||||
} else if (res.code == -307) { | } else if (res.code == -307) { | ||||
wx.navigateTo({ | |||||
url: '/pages/mobileVerification/mobileVerification' | |||||
}) | |||||
// wx.navigateTo({ | |||||
// url: '/pages/mobileVerification/mobileVerification' | |||||
// }) | |||||
} else if (res.code == -308) { | } else if (res.code == -308) { | ||||
wx.navigateTo({ | |||||
url: '/pages/scout/register/register' | |||||
}) | |||||
// wx.navigateTo({ | |||||
// url: '/pages/scout/register/register' | |||||
// }) | |||||
} else { | } else { | ||||
this.setData({ isbtn: true }) | this.setData({ isbtn: true }) | ||||
} | } | ||||
// console.log(res) | // console.log(res) | ||||
// }, this,"POST"); | // }, 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) | |||||
}, | |||||
/** | /** | ||||
* 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
app.addPageEnter("61D8FFCBF9D58A1DFB3F660294CE006A"); | app.addPageEnter("61D8FFCBF9D58A1DFB3F660294CE006A"); | ||||
app.globalData.addPageEnterState.star = true; | 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(); | 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() { | gettime() { | ||||
app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationCount", {}, res => { | app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationCount", {}, res => { | ||||
console.log(res) | |||||
if (res.code == 200) { | if (res.code == 200) { | ||||
if (res.data) { | if (res.data) { | ||||
this.data.starNumber = res.data.total - 1000 < 0 ? 0 : res.data.total - 1000; | this.data.starNumber = res.data.total - 1000 < 0 ? 0 : res.data.total - 1000; | ||||
app.getMobile(e.detail.encryptedData, e.detail.iv, res => { | app.getMobile(e.detail.encryptedData, e.detail.iv, res => { | ||||
if (res.code == 200) { | if (res.code == 200) { | ||||
if (res.data.result == 0) { | if (res.data.result == 0) { | ||||
this.phonebolb(res.data.decodeData.phoneNumber); | |||||
// this.phonebolb(res.data.decodeData.phoneNumber); | |||||
app.globalData.userMobile = res.data.decodeData.phoneNumber; | app.globalData.userMobile = res.data.decodeData.phoneNumber; | ||||
} else { | } else { | ||||
this.setData({ isbtn: true }) | this.setData({ isbtn: true }) |
{ | { | ||||
"navigationBarTitleText": "星探计划", | "navigationBarTitleText": "星探计划", | ||||
"usingComponents": { | "usingComponents": { | ||||
"tabBar": "../component/tabBar/index" | |||||
"tabBar": "../component/tabBar/index", | |||||
"userMsg": "/pages/userMsg/userMsg" | |||||
} | } | ||||
} | } |
</view> | </view> | ||||
<view class="mask" wx:if="{{maskShow}}"> | <view class="mask" wx:if="{{maskShow}}"> | ||||
<view class="ruleContent"> | <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> | <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> | </view> | ||||
</view> | </view> | ||||
<userMsg bindaddress="addressControl" wx:if="{{addressShow}}"></userMsg> | |||||
<tabBar></tabBar> | <tabBar></tabBar> |
.mask>.ruleContent { | .mask>.ruleContent { | ||||
position: relative; | 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 { | .mask>.ruleContent>.rule { | ||||
position: relative; | position: relative; | ||||
width: 563rpx; | width: 563rpx; | ||||
padding-top: 42rpx; | padding-top: 42rpx; | ||||
padding-bottom: 57rpx; | padding-bottom: 57rpx; | ||||
overflow: auto; | overflow: auto; | ||||
} | |||||
} */ | |||||
.closeBtn { | .closeBtn { | ||||
position: absolute; | position: absolute; | ||||
right:-40rpx; | right:-40rpx; | ||||
top:-40rpx; | top:-40rpx; | ||||
} | } | ||||
.closeBtn2{ | |||||
position: absolute; | |||||
height: 37rpx; | |||||
width: 37rpx; | |||||
right:-12rpx; | |||||
top:-12rpx; | |||||
} | |||||
/* use cross as close button */ | /* use cross as close button */ | ||||
/* .closeBtn::before { | /* .closeBtn::before { | ||||
.selectImg3_1{ | .selectImg3_1{ | ||||
width: 750rpx; | width: 750rpx; | ||||
height: 568rpx; | height: 568rpx; | ||||
} | |||||
.newImages7-22{ | |||||
width: 100%; | |||||
height: 100%; | |||||
} | |||||
.receiveBtn{ | |||||
position: absolute; | |||||
left: 50%; | |||||
transform: translateX(-50%); | |||||
top: 380rpx; | |||||
width: 347rpx; | |||||
height: 62rpx; | |||||
} | } |
"ignore": [], | "ignore": [], | ||||
"disablePlugins": [], | "disablePlugins": [], | ||||
"outputPath": "" | "outputPath": "" | ||||
} | |||||
}, | |||||
"useCompilerModule": true, | |||||
"userConfirmedUseCompilerModuleSwitch": false, | |||||
"compileHotReLoad": false | |||||
}, | }, | ||||
"compileType": "miniprogram", | "compileType": "miniprogram", | ||||
"libVersion": "2.8.3", | "libVersion": "2.8.3", |