@@ -26,10 +26,10 @@ Component({ | |||
verificationCode: '获取验证码',//验证码文案 | |||
sendCode: true, | |||
appointment: true, | |||
mobile2: "", | |||
subscribeData: { | |||
realname: "",//姓名 | |||
mobile: "",//手机号 | |||
mobile2:"", | |||
captcha: "",//验证码 | |||
province: "",//省份 | |||
city:"",//市区 | |||
@@ -96,7 +96,7 @@ Component({ | |||
this.data.subscribeData.mobile = e.detail.value; | |||
}, | |||
getMobile2: function (e) {//获取用户输入的电话---无验证码 | |||
this.data.subscribeData.mobile2 = e.detail.value; | |||
this.data.mobile2 = e.detail.value; | |||
}, | |||
getCaptcha: function (e) {//获取用户输入的验证码 | |||
this.data.subscribeData.captcha = e.detail.value; | |||
@@ -132,8 +132,8 @@ Component({ | |||
}, this); | |||
}, | |||
getCode: function (e) {//获取验证码 | |||
if (!app.mobileVerify(this.data.subscribeData.mobile2)) { | |||
if (this.data.subscribeData.mobile2) { | |||
if (!app.mobileVerify(this.data.mobile2)) { | |||
if (this.data.mobile2) { | |||
wx.showToast({ | |||
title: '请输入正确的电话', | |||
icon: 'none' | |||
@@ -150,7 +150,7 @@ Component({ | |||
return; | |||
} | |||
this.data.sendCode = false; | |||
app.wxRequest(app.globalData.urlRoot + "captcha/sendCaptcha", { mobile: this.data.subscribeData.mobile2 }, res => { | |||
app.wxRequest(app.globalData.urlRoot + "captcha/sendCaptcha", { mobile: this.data.mobile2 }, res => { | |||
if (res.code == 200) { | |||
this.countDown(); | |||
wx.showToast({ | |||
@@ -223,7 +223,7 @@ Component({ | |||
}) | |||
return; | |||
} | |||
if (!this.data.subscribeData.mobile2 && this.data.mobileType==2) { | |||
if (!this.data.mobile2 && this.data.mobileType==2) { | |||
wx.showToast({ | |||
title: '请输入电话', | |||
icon: "none" | |||
@@ -256,7 +256,7 @@ Component({ | |||
this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | |||
var sourceMobile = this.data.subscribeData.mobile; | |||
if (this.data.mobileType == 2) { | |||
this.data.subscribeData.mobile = this.data.subscribeData.mobile2; | |||
this.data.subscribeData.mobile = this.data.mobile2; | |||
} | |||
this.data.subscribeData.parentOpenid = app.globalData.parentOpenid; | |||
app.wxRequest(app.globalData.urlRoot + "wxPay/preBuy", this.data.subscribeData, res => { |
@@ -28,7 +28,7 @@ | |||
<view class="inputGroup" wx:if="{{mobileType==2}}"> | |||
<view class="userTitle">电话</view> | |||
<view class="userInput"> | |||
<input style="width:100%;height:100%;" bindinput="getMobile2" type="number" maxlength='11' value="{{subscribeData.mobile2}}" placeholder="请输入您的联系电话"></input> | |||
<input style="width:100%;height:100%;" bindinput="getMobile2" type="number" maxlength='11' value="{{mobile2}}" placeholder="请输入您的联系电话"></input> | |||
</view> | |||
</view> | |||
<view class="codeGroup" wx:if="{{mobileType==2}}"> |
@@ -26,10 +26,10 @@ Component({ | |||
verificationCode: '获取验证码',//验证码文案 | |||
sendCode: true, | |||
appointment: true, | |||
mobile2:"", | |||
subscribeData: { | |||
realname: "",//姓名 | |||
mobile: "",//手机号---无验证码 | |||
mobile2: "",//手机号---有验证码 | |||
captcha: "",//验证码 | |||
province: "",//省份 | |||
city:"",//城市 | |||
@@ -61,7 +61,7 @@ Component({ | |||
this.data.subscribeData.mobile = e.detail.value; | |||
}, | |||
getMobile2: function (e) {//获取用户输入的电话---无验证码 | |||
this.data.subscribeData.mobile2 = e.detail.value; | |||
this.data.mobile2 = e.detail.value; | |||
}, | |||
getCaptcha: function (e) {//获取用户输入的验证码 | |||
this.data.subscribeData.captcha = e.detail.value; | |||
@@ -107,8 +107,8 @@ Component({ | |||
}, this); | |||
}, | |||
getCode: function (e) {//获取验证码 | |||
if (!app.mobileVerify(this.data.subscribeData.mobile2)) { | |||
if (this.data.subscribeData.mobile2) { | |||
if (!app.mobileVerify(this.data.mobile2)) { | |||
if (this.data.mobile2) { | |||
wx.showToast({ | |||
title: '请输入正确的电话', | |||
icon: 'none' | |||
@@ -125,7 +125,7 @@ Component({ | |||
return; | |||
} | |||
this.data.sendCode = false; | |||
app.wxRequest(app.globalData.urlRoot + "captcha/sendCaptcha", { mobile: this.data.subscribeData.mobile2 }, res => { | |||
app.wxRequest(app.globalData.urlRoot + "captcha/sendCaptcha", { mobile: this.data.mobile2 }, res => { | |||
if (res.code == 200) { | |||
this.countDown(); | |||
wx.showToast({ | |||
@@ -167,7 +167,7 @@ Component({ | |||
}) | |||
return; | |||
} | |||
if (!this.data.subscribeData.mobile2 && this.data.mobileType==2) { | |||
if (!this.data.mobile2 && this.data.mobileType==2) { | |||
wx.showToast({ | |||
title: '请输入电话', | |||
icon: "none" | |||
@@ -200,7 +200,7 @@ Component({ | |||
this.data.subscribeData.agentDetail = this.data.storeArr[this.data.storeValue].agent_detail; | |||
var sourceMobile = this.data.subscribeData.mobile; | |||
if(this.data.mobileType==2){ | |||
this.data.subscribeData.mobile = this.data.subscribeData.mobile2; | |||
this.data.subscribeData.mobile = this.data.mobile2; | |||
} | |||
this.data.subscribeData.parentOpenid = app.globalData.parentOpenid; | |||
app.wxRequest(app.globalData.urlRoot + "userInfo/submitOrderInfo", this.data.subscribeData, res => { |
@@ -21,7 +21,7 @@ | |||
<input class="inputCode" bindinput="getMobile" disabled="true" type="number" value="{{subscribeData.mobile}}" maxlength='11' placeholder="请输入您的联系电话"></input> | |||
</view> | |||
<view class="inputGroup" wx:if="{{mobileType==2}}"> | |||
<input class="inputCode" bindinput="getMobile2" type="number" value="{{subscribeData.mobile2}}" maxlength='11' placeholder="请输入您的联系电话"></input> | |||
<input class="inputCode" bindinput="getMobile2" type="number" value="{{mobile2}}" maxlength='11' placeholder="请输入您的联系电话"></input> | |||
</view> | |||
<view class="inputGroup" wx:if="{{mobileType==2}}"> | |||
<input class="inputCode" style="width:450rpx;" value="{{subscribeData.captcha}}" bindinput="getCaptcha" placeholder="请输入验证码"></input> |