|
@@ -1,8 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view class="content">
|
|
<view class="content">
|
|
|
- <view class="top-box">
|
|
|
|
|
- 个人报名
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <view class="top-box">个人报名</view>
|
|
|
<view class="box">
|
|
<view class="box">
|
|
|
<view class="box-1">
|
|
<view class="box-1">
|
|
|
<view class="box-left">
|
|
<view class="box-left">
|
|
@@ -14,7 +12,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="box-1">
|
|
<view class="box-1">
|
|
|
<view class="box-left">出生年月:</view>
|
|
<view class="box-left">出生年月:</view>
|
|
|
- <picker mode="date" :value="birth" fields="month" :start="startDate" :end="endDate" @change="bindDateChange" class="box-right">
|
|
|
|
|
|
|
+ <picker mode="date" :value="birth" :start="startDate" :end="endDate" @change="bindDateChange" class="box-right">
|
|
|
<view class="placeholder" v-if="birth === ''">请输入您的生日</view>
|
|
<view class="placeholder" v-if="birth === ''">请输入您的生日</view>
|
|
|
<view v-else>{{ birth }}</view>
|
|
<view v-else>{{ birth }}</view>
|
|
|
</picker>
|
|
</picker>
|
|
@@ -23,7 +21,7 @@
|
|
|
<view class="box-left">性别:</view>
|
|
<view class="box-left">性别:</view>
|
|
|
<picker @change="bindPickerSex" :value="sex" :range="array" class="box-right">
|
|
<picker @change="bindPickerSex" :value="sex" :range="array" class="box-right">
|
|
|
<view class="placeholder" v-if="sex === ''">请输入您的性别</view>
|
|
<view class="placeholder" v-if="sex === ''">请输入您的性别</view>
|
|
|
- <text>{{ sex }}</text>
|
|
|
|
|
|
|
+ <text>{{ sex == '0' ? '男' : sex == '1' ? '女' : sex }}</text>
|
|
|
</picker>
|
|
</picker>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="box-1">
|
|
<view class="box-1">
|
|
@@ -66,12 +64,39 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="buttom" :class="{ action: loding }" @click="!loding ? join() : ''">提交申请</view>
|
|
<view class="buttom" :class="{ action: loding }" @click="!loding ? join() : ''">提交申请</view>
|
|
|
|
|
+ <uni-popup ref="popup1" type="center">
|
|
|
|
|
+ <view class="popup-box">
|
|
|
|
|
+ <!-- <view class="img">
|
|
|
|
|
+ <image src="../../static/img/WechatIMG662.png" mode=""></image>
|
|
|
|
|
+ </view> -->
|
|
|
|
|
+ <view class="mian">
|
|
|
|
|
+ <view class="delivery">
|
|
|
|
|
+ 支付失败
|
|
|
|
|
+ <!-- {{ i18n.qrhwsdm }} -->
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="nocancel">
|
|
|
|
|
+ 请退出页面,重新登录
|
|
|
|
|
+ <!-- {{ i18n.wfcx }} -->
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="comfirm-box">
|
|
|
|
|
+ <view class="cancel" @click="cancel1">
|
|
|
|
|
+ 取消
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="comfirm" @click="comfirmExit()">
|
|
|
|
|
+ 确认
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ </uni-popup>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { joinSec } from '@/api/index.js';
|
|
|
|
|
|
|
+import { vip, getVipmoney,createOrder } from '@/api/index.js';
|
|
|
import { upload } from '@/api/ask.js';
|
|
import { upload } from '@/api/ask.js';
|
|
|
|
|
+import { mapState, mapMutations } from 'vuex';
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
const currentDate = this.getDate({
|
|
const currentDate = this.getDate({
|
|
@@ -80,7 +105,7 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
loding: false, //是否提交中
|
|
loding: false, //是否提交中
|
|
|
array: ['男', '女'],
|
|
array: ['男', '女'],
|
|
|
- chooseEdu: ['博士后', '博士', '硕士', '本科', '专科', '其他'],
|
|
|
|
|
|
|
+ chooseEdu: ['小学以下', '小学', '初中', '高中/中专', '大专/本科', '硕士', '博士', '博士后'],
|
|
|
chooseVol: ['是', '否'],
|
|
chooseVol: ['是', '否'],
|
|
|
chooseExp: ['是', '否'],
|
|
chooseExp: ['是', '否'],
|
|
|
index: 0,
|
|
index: 0,
|
|
@@ -95,10 +120,15 @@ export default {
|
|
|
address: '',
|
|
address: '',
|
|
|
work: '',
|
|
work: '',
|
|
|
specialty: '',
|
|
specialty: '',
|
|
|
- education: ''
|
|
|
|
|
|
|
+ education: '',
|
|
|
|
|
+ educationid: '',
|
|
|
|
|
+ money: '',
|
|
|
|
|
+ id:''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
|
|
+ ...mapState('user', ['hasLogin', 'userInfo']),
|
|
|
|
|
+ ...mapState(['weichatObj']),
|
|
|
startDate() {
|
|
startDate() {
|
|
|
return this.getDate('start');
|
|
return this.getDate('start');
|
|
|
},
|
|
},
|
|
@@ -106,6 +136,19 @@ export default {
|
|
|
return this.getDate('end');
|
|
return this.getDate('end');
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ onLoad() {
|
|
|
|
|
+ console.log(this.userInfo)
|
|
|
|
|
+ const obj = this;
|
|
|
|
|
+ getVipmoney().then(({ data }) => {
|
|
|
|
|
+ console.log(data);
|
|
|
|
|
+ data.forEach(e => {
|
|
|
|
|
+ if (e.name == '个人会员') {
|
|
|
|
|
+ obj.money = e.pay_price;
|
|
|
|
|
+ obj.id = e.id;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
async join() {
|
|
async join() {
|
|
|
let obj = this;
|
|
let obj = this;
|
|
@@ -117,7 +160,7 @@ export default {
|
|
|
obj.$api.msg('请选择出生年月');
|
|
obj.$api.msg('请选择出生年月');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- if (obj.sex == '') {
|
|
|
|
|
|
|
+ if (obj.sex === '') {
|
|
|
obj.$api.msg('请输入您的性别');
|
|
obj.$api.msg('请输入您的性别');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -175,32 +218,72 @@ export default {
|
|
|
// obj.$api.msg('请填写您的有无服务经验');
|
|
// obj.$api.msg('请填写您的有无服务经验');
|
|
|
// return;
|
|
// return;
|
|
|
// }
|
|
// }
|
|
|
- obj.loding = true;
|
|
|
|
|
- joinSec({
|
|
|
|
|
- name: obj.name,
|
|
|
|
|
- sex: obj.sex,
|
|
|
|
|
- education: obj.education,
|
|
|
|
|
- birth: obj.birth,
|
|
|
|
|
- mz: obj.mz,
|
|
|
|
|
- phone: obj.phone,
|
|
|
|
|
- address: obj.address,
|
|
|
|
|
- work: obj.work,
|
|
|
|
|
- specialty: obj.specialty,
|
|
|
|
|
- img: obj.cardimg,
|
|
|
|
|
- card: obj.card
|
|
|
|
|
|
|
+ // obj.loding = true;
|
|
|
|
|
+ vip({
|
|
|
|
|
+ full_name: obj.name, //姓名
|
|
|
|
|
+ sex: obj.sex, //性别
|
|
|
|
|
+ education: obj.educationid, //学历
|
|
|
|
|
+ birth: obj.birth, //生日
|
|
|
|
|
+ nation: obj.mz, //民族
|
|
|
|
|
+ mobile: obj.phone,
|
|
|
|
|
+ address: obj.address, //居住地址
|
|
|
|
|
+ company_name: obj.work, //工作单位
|
|
|
|
|
+ position: obj.specialty, //职位
|
|
|
|
|
+ certificateimage: obj.cardimg,
|
|
|
|
|
+ id_card: obj.card,
|
|
|
|
|
+ user_type: 1
|
|
|
})
|
|
})
|
|
|
.then(e => {
|
|
.then(e => {
|
|
|
- obj.name = '';
|
|
|
|
|
- obj.sex = '';
|
|
|
|
|
- obj.education = '';
|
|
|
|
|
- obj.birth = '';
|
|
|
|
|
- (obj.mz = ''), (obj.phone = '');
|
|
|
|
|
- obj.address = '';
|
|
|
|
|
- obj.work = '';
|
|
|
|
|
- obj.specialty = '';
|
|
|
|
|
- (obj.cardimg = ''), (obj.card = '');
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: '../joinSuc/joinNow'
|
|
|
|
|
|
|
+ // uni.navigateTo({
|
|
|
|
|
+ // url: '../joinSuc/joinNow'
|
|
|
|
|
+ // });
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: '成为个人会员需要缴纳' + obj.money + '员年费,是否前往提交',
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ console.log('用户点击确定');
|
|
|
|
|
+ createOrder({
|
|
|
|
|
+ level_id: obj.id,
|
|
|
|
|
+ body: '个人红会年费',
|
|
|
|
|
+ pay_type: 0,
|
|
|
|
|
+ // name: obj.name,
|
|
|
|
|
+ pay_price: obj.money,
|
|
|
|
|
+ from: 'weixin'
|
|
|
|
|
+ }).then(({data}) =>{
|
|
|
|
|
+ obj.name = '';
|
|
|
|
|
+ obj.sex = '';
|
|
|
|
|
+ obj.educationid = '';
|
|
|
|
|
+ obj.birth = '';
|
|
|
|
|
+ (obj.mz = ''), (obj.phone = '');
|
|
|
|
|
+ obj.address = '';
|
|
|
|
|
+ obj.work = '';
|
|
|
|
|
+ obj.specialty = '';
|
|
|
|
|
+ (obj.cardimg = ''), (obj.card = '');
|
|
|
|
|
+ let res = data.jsConfig;
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+ obj.weichatObj.chooseWXPay({
|
|
|
|
|
+ timestamp: res.timestamp,
|
|
|
|
|
+ nonceStr: res.nonceStr,
|
|
|
|
|
+ package: res.package,
|
|
|
|
|
+ signType: res.signType,
|
|
|
|
|
+ paySign: res.paySign,
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: '../joinSuc/joinNow'
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ fail: function(res) {
|
|
|
|
|
+ this.$refs.popup1.open()
|
|
|
|
|
+ console.log(res, "失败")
|
|
|
|
|
+ console.log(res.errMsg)
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ } else if (res.cancel) {
|
|
|
|
|
+ console.log('用户点击取消');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
})
|
|
})
|
|
|
.catch(function(e) {
|
|
.catch(function(e) {
|
|
@@ -208,24 +291,35 @@ export default {
|
|
|
console.log(e);
|
|
console.log(e);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ cancel1() {
|
|
|
|
|
+ this.$refs.popup1.close();
|
|
|
|
|
+ },
|
|
|
|
|
+ comfirmExit() {
|
|
|
|
|
+ console.log('点击comfirmExit')
|
|
|
|
|
+ this.$refs.popup1.close()
|
|
|
|
|
+ uni.switchTab({
|
|
|
|
|
+ url: '/pages/index/index'
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
imgsub() {
|
|
imgsub() {
|
|
|
console.log('imgsub');
|
|
console.log('imgsub');
|
|
|
upload({
|
|
upload({
|
|
|
filename: ''
|
|
filename: ''
|
|
|
}).then(data => {
|
|
}).then(data => {
|
|
|
- this.cardimg = data[0].url;
|
|
|
|
|
|
|
+ this.cardimg = data[0].fullurl;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
// 选择性别
|
|
// 选择性别
|
|
|
bindPickerSex: function(e) {
|
|
bindPickerSex: function(e) {
|
|
|
- console.log(this.array[e.target.value]);
|
|
|
|
|
- this.sex = this.array[e.target.value];
|
|
|
|
|
|
|
+ this.sex = e.target.value;
|
|
|
this.index = e.target.value + 1;
|
|
this.index = e.target.value + 1;
|
|
|
},
|
|
},
|
|
|
// 选择教育程度
|
|
// 选择教育程度
|
|
|
bindPickerEdu: function(e) {
|
|
bindPickerEdu: function(e) {
|
|
|
this.education = this.chooseEdu[e.target.value];
|
|
this.education = this.chooseEdu[e.target.value];
|
|
|
- this.index = e.target.value + 1;
|
|
|
|
|
|
|
+ this.educationid = e.target.value;
|
|
|
|
|
+ console.log(this.educationid);
|
|
|
},
|
|
},
|
|
|
// 选择日期
|
|
// 选择日期
|
|
|
bindDateChange: function(e) {
|
|
bindDateChange: function(e) {
|
|
@@ -303,11 +397,11 @@ page {
|
|
|
margin: 60rpx auto 0;
|
|
margin: 60rpx auto 0;
|
|
|
width: 750rpx;
|
|
width: 750rpx;
|
|
|
height: 100rpx;
|
|
height: 100rpx;
|
|
|
- background: #FA7E67;
|
|
|
|
|
|
|
+ background: #fa7e67;
|
|
|
font-size: 34rpx;
|
|
font-size: 34rpx;
|
|
|
font-family: PingFang SC;
|
|
font-family: PingFang SC;
|
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
|
- color: #FFFFFF;
|
|
|
|
|
|
|
+ color: #ffffff;
|
|
|
line-height: 100rpx;
|
|
line-height: 100rpx;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
&.action {
|
|
&.action {
|
|
@@ -427,7 +521,7 @@ page {
|
|
|
line-height: 58rpx;
|
|
line-height: 58rpx;
|
|
|
font-family: PingFang SC;
|
|
font-family: PingFang SC;
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
- color: #FA7E67;
|
|
|
|
|
|
|
+ color: #fa7e67;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
position: relative;
|
|
position: relative;
|
|
|
&::before {
|
|
&::before {
|
|
@@ -443,5 +537,4 @@ page {
|
|
|
margin: 0 auto;
|
|
margin: 0 auto;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
</style>
|
|
</style>
|