2022-07-31 02:14:22 +00:00
|
|
|
|
<template>
|
2022-08-15 09:27:17 +00:00
|
|
|
|
<view v-if="isLoading">
|
2022-08-02 12:01:54 +00:00
|
|
|
|
<status-nav :ifReturn="true" navBarTitle="经销商申请" :marginBottom="0" :backTag="backTag"></status-nav>
|
2022-07-31 02:14:22 +00:00
|
|
|
|
<!-- 内容 -->
|
|
|
|
|
<view class="distributor border-box" :style="{'min-height':disclaimersHeight}">
|
|
|
|
|
<view class="tags font24" style="text-align: center;color: #ff0000;">请认真填写相关信息,此信息将用于分销提现使用!</view>
|
|
|
|
|
<view class="distributor-list font30">
|
|
|
|
|
<view class="distributor-item color-99 mar-s40">
|
|
|
|
|
<view class="tips">我的邀请人</view>
|
|
|
|
|
<input class="input" type="text" :value="invite_name" disabled="true">
|
|
|
|
|
</view>
|
|
|
|
|
<view class="distributor-item mar-s40">
|
|
|
|
|
<view class="tips color-99">姓名</view>
|
|
|
|
|
<input class="input" type="text" v-model="real_name" placeholder="请输入您的真实姓名" placeholder-style="color:#000000">
|
|
|
|
|
</view>
|
|
|
|
|
<view class="distributor-item mar-s40">
|
|
|
|
|
<view class="tips color-99">电话</view>
|
|
|
|
|
<input class="input" type="number" v-model="phone" placeholder="请输入您的手机号" placeholder-style="color:#000000">
|
|
|
|
|
</view>
|
|
|
|
|
<view class="distributor-item mar-s40">
|
|
|
|
|
<view class="tips color-99">开户行</view>
|
|
|
|
|
<input class="input" type="text" v-model="deposit_bank" placeholder="请填写开户行(如:中国银行)" placeholder-style="color:#000000">
|
|
|
|
|
</view>
|
|
|
|
|
<view class="distributor-item mar-s40">
|
|
|
|
|
<view class="tips color-99">银行卡号</view>
|
|
|
|
|
<input class="input" type="number" v-model="bank_account" placeholder="请填写银行卡号" placeholder-style="color:#000000">
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="distributor-btn background-white border-box" @tap="submitEv">
|
|
|
|
|
<view class="btn font36 background-orange color-48 radius30 flex">立即提交</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {mapState} from 'vuex'//引入mapState
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
disclaimersHeight: `calc(100vh - ${uni.getSystemInfoSync().statusBarHeight + 50}px)`,
|
|
|
|
|
disclaimers:'',
|
|
|
|
|
invite_code:'',
|
|
|
|
|
invite_name:'',
|
|
|
|
|
real_name:'',
|
|
|
|
|
phone:'',
|
|
|
|
|
deposit_bank:'',
|
|
|
|
|
bank_account:'',
|
|
|
|
|
flag:true,
|
2022-08-02 12:01:54 +00:00
|
|
|
|
backTag:'backindex',
|
2022-08-15 09:27:17 +00:00
|
|
|
|
isLoading: false,
|
2022-07-31 02:14:22 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad(op) {
|
2022-08-15 10:40:35 +00:00
|
|
|
|
if(op.invite_code){
|
|
|
|
|
// 缓存invite_code
|
|
|
|
|
uni.setStorageSync('inviteCode',op.invite_code);
|
|
|
|
|
this.invite_code = op.invite_code;
|
2022-08-01 09:46:21 +00:00
|
|
|
|
}
|
2022-08-15 10:40:35 +00:00
|
|
|
|
if(op.invite_name){
|
|
|
|
|
this.invite_name = decodeURIComponent(op.invite_name);
|
|
|
|
|
}
|
|
|
|
|
this.isLoading = true;
|
|
|
|
|
},
|
|
|
|
|
onShow() {
|
|
|
|
|
this.$toolAll.tools.judgeAuth();
|
2022-07-31 02:14:22 +00:00
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 提交申请
|
|
|
|
|
submitEv(){
|
|
|
|
|
if(this.checkEmpty() && this.flag){
|
|
|
|
|
let params = {
|
|
|
|
|
invite_code:this.invite_code,
|
|
|
|
|
invite_name:this.invite_name,
|
|
|
|
|
real_name:this.real_name,
|
|
|
|
|
phone:this.phone,
|
|
|
|
|
deposit_bank:this.deposit_bank,
|
|
|
|
|
bank_account:this.bank_account,
|
|
|
|
|
}
|
|
|
|
|
this.$requst.post('/api/user/distributor-apply',params).then(res=>{
|
|
|
|
|
if(res.code==0){
|
2022-08-03 08:13:19 +00:00
|
|
|
|
this.$toolAll.tools.showToast('恭喜您申请成功!');
|
2022-08-01 09:46:21 +00:00
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
uni.reLaunch({
|
|
|
|
|
url:`/pages/index/index`
|
|
|
|
|
})
|
|
|
|
|
},1500)
|
2022-07-31 02:14:22 +00:00
|
|
|
|
} else {
|
|
|
|
|
this.$toolAll.tools.showToast(res.msg);
|
|
|
|
|
}
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
this.flag = true;
|
|
|
|
|
},2000)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 验证表单
|
|
|
|
|
checkEmpty(){
|
|
|
|
|
let result = false;
|
|
|
|
|
if(!this.real_name) {
|
|
|
|
|
this.$toolAll.tools.showToast('请填写真实姓名');
|
|
|
|
|
} else if(this.$toolAll.tools.isPhone(this.phone)) {
|
|
|
|
|
this.$toolAll.tools.showToast('请正确填写手机号');
|
|
|
|
|
}if(!this.deposit_bank) {
|
|
|
|
|
this.$toolAll.tools.showToast('请填写开户行');
|
|
|
|
|
}if(!this.bank_account) {
|
|
|
|
|
this.$toolAll.tools.showToast('请填写卡号');
|
|
|
|
|
} else {
|
|
|
|
|
result = true;
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
|
|
</style>
|