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