邓洁 : 招募合伙接口
This commit is contained in:
@@ -1,90 +1,189 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-form>
|
||||
<view class="name">
|
||||
<text class="text">名称</text>
|
||||
<u-input v-model="form.name" placeholder="请输入姓名" placeholder-class="input-class" border="bottom" color="#A0A0A0"></u-input>
|
||||
</view>
|
||||
<view class="id">
|
||||
<text class="text">身份证号</text>
|
||||
<u-input v-model="form.idcode" placeholder="请输入身份证号码" placeholder-class="input-class" border="bottom" color="#A0A0A0"></u-input>
|
||||
</view>
|
||||
|
||||
<view class="payment" @click="show = true">
|
||||
<view class="left-payment">
|
||||
<text class="text">支付信息</text>
|
||||
<text class="label">请选择支付方式</text>
|
||||
</view>
|
||||
<u-icon name="arrow-right" size="30px" top="10rpx"></u-icon>
|
||||
</view>
|
||||
<u-divider></u-divider>
|
||||
<u-picker mode="region" :show="show" :closeOnClickOverlay="true" @close="show = false" :columns="columns" @confirm="confirmCheckWay"></u-picker>
|
||||
|
||||
</u-form>
|
||||
<view class="submit-btn">
|
||||
<u-button @click="submit" color="linear-gradient(to right, #E86262, #CC3333)" :size="normal" shape="circle" class="submit-btn">提交审核</u-button>
|
||||
<view v-if="member!=2">
|
||||
<view class="name">
|
||||
<text class="text">名称</text>
|
||||
<u-input v-model="submitForm.real_name" placeholder="请输入姓名" placeholder-class="input-class" border="bottom"
|
||||
color="#A0A0A0" :disabled="disabled" disabledColor="#ffffff"></u-input>
|
||||
</view>
|
||||
<view class="id">
|
||||
<text class="text">身份证号</text>
|
||||
<u-input v-model="submitForm.idcard" placeholder="请输入身份证号码" placeholder-class="input-class" border="bottom"
|
||||
color="#A0A0A0" :disabled="disabled" disabledColor="#ffffff"></u-input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="member==2" class="hhr">
|
||||
<image src="../../static/my/hz_bj.png" mode="aspectFit" style="width: 247rpx;height: 189rpx;"></image>
|
||||
<view class="hhr-text">已是合伙人</view>
|
||||
</view>
|
||||
<view class="submit-btn">
|
||||
<button v-if="member==2" open-type="contact" session-from="sessionFrom" class="service-btn">
|
||||
联系客服
|
||||
</button>
|
||||
<u-button v-else @click="submit" :color="color" :size="normal" shape="circle" class="submit-btn"
|
||||
:disabled="btnDisabled">{{btnText}}</u-button>
|
||||
</view>
|
||||
<u-modal :show="show" closeOnClickOverlay="false" confirmText="确定" @confirm="confirm">
|
||||
<rich-text :nodes="content"></rich-text>
|
||||
</u-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import form from 'uview-ui/libs/config/props/form';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
color: '#CC3333',
|
||||
btnText: '提交审核',
|
||||
member: '',
|
||||
show: false,
|
||||
submitForm:{
|
||||
name:'',
|
||||
idcode:''
|
||||
disabled: false,
|
||||
btnDisabled: false,
|
||||
content: `申请已提交, 请等待后台审核`,
|
||||
submitForm: {
|
||||
real_name: '',
|
||||
idcard: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getInfo()
|
||||
},
|
||||
methods: {
|
||||
submit(){
|
||||
console.log('提交',form);
|
||||
|
||||
//this.$u.api.submit( this.form )
|
||||
uni.$u.toast('提交成功')
|
||||
|
||||
getInfo() {
|
||||
this.$api.getUser().then(res => {
|
||||
var data = res.data.data
|
||||
if (data) {
|
||||
this.member = data.member
|
||||
if (data.member == 1) {
|
||||
this.disabled = true
|
||||
this.btnDisabled = true
|
||||
this.color = "#C6C6C6"
|
||||
this.btnText = "审核中…"
|
||||
}
|
||||
// else if (data.member == 2) {
|
||||
// this.disabled = false
|
||||
// this.btnDisabled = false
|
||||
// this.color = "#CC3333"
|
||||
// this.btnText = "联系客服"
|
||||
// }
|
||||
}
|
||||
})
|
||||
},
|
||||
confirmCheckWay(e){
|
||||
|
||||
confirm() {
|
||||
uni.reLaunch({
|
||||
url: '/pages/my/my'
|
||||
})
|
||||
// if (this.needAsk == 1) {
|
||||
// uni.reLaunch({
|
||||
// url: '/pages/index/index'
|
||||
// })
|
||||
// }
|
||||
},
|
||||
submit() {
|
||||
if (this.member == 0) {
|
||||
let reg =
|
||||
/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; //正则表达式定义身份证号正确格式
|
||||
if (!reg.test(this.submitForm.idcard)) { //判断身份证号格式时候正确
|
||||
this.$toast.warn('请输入正确的身份证号格式')
|
||||
return false
|
||||
}
|
||||
if (this.submitForm.real_name == "") {
|
||||
this.$toast.warn('请完善数据')
|
||||
return false
|
||||
}
|
||||
if (this.submitForm.real_name && this.submitForm.idcard) {
|
||||
let data = {
|
||||
...this.submitForm,
|
||||
uid: uni.getStorageSync('uid')
|
||||
}
|
||||
console.log('成', data);
|
||||
this.$api.toBePartner(data).then(res => {
|
||||
if (res.data.msg == "提交成功") {
|
||||
this.show = true
|
||||
}
|
||||
})
|
||||
}
|
||||
} else if (this.member == 2) {
|
||||
console.log('联系客服');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.input-class{
|
||||
font-weight:1rpx;
|
||||
color: #A0A0A0;
|
||||
|
||||
<style lang="scss">
|
||||
.service-btn {
|
||||
height: 40px;
|
||||
background-color: #CC3333;
|
||||
color: #fff;
|
||||
border-radius: 25px;
|
||||
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.submit-btn{
|
||||
|
||||
.hhr {
|
||||
margin-top: 50rpx;
|
||||
margin-bottom: 50rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.hhr-text {
|
||||
margin-top: 28rpx;
|
||||
width: 186rpx;
|
||||
height: 50rpx;
|
||||
font-size: 36rpx;
|
||||
font-family: PingFang-SC, PingFang-SC;
|
||||
font-weight: 800;
|
||||
color: #F20C0C;
|
||||
line-height: 50rpx;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
.u-modal__button-group__wrapper--hover {
|
||||
background: #0EBB5B !important;
|
||||
}
|
||||
|
||||
.input-class {
|
||||
font-weight: 1rpx;
|
||||
color: #A0A0A0;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
width: 80%;
|
||||
margin-top: 50rpx;
|
||||
translate: 10%;
|
||||
}
|
||||
.text{
|
||||
margin-left: 20rpx;
|
||||
|
||||
.name,
|
||||
.id {
|
||||
padding: 10rpx;
|
||||
}
|
||||
.payment{
|
||||
|
||||
.text {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.payment {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
|
||||
}
|
||||
.left-payment{
|
||||
|
||||
.left-payment {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.label{
|
||||
|
||||
.label {
|
||||
margin-top: 10rpx;
|
||||
margin-left: 17rpx;
|
||||
margin-left: 17rpx;
|
||||
color: #c1c1c1;
|
||||
/* font-size: 27rpx; */
|
||||
}
|
||||
|
||||
</style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user