@@ -10,11 +10,11 @@ Page({ | |||
isAgreement: true,//是否同意协议 | |||
verificationCode: '获取验证码',//验证码文案 | |||
sendCode: true, | |||
mobileText:"",//手机号 | |||
verificationText:null, | |||
getMobileBtnShow:true, | |||
agreement:false,//是否显示协议 | |||
httpState:false, | |||
mobileText: "",//手机号 | |||
verificationText: null, | |||
getMobileBtnShow: true, | |||
agreement: false,//是否显示协议 | |||
httpState: false, | |||
}, | |||
/** | |||
@@ -136,13 +136,13 @@ Page({ | |||
} | |||
}, 1000); | |||
}, | |||
getMoblie:function(e){//获取用户输入的手机号 | |||
getMoblie: function (e) {//获取用户输入的手机号 | |||
this.data.mobileText = e.detail.value | |||
}, | |||
getCodeText: function (e) {//获取用户输入的手机号 | |||
this.data.verificationText = e.detail.value | |||
}, | |||
submitMobile: function (){ | |||
submitMobile: function () { | |||
if (!app.mobileVerify(this.data.mobileText)) { | |||
if (this.data.mobileText) { | |||
wx.showToast({ | |||
@@ -171,15 +171,15 @@ Page({ | |||
}) | |||
return; | |||
} | |||
if(this.data.httpState){ | |||
if (this.data.httpState) { | |||
return; | |||
} | |||
this.data.httpState = true; | |||
app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", { mobile: this.data.mobileText, captcha: this.data.verificationText }, res => { | |||
app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", { mobile: this.data.mobileText, captcha: this.data.verificationText }, res => { | |||
this.data.httpState = false; | |||
if (res.code == 200) { | |||
wx.setStorageSync('userMobile', this.data.mobileText ); | |||
app.globalData.userMobile = this.data.mobileText ; | |||
wx.setStorageSync('userMobile', this.data.mobileText); | |||
app.globalData.userMobile = this.data.mobileText; | |||
if (res.data != null) { | |||
app.globalData.certificationState = res.data.certificationState; | |||
wx.redirectTo({ | |||
@@ -187,23 +187,20 @@ Page({ | |||
}) | |||
} else { | |||
wx.redirectTo({ | |||
url: '/pages/supplement/supplement' | |||
url: '../scout/register/register' | |||
}) | |||
// wx.redirectTo({ | |||
// url: '../scout/register/register' | |||
// }) | |||
} | |||
}else{ | |||
} else { | |||
wx.showToast({ | |||
title: res.msg, | |||
icon:'none' | |||
icon: 'none' | |||
}) | |||
} | |||
}, this); | |||
}, | |||
getPhone(e) { | |||
this.setData({ | |||
getMobileBtnShow:false | |||
getMobileBtnShow: false | |||
}) | |||
if (e.detail.errMsg == 'getPhoneNumber:ok') { | |||
app.getMobile(e.detail.encryptedData, e.detail.iv, res => { | |||
@@ -217,7 +214,7 @@ Page({ | |||
}, this) | |||
} | |||
}, | |||
agreementControl:function(){ | |||
agreementControl: function () { | |||
this.setData({ | |||
agreement: !this.data.agreement | |||
}) |
@@ -261,7 +261,12 @@ Component({ | |||
this.data.subscribeData.mobile = this.data.mobile2; | |||
} | |||
this.data.subscribeData.parentOpenid = app.globalData.parentOpenid; | |||
wx.showLoading({ | |||
title: '加载中', | |||
mask:true | |||
}) | |||
app.wxRequest(app.globalData.urlRoot + "wxPay/preBuy", this.data.subscribeData, res => { | |||
wx.hideLoading(); | |||
this.data.subscribeData.mobile = sourceMobile; | |||
if (res.code == 200) { | |||
wx.requestPayment({ |
@@ -78,7 +78,7 @@ | |||
<image class="newImages2-3" bindtap="enterMycenter" src="{{imgUrl+'/newImages2/3.png'}}"></image> | |||
</view> | |||
</view> | |||
<view class="tipFrame" wx:if="{{!tipShow}}"> | |||
<view class="tipFrame" wx:if="{{tipShow}}"> | |||
<view class="tipGroup"> | |||
<image class="closeTip" bindtap="tipShowControl" src="{{imgUrl+'/newImages4/15.png'}}"></image> | |||
<image class="tipGroupBg" src="{{imgUrl+'/newImages4/12.png'}}"></image> |
@@ -90,11 +90,11 @@ Page({ | |||
wx.showToast({icon:'none',title: '请输入您的手机号码'}) | |||
}else if (e.detail.value.code == "" || e.detail.value.code == null) { | |||
wx.showToast({icon:'none',title: '请输入您的验证码'}) | |||
}else if(this.data.photoList.length<0){ | |||
}else if(this.data.photoList.length<1){ | |||
wx.showToast({icon:'none',title: '请上传您的照片'}) | |||
}else if(!this.data.agree){ | |||
wx.showToast({icon:'none',title: '请阅读并同意协议内容'}) | |||
}else{ | |||
} else { | |||
if(this.data.isbtn){ | |||
this.setData({isbtn: false}) | |||
}else{ |
@@ -81,15 +81,15 @@ Page({ | |||
getPoster:function(){ | |||
console.log(this.data.authenticationStatus); | |||
// return; | |||
// if (this.data.authenticationStatus) { | |||
if (this.data.authenticationStatus) { | |||
wx.navigateTo({ | |||
url: '../poster/poster' | |||
}) | |||
// }else{ | |||
// this.setData({ | |||
// authenticationShow:true | |||
// }) | |||
// } | |||
}else{ | |||
this.setData({ | |||
authenticationShow:true | |||
}) | |||
} | |||
}, | |||
// getCertificationInfo: function () {//查询认证状态 | |||
// app.wxRequest(app.globalData.urlRoot + 'userInfo/getCertificationInfo', {}, res => { |
@@ -8,25 +8,25 @@ Page({ | |||
data: { | |||
imgUrl: app.globalData.urlStatic,//图片路径 | |||
maskShow: false, | |||
ruleShow:false, | |||
phonebol:false,//是否有手机号 | |||
getNumber:null,//数字跳跃 | |||
starNumber:0,//开始人数 | |||
stopNumber:0,//结束人数 | |||
numList:[], | |||
isbtn:true,//防重复点击 | |||
ruleShow: false, | |||
phonebol: false,//是否有手机号 | |||
getNumber: null,//数字跳跃 | |||
starNumber: 0,//开始人数 | |||
stopNumber: 0,//结束人数 | |||
numList: [], | |||
isbtn: true,//防重复点击 | |||
}, | |||
/** | |||
* 显示规则页 | |||
*/ | |||
showRule:function(){ | |||
showRule: function () { | |||
// this.setData({ | |||
// maskShow:true, | |||
// ruleShow:true | |||
// }) | |||
if (app.globalData.entered) { | |||
this.everyDay(); | |||
}else{ | |||
} else { | |||
wx.navigateTo({ | |||
url: '/pages/fragmentRule/fragmentRule' | |||
}) | |||
@@ -35,7 +35,7 @@ Page({ | |||
/** | |||
* 关闭规则页 | |||
*/ | |||
hiddenRule:function(){ | |||
hiddenRule: function () { | |||
this.setData({ | |||
maskShow: false, | |||
ruleShow: false | |||
@@ -44,60 +44,47 @@ Page({ | |||
/** | |||
* 每日任务 | |||
*/ | |||
everyDay:function(){ | |||
if(this.data.isbtn){ | |||
this.setData({isbtn: false}) | |||
}else{ | |||
everyDay: function () { | |||
if (this.data.isbtn) { | |||
this.setData({ isbtn: false }) | |||
} else { | |||
return; | |||
} | |||
wx.navigateTo({url:'../everyday/everyday'}) | |||
wx.navigateTo({ url: '../everyday/everyday' }) | |||
}, | |||
/** | |||
* 星探任务 | |||
*/ | |||
scout:function(){ | |||
if(this.data.isbtn){ | |||
this.setData({isbtn: false}) | |||
}else{ | |||
scout: function () { | |||
if (this.data.isbtn) { | |||
this.setData({ isbtn: false }) | |||
} else { | |||
return; | |||
} | |||
this.phonebolb(); | |||
}, | |||
phonebolb:function(_phone){ | |||
phonebolb: function (_phone) { | |||
app.wxRequest(app.globalData.urlRoot + "userInfo/getCertificationInfo", {}, res => { | |||
if (res.code == 200) { | |||
app.globalData.phonebolb = true; | |||
app.globalData.authenticationStatus = res.data; | |||
if (!app.globalData.certificationInfo) { | |||
app.globalData.certificationInfo = true; | |||
wx.setStorageSync("certificationInfo", true); | |||
} | |||
app.globalData.certificationState = res.data.certificationState; | |||
if(!res.data || !res.data.agentDetail){ | |||
wx.navigateTo({ | |||
url: '/pages/supplement/supplement' | |||
}) | |||
}else{ | |||
wx.navigateTo({ | |||
url: '/pages/scout/scout' | |||
}) | |||
} | |||
} else if (res.code == -307){ | |||
wx.navigateTo({ | |||
url: '/pages/scout/scout' | |||
}) | |||
} else if (res.code == -307) { | |||
wx.navigateTo({ | |||
url: '/pages/mobileVerification/mobileVerification' | |||
}) | |||
} else if (res.code == -308) { | |||
if(!res.data || !res.data.agentDetail){ | |||
wx.navigateTo({ | |||
url: '/pages/supplement/supplement' | |||
}) | |||
}else{ | |||
wx.navigateTo({ | |||
url: '/pages/scout/register/register' | |||
}) | |||
} | |||
}else{ | |||
this.setData({isbtn: true}) | |||
wx.navigateTo({ | |||
url: '/pages/scout/register/register' | |||
}) | |||
} else { | |||
this.setData({ isbtn: true }) | |||
} | |||
}, this); | |||
}, | |||
@@ -111,11 +98,11 @@ Page({ | |||
// }, res => { | |||
// console.log(res) | |||
// }, this); | |||
// app.wxRequest(app.globalData.urlRoot + "/admin/certificationNoCar/auditRefuse", { id:4 }, res => { | |||
// console.log(res) | |||
// }, this,"POST"); | |||
// app.wxRequest(app.globalData.urlRoot + "/admin/certificationNoCar/auditPass", { id:4 }, res => { | |||
// console.log(res) | |||
// }, this,"POST"); | |||
@@ -126,7 +113,7 @@ Page({ | |||
*/ | |||
onReady: function () { | |||
this.setData({ | |||
starNumber:0 | |||
starNumber: 0 | |||
}) | |||
if (app.globalData.openid) { | |||
this.loadFun(); | |||
@@ -134,19 +121,19 @@ Page({ | |||
app.globalData.openidSuccessFuc = this.loadFun; | |||
} | |||
}, | |||
loadFun(){ | |||
loadFun() { | |||
if (!app.globalData.addPageEnterState.star) { | |||
app.addPageEnter("61D8FFCBF9D58A1DFB3F660294CE006A"); | |||
app.globalData.addPageEnterState.star = true; | |||
} | |||
this.gettime(); | |||
}, | |||
gettime(){ | |||
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; | |||
if (res.data) { | |||
this.data.starNumber = res.data.total - 1000 < 0 ? 0 : res.data.total - 1000; | |||
this.setData({ | |||
stopNumber: res.data.total ? res.data.total : '0' | |||
}) | |||
@@ -168,28 +155,28 @@ Page({ | |||
} | |||
}, this); | |||
}, | |||
vCodeDownTime(){ | |||
vCodeDownTime() { | |||
var numb = this.data.starNumber; | |||
// numb=Math.floor(this.data.starNumber+(this.data.stopNumber-4000)/80); | |||
numb=Math.floor(this.data.starNumber+this.data.stopNumber/80); | |||
if(numb>=this.data.stopNumber){ | |||
numb=this.data.stopNumber; | |||
numb = Math.floor(this.data.starNumber + this.data.stopNumber / 80); | |||
if (numb >= this.data.stopNumber) { | |||
numb = this.data.stopNumber; | |||
clearInterval(this.getNumber); | |||
} | |||
this.setData({ | |||
starNumber: numb, | |||
numList:numb.toString().split("") | |||
numList: numb.toString().split("") | |||
}) | |||
}, | |||
getPhone (e) { | |||
getPhone(e) { | |||
console.log(e.detail) | |||
if (e.detail.errMsg=='getPhoneNumber:ok'){ | |||
if(this.data.isbtn){ | |||
this.setData({isbtn: false}) | |||
}else{ | |||
if (e.detail.errMsg == 'getPhoneNumber:ok') { | |||
if (this.data.isbtn) { | |||
this.setData({ isbtn: false }) | |||
} else { | |||
return; | |||
} | |||
app.getMobile(e.detail.encryptedData, e.detail.iv,res=>{ | |||
app.getMobile(e.detail.encryptedData, e.detail.iv, res => { | |||
if (res.code == 200) { | |||
if (res.data.result == 0) { | |||
this.phonebolb(res.data.decodeData.phoneNumber); | |||
@@ -202,7 +189,7 @@ Page({ | |||
this.setData({ isbtn: true }) | |||
wx.showToast({ title: res.msg, icon: "none" }) | |||
} | |||
},this) | |||
}, this) | |||
} | |||
}, | |||
@@ -210,12 +197,12 @@ Page({ | |||
* 生命周期函数--监听页面显示 | |||
*/ | |||
onShow: function () { | |||
if(app.globalData.userMobile==null){ | |||
this.setData({phonebol: true}) | |||
}else{ | |||
this.setData({phonebol: false}) | |||
if (app.globalData.userMobile == null) { | |||
this.setData({ phonebol: true }) | |||
} else { | |||
this.setData({ phonebol: false }) | |||
} | |||
this.setData({isbtn: true}) | |||
this.setData({ isbtn: true }) | |||
}, | |||
/** |
@@ -8,17 +8,17 @@ Page({ | |||
imgUrl: app.globalData.urlStatic,//图片路径 | |||
agreement: false, | |||
isAgreement: true,//是否同意协议 | |||
jobList:[], | |||
jobValue:0, | |||
jobList: [], | |||
jobValue: 0, | |||
provinceDataAll: null,//地区所有数据 | |||
provinceDataArr: [[""], [""]],//省市数据 | |||
provinceDataValue: [0, 0],//选中的省市下标 | |||
nowProvince: "",//选中的省市文字 | |||
storeArr: [],//专营店数据 | |||
storeValue: 0,//选中的专营店下标 | |||
realname:"", | |||
jobDetail:"", | |||
httpState:false, | |||
realname: "", | |||
jobDetail: "", | |||
httpState: false, | |||
}, | |||
/** | |||
@@ -32,11 +32,11 @@ Page({ | |||
app.globalData.openidSuccessFuc = this.loadFun; | |||
} | |||
}, | |||
loadFun:function(){ | |||
loadFun: function () { | |||
// this.getJobList(); | |||
this.getUserLocation(); | |||
var authenticationStatus = app.globalData.authenticationStatus; | |||
if (authenticationStatus && authenticationStatus.realName){ | |||
if (authenticationStatus && authenticationStatus.realName) { | |||
this.setData({ | |||
realname: authenticationStatus.realName | |||
}) | |||
@@ -100,16 +100,16 @@ Page({ | |||
agreement: !this.data.agreement | |||
}) | |||
}, | |||
getJobList:function(){ | |||
getJobList: function () { | |||
app.wxRequest(app.globalData.urlRoot + "userInfo/getJobList", {}, res => { | |||
if(res.code==200){ | |||
if (res.code == 200) { | |||
this.setData({ | |||
jobList:res.data | |||
jobList: res.data | |||
}) | |||
var authenticationStatus = app.globalData.authenticationStatus; | |||
if (authenticationStatus && authenticationStatus.jobId) { | |||
for(let i=0;i<res.data.length;i++){ | |||
if (res.data[i].jobId == authenticationStatus.jobId){ | |||
for (let i = 0; i < res.data.length; i++) { | |||
if (res.data[i].jobId == authenticationStatus.jobId) { | |||
this.setData({ | |||
jobValue: i, | |||
jobDetail: res.data[i].jobDetail | |||
@@ -119,11 +119,11 @@ Page({ | |||
} | |||
} | |||
} | |||
},this) | |||
}, this) | |||
}, | |||
jobChange:function(e){ | |||
jobChange: function (e) { | |||
this.setData({ | |||
jobValue:e.detail.value | |||
jobValue: e.detail.value | |||
}) | |||
}, | |||
getUserLocation: function (e) { | |||
@@ -138,7 +138,7 @@ Page({ | |||
}) | |||
}, | |||
getDistributorList: function (longitude, latitude) {//获取经销商列表 | |||
app.wxRequest(app.globalData.urlRoot + "agent/getAgentList", { longitude: longitude, latitude: latitude}, res => { | |||
app.wxRequest(app.globalData.urlRoot + "agent/getAgentList", { longitude: longitude, latitude: latitude }, res => { | |||
if (res.code == 200) { | |||
//整理数据 | |||
var datas = res.data; | |||
@@ -169,15 +169,15 @@ Page({ | |||
}, | |||
getRealname: function (e) {//获取用户输入的姓名 | |||
this.data.realname = e.detail.value; | |||
}, | |||
}, | |||
getJobDetail: function (e) {//获取用户输入的姓名 | |||
this.data.jobDetail = e.detail.value; | |||
}, | |||
}, | |||
submitMsg: function () { | |||
if(!this.data.realname){ | |||
if (!this.data.realname) { | |||
wx.showToast({ | |||
title: '请输入姓名', | |||
icon:'none' | |||
icon: 'none' | |||
}) | |||
return; | |||
} | |||
@@ -195,12 +195,12 @@ Page({ | |||
}) | |||
return; | |||
} | |||
if(this.data.httpState){ | |||
if (this.data.httpState) { | |||
return; | |||
} | |||
this.data.httpState = true; | |||
var data = { | |||
realName:this.data.realname, | |||
realName: this.data.realname, | |||
// jobId: this.data.jobList[this.data.jobValue].jobId, | |||
jobDetail: this.data.jobDetail, | |||
agentDetail: this.data.storeArr[this.data.storeValue]['agent_detail'], | |||
@@ -208,7 +208,7 @@ Page({ | |||
city: this.data.provinceDataArr[1][this.data.provinceDataValue[1]], | |||
province: this.data.provinceDataArr[0][this.data.provinceDataValue[0]] | |||
} | |||
app.wxRequest(app.globalData.urlRoot + "certificationInfo/submitCertificationInfoData", data,res=>{ | |||
app.wxRequest(app.globalData.urlRoot + "certificationInfo/submitCertificationInfoData", data, res => { | |||
this.data.httpState = false; | |||
if (res.code == 200) { | |||
if (!app.globalData.authenticationStatus) { | |||
@@ -221,26 +221,16 @@ Page({ | |||
// wx.navigateBack({ | |||
// delta: 1, | |||
// }) | |||
// wx.redirectTo({ | |||
// url: '../poster/poster', | |||
// }) | |||
if(app.globalData.phonebolb){ | |||
wx.redirectTo({ | |||
url: '/pages/scout/scout' | |||
}) | |||
}else{ | |||
wx.redirectTo({ | |||
url: '/pages/scout/register/register' | |||
}) | |||
} | |||
}else{ | |||
wx.redirectTo({ | |||
url: '../poster/poster', | |||
}) | |||
} else { | |||
wx.showToast({ | |||
title: res.msg, | |||
icon:'none' | |||
icon: 'none' | |||
}) | |||
} | |||
},this,"POST"); | |||
}, this, "POST"); | |||
}, | |||
provinceDataChange: function (e) { | |||
if (e.detail.column == 0) { |