|
@@ -3,6 +3,16 @@
|
|
|
<form @submit="formSubmit">
|
|
<form @submit="formSubmit">
|
|
|
|
|
|
|
|
<view class="module-com">
|
|
<view class="module-com">
|
|
|
|
|
+ <!-- #ifdef MP-WEIXIN -->
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" >
|
|
|
|
|
+ <div class="tui-title">填手机号</div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <button class="admin-button-com middle" :class="[fillMobile == 0 ? 'blue' : 'default']" @click="oneGet">一键获取</button>
|
|
|
|
|
+ <button class="admin-button-com middle" :class="[fillMobile == 1 ? 'blue' : 'default']" style="margin-left:30upx;" @click="manFill">自己填写</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+ <!-- #endif -->
|
|
|
|
|
+ <block v-if="fillMobile ==1">
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title required">手机号</div>
|
|
<div class="tui-title required">手机号</div>
|
|
|
<input v-model="form.mobile" type="number" placeholder-class="phcolor" @blur="checkShopFn"
|
|
<input v-model="form.mobile" type="number" placeholder-class="phcolor" @blur="checkShopFn"
|
|
@@ -14,10 +24,22 @@
|
|
|
<button v-if="hasGet == false" class="admin-button-com blue middle" @click="requestAuthCode()">获取</button>
|
|
<button v-if="hasGet == false" class="admin-button-com blue middle" @click="requestAuthCode()">获取</button>
|
|
|
<button v-else class="admin-button-com default middle" >{{count}}</button>
|
|
<button v-else class="admin-button-com default middle" >{{count}}</button>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
+ </block>
|
|
|
|
|
+ <block v-else>
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <div class="tui-title required">手机号</div>
|
|
|
|
|
+ <input v-model="form.mobile" type="number" style="width:300upx;" placeholder-class="phcolor" @blur="checkShopFn" :disabled="true"
|
|
|
|
|
+ placeholder-style="color:#CCCCCC" class="tui-input" name="mobile" placeholder="请点右边按钮获取" />
|
|
|
|
|
+ <button v-if="hasGet == false" class="admin-button-com blue middle" open-type="getPhoneNumber" @getphonenumber="getSj">点击获取</button>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+ </block>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="module-com">
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title required">姓名</div>
|
|
<div class="tui-title required">姓名</div>
|
|
|
<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>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="module-com">
|
|
<view class="module-com">
|
|
@@ -35,7 +57,7 @@
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="openAddres" >
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="openAddres" >
|
|
|
<div class="tui-title">所在城市</div>
|
|
<div class="tui-title">所在城市</div>
|
|
|
<div class="tui-input" v-if="form.province" style="width:280upx;">{{ form.province + '-' + form.city }}</div>
|
|
<div class="tui-input" v-if="form.province" style="width:280upx;">{{ form.province + '-' + form.city }}</div>
|
|
|
- <div class="tui-placeholder" v-else style="width:280upx;">请选择</div>
|
|
|
|
|
|
|
+ <div class="tui-placeholder" v-else style="width:280upx;">请选择城市</div>
|
|
|
<button class="admin-button-com blue small" @click.stop="onHere">我在昆明</button>
|
|
<button class="admin-button-com blue small" @click.stop="onHere">我在昆明</button>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
@@ -102,6 +124,7 @@ import { getShopInfo} from "@/utils/auth";
|
|
|
import { getDictionaries } from '@/api/mini'
|
|
import { getDictionaries } from '@/api/mini'
|
|
|
import { checkShop } from '@/api/shop'
|
|
import { checkShop } from '@/api/shop'
|
|
|
import { ghsInfo } from "@/api/ghs/index";
|
|
import { ghsInfo } from "@/api/ghs/index";
|
|
|
|
|
+import { getMobile } from "@/api/auth";
|
|
|
export default {
|
|
export default {
|
|
|
name: "apply-data",
|
|
name: "apply-data",
|
|
|
components: {
|
|
components: {
|
|
@@ -143,7 +166,8 @@ export default {
|
|
|
headers:{token:''},
|
|
headers:{token:''},
|
|
|
currentImgData: [],
|
|
currentImgData: [],
|
|
|
isHd:1,
|
|
isHd:1,
|
|
|
- uploadImgUrl:APIHOST+'/upload/save-file'
|
|
|
|
|
|
|
+ uploadImgUrl:APIHOST+'/upload/save-file',
|
|
|
|
|
+ fillMobile:0
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed:{
|
|
computed:{
|
|
@@ -152,6 +176,9 @@ export default {
|
|
|
onLoad () {
|
|
onLoad () {
|
|
|
const token = uni.getStorageSync('token')
|
|
const token = uni.getStorageSync('token')
|
|
|
this.headers.token = token
|
|
this.headers.token = token
|
|
|
|
|
+ // #ifdef APP-PLUS
|
|
|
|
|
+ this.fillMobile = 1
|
|
|
|
|
+ // #endif
|
|
|
},
|
|
},
|
|
|
onUnload(){
|
|
onUnload(){
|
|
|
clearInterval(this.INT)
|
|
clearInterval(this.INT)
|
|
@@ -164,6 +191,30 @@ export default {
|
|
|
this.form.province = '云南省'
|
|
this.form.province = '云南省'
|
|
|
this.form.city = '昆明市'
|
|
this.form.city = '昆明市'
|
|
|
},
|
|
},
|
|
|
|
|
+ manFill(){
|
|
|
|
|
+ this.fillMobile = 1
|
|
|
|
|
+ this.form.mobile = ''
|
|
|
|
|
+ },
|
|
|
|
|
+ oneGet(){
|
|
|
|
|
+ this.fillMobile = 0
|
|
|
|
|
+ this.form.mobile = ''
|
|
|
|
|
+ },
|
|
|
|
|
+ getSj(e){
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ let currentMiniOpenId = uni.getStorageSync('currentMiniOpenId')
|
|
|
|
|
+ if (e.detail.errMsg === "getPhoneNumber:ok") {
|
|
|
|
|
+ getMobile({ iv: e.detail.iv, encryptedData: e.detail.encryptedData,miniOpenId:currentMiniOpenId }).then(subRes => {
|
|
|
|
|
+ uni.hideLoading()
|
|
|
|
|
+ if(subRes.data.mobile && subRes.data.mobile!=''){
|
|
|
|
|
+ this.form.mobile = subRes.data.mobile
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.$msg("没获取到手机号")
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$msg("获取失败")
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
checkShopFn(val){
|
|
checkShopFn(val){
|
|
|
// #ifdef MP-WEIXIN
|
|
// #ifdef MP-WEIXIN
|
|
|
let that = this
|
|
let that = this
|
|
@@ -286,7 +337,7 @@ export default {
|
|
|
// #ifdef APP-PLUS
|
|
// #ifdef APP-PLUS
|
|
|
appRegister = 1
|
|
appRegister = 1
|
|
|
// #endif
|
|
// #endif
|
|
|
- applyRegister({hdShopAdminId:this.option.hdShopAdminId,ghsShopAdminId:this.option.ghsShopAdminId,...this.form,style:style,from:from,miniOpenId:currentMiniOpenId,appRegister:appRegister}).then(subRes => {
|
|
|
|
|
|
|
+ applyRegister({hdShopAdminId:this.option.hdShopAdminId,ghsShopAdminId:this.option.ghsShopAdminId,...this.form,style:style,from:from,miniOpenId:currentMiniOpenId,appRegister:appRegister,fillMobile:this.fillMobile}).then(subRes => {
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
|
let token = subRes.data.token || ''
|
|
let token = subRes.data.token || ''
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|