|
@@ -3,46 +3,46 @@
|
|
|
<form @submit="formSubmit">
|
|
<form @submit="formSubmit">
|
|
|
<view class="apply-body">
|
|
<view class="apply-body">
|
|
|
<view class="apply-section">
|
|
<view class="apply-section">
|
|
|
- <view class="apply-section-title">手机号</view>
|
|
|
|
|
- <view class="module-com apply-card">
|
|
|
|
|
- <!-- #ifdef MP-WEIXIN -->
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
- <view class="tui-title">填手机号</view>
|
|
|
|
|
- <view class="apply-mode-btns">
|
|
|
|
|
- <view class="apply-mode-btn" :class="{ 'apply-mode-btn--active': fillMobile == 0 }" @click="oneGet">一键获取</view>
|
|
|
|
|
- <view class="apply-mode-btn" :class="{ 'apply-mode-btn--active': fillMobile == 1 }" @click="manFill">手动填写</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </tui-list-cell>
|
|
|
|
|
- <!-- #endif -->
|
|
|
|
|
- <block v-if="fillMobile == 1">
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
- <view class="tui-title required">手机号</view>
|
|
|
|
|
- <input v-model="form.mobile" type="number" placeholder-class="phcolor" @blur="checkShopFn" placeholder-style="color:#CCCCCC" class="tui-input" name="mobile" placeholder="请填写手机号" />
|
|
|
|
|
- </tui-list-cell>
|
|
|
|
|
- <tui-list-cell class="line-cell code-wrap" :hover="false">
|
|
|
|
|
- <view class="tui-title required">验证码</view>
|
|
|
|
|
- <input v-model="form.authCode" type="number" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input tui-input--code" name="authCode" placeholder="请填写验证码" />
|
|
|
|
|
- <button v-if="hasGet == false" class="apply-code-btn" @click="requestAuthCode()">获取</button>
|
|
|
|
|
- <button v-else class="apply-code-btn apply-code-btn--disabled">{{ count }}</button>
|
|
|
|
|
- </tui-list-cell>
|
|
|
|
|
- </block>
|
|
|
|
|
- <block v-else>
|
|
|
|
|
- <tui-list-cell class="line-cell code-wrap" :hover="false">
|
|
|
|
|
- <view class="tui-title required">手机号</view>
|
|
|
|
|
- <input v-model="form.mobile" type="number" placeholder-class="phcolor" :disabled="true" placeholder-style="color:#CCCCCC" class="tui-input tui-input--code" name="mobile" placeholder="请点右边按钮获取" />
|
|
|
|
|
- <button v-if="hasGet == false" class="apply-code-btn" open-type="getPhoneNumber" @getphonenumber="getSj">点击获取</button>
|
|
|
|
|
- </tui-list-cell>
|
|
|
|
|
- </block>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <view class="apply-section">
|
|
|
|
|
- <view class="apply-section-title">基本信息</view>
|
|
|
|
|
|
|
+ <view class="apply-section-title">注册人信息</view>
|
|
|
<view class="module-com apply-card">
|
|
<view class="module-com apply-card">
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title required">姓名</view>
|
|
<view class="tui-title required">姓名</view>
|
|
|
<input v-model="form.adminName" type="text" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="adminName" placeholder="请填写姓名" />
|
|
<input v-model="form.adminName" type="text" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="adminName" placeholder="请填写姓名" />
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
+ <tui-list-cell class="line-cell code-wrap mobile-wrap" :hover="false">
|
|
|
|
|
+ <view class="tui-title required">手机号</view>
|
|
|
|
|
+ <input
|
|
|
|
|
+ v-model="form.mobile"
|
|
|
|
|
+ type="number"
|
|
|
|
|
+ placeholder-class="phcolor"
|
|
|
|
|
+ @blur="checkShopFn"
|
|
|
|
|
+ placeholder-style="color:#CCCCCC"
|
|
|
|
|
+ class="tui-input tui-input--code"
|
|
|
|
|
+ :class="{ 'tui-input--filled': fillMobile == 0 }"
|
|
|
|
|
+ name="mobile"
|
|
|
|
|
+ :disabled="fillMobile == 0"
|
|
|
|
|
+ :placeholder="fillMobile == 0 ? '' : '请填写手机号'"
|
|
|
|
|
+ />
|
|
|
|
|
+ <!-- #ifdef MP-WEIXIN -->
|
|
|
|
|
+ <button
|
|
|
|
|
+ v-if="fillMobile == 1"
|
|
|
|
|
+ class="apply-code-btn apply-fill-btn"
|
|
|
|
|
+ open-type="getPhoneNumber"
|
|
|
|
|
+ @getphonenumber="getSj"
|
|
|
|
|
+ >帮我填</button>
|
|
|
|
|
+ <button
|
|
|
|
|
+ v-else
|
|
|
|
|
+ class="apply-code-btn apply-cancel-btn"
|
|
|
|
|
+ @click="cancelAutoMobile"
|
|
|
|
|
+ >取消</button>
|
|
|
|
|
+ <!-- #endif -->
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+ <tui-list-cell v-if="fillMobile == 1" class="line-cell code-wrap" :hover="false">
|
|
|
|
|
+ <view class="tui-title required">验证码</view>
|
|
|
|
|
+ <input v-model="form.authCode" type="number" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input tui-input--code" name="authCode" placeholder="请填写验证码" />
|
|
|
|
|
+ <button v-if="hasGet == false" class="apply-code-btn" @click="requestAuthCode()">获取</button>
|
|
|
|
|
+ <button v-else class="apply-code-btn apply-code-btn--disabled">{{ count }}</button>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -194,7 +194,7 @@ export default {
|
|
|
currentImgData: [],
|
|
currentImgData: [],
|
|
|
isHd:1,
|
|
isHd:1,
|
|
|
uploadImgUrl:APIHOST+'/upload/save-file',
|
|
uploadImgUrl:APIHOST+'/upload/save-file',
|
|
|
- fillMobile:0,
|
|
|
|
|
|
|
+ fillMobile: 1,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed:{
|
|
computed:{
|
|
@@ -289,12 +289,6 @@ export default {
|
|
|
if (!item) {
|
|
if (!item) {
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
- if (item.province) {
|
|
|
|
|
- this.form.province = item.province
|
|
|
|
|
- }
|
|
|
|
|
- if (item.city) {
|
|
|
|
|
- this.form.city = item.city
|
|
|
|
|
- }
|
|
|
|
|
if (item.district) {
|
|
if (item.district) {
|
|
|
this.form.dist = item.district
|
|
this.form.dist = item.district
|
|
|
}
|
|
}
|
|
@@ -368,13 +362,25 @@ export default {
|
|
|
this.form.province = '云南省'
|
|
this.form.province = '云南省'
|
|
|
this.form.city = '昆明市'
|
|
this.form.city = '昆明市'
|
|
|
},
|
|
},
|
|
|
- manFill(){
|
|
|
|
|
- this.fillMobile = 1
|
|
|
|
|
- this.form.mobile = ''
|
|
|
|
|
|
|
+ cancelAutoMobile() {
|
|
|
|
|
+ this.$util.confirmModal({
|
|
|
|
|
+ content: '取消后将清空已获取的手机号,需重新填写并验证,是否确认?',
|
|
|
|
|
+ okText: '确认取消',
|
|
|
|
|
+ cancelText: '暂不取消'
|
|
|
|
|
+ }, () => {
|
|
|
|
|
+ this.resetAutoMobile()
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
- oneGet(){
|
|
|
|
|
- this.fillMobile = 0
|
|
|
|
|
|
|
+ resetAutoMobile() {
|
|
|
|
|
+ this.fillMobile = 1
|
|
|
this.form.mobile = ''
|
|
this.form.mobile = ''
|
|
|
|
|
+ this.form.authCode = ''
|
|
|
|
|
+ if (this.INT) {
|
|
|
|
|
+ clearInterval(this.INT)
|
|
|
|
|
+ this.INT = false
|
|
|
|
|
+ }
|
|
|
|
|
+ this.hasGet = false
|
|
|
|
|
+ this.count = 120
|
|
|
},
|
|
},
|
|
|
getSj(e){
|
|
getSj(e){
|
|
|
let that = this
|
|
let that = this
|
|
@@ -384,6 +390,8 @@ export default {
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
|
if(subRes.data.mobile && subRes.data.mobile!=''){
|
|
if(subRes.data.mobile && subRes.data.mobile!=''){
|
|
|
this.form.mobile = subRes.data.mobile
|
|
this.form.mobile = subRes.data.mobile
|
|
|
|
|
+ this.fillMobile = 0
|
|
|
|
|
+ this.form.authCode = ''
|
|
|
this.checkShopFn({detail:{value:this.form.mobile}})
|
|
this.checkShopFn({detail:{value:this.form.mobile}})
|
|
|
}else{
|
|
}else{
|
|
|
this.$msg("没获取到手机号")
|
|
this.$msg("没获取到手机号")
|
|
@@ -511,6 +519,10 @@ export default {
|
|
|
},() => {
|
|
},() => {
|
|
|
this.agree = 1
|
|
this.agree = 1
|
|
|
if (!checkRes) {
|
|
if (!checkRes) {
|
|
|
|
|
+ if (this.fillMobile == 1 && !this.form.authCode) {
|
|
|
|
|
+ this.$msg('请填写验证码')
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
uni.showLoading({mask:true})
|
|
uni.showLoading({mask:true})
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
this.confirmFn()
|
|
this.confirmFn()
|
|
@@ -524,6 +536,10 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (!checkRes) {
|
|
if (!checkRes) {
|
|
|
|
|
+ if (this.fillMobile == 1 && !this.form.authCode) {
|
|
|
|
|
+ this.$msg('请填写验证码')
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
uni.showLoading({mask:true})
|
|
uni.showLoading({mask:true})
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
this.confirmFn()
|
|
this.confirmFn()
|
|
@@ -739,6 +755,23 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.mobile-wrap {
|
|
|
|
|
+ .tui-input--filled {
|
|
|
|
|
+ color: #161819;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.apply-fill-btn {
|
|
|
|
|
+ min-width: 120upx;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.apply-cancel-btn {
|
|
|
|
|
+ min-width: 120upx;
|
|
|
|
|
+ color: #6b737c;
|
|
|
|
|
+ background: #f2f7f4;
|
|
|
|
|
+ border: 1upx solid #e3ebe6;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.apply-code-btn {
|
|
.apply-code-btn {
|
|
|
flex-shrink: 0;
|
|
flex-shrink: 0;
|
|
|
min-width: 140upx;
|
|
min-width: 140upx;
|