校企培训新加字段

main
lijingyu007 5 months ago
parent bbe3dfec83
commit e56fed75ad
  1. 55
      pages/index/testtraining/testtraining.vue
  2. 4
      utils/http.js

@ -431,14 +431,14 @@
<view v-else class="tiptext"> <view v-else class="tiptext">
培训班代号由校企合作老师统一发送请联系培训老师 培训班代号由校企合作老师统一发送请联系培训老师
</view> </view>
<u-form-item prop="homeCollege"> <!-- <u-form-item prop="homeCollege">
<view class="rowitem"> <view class="rowitem">
<view class="rowitemxing"> <view class="rowitemxing">
* *
</view> </view>
<u-input v-model="form.homeCollege" placeholder="请输入您的学院名称"></u-input> <u-input v-model="form.homeCollege" placeholder="请输入您的学院名称"></u-input>
</view> </view>
</u-form-item> </u-form-item> -->
<u-form-item prop="majorName"> <u-form-item prop="majorName">
<view class="rowitem"> <view class="rowitem">
<view class="rowitemxing"> <view class="rowitemxing">
@ -458,11 +458,27 @@
<u-form-item prop="studentCode"> <u-form-item prop="studentCode">
<view class="rowitem"> <view class="rowitem">
<view class="rowitemxing"> <view class="rowitemxing">
*
</view> </view>
<u-input v-model="form.studentCode" placeholder="请输入您的学号"></u-input> <u-input v-model="form.studentCode" placeholder="请输入您的学号"></u-input>
</view> </view>
</u-form-item> </u-form-item>
<u-form-item prop="counsellor">
<view class="rowitem">
<view class="rowitemxing">
*
</view>
<u-input v-model="form.counsellor" placeholder="请输入辅导员姓名"></u-input>
</view>
</u-form-item>
<u-form-item prop="counsellorTel">
<view class="rowitem">
<view class="rowitemxing">
*
</view>
<u-input v-model="form.counsellorTel" placeholder="请输入辅导员联系方式"></u-input>
</view>
</u-form-item>
</u-form> </u-form>
</view> </view>
<!-- 按钮 --> <!-- 按钮 -->
@ -558,6 +574,13 @@
} }
}) })
} }
const phoneCheck = (rule, value, callback) => {
if (!/^1[34578]\d{9}$/.test(value)) {
callback(new Error('请输入正确的手机号码!'))
} else {
callback()
}
}
return { return {
flag: true, flag: true,
accessToken: null, accessToken: null,
@ -779,9 +802,9 @@
}, },
], ],
homeCollege: [{ studentCode: [{
required: true, required: true,
message: '请输入您的学院名称', message: '请输入您的学',
trigger: ['blur'], trigger: ['blur'],
}], }],
majorName: [{ majorName: [{
@ -793,7 +816,21 @@
required: true, required: true,
message: '请输入您的姓名', message: '请输入您的姓名',
trigger: ['blur'], trigger: ['blur'],
}] }],
counsellor: [{
required: true,
message: '请输入辅导员姓名',
trigger: ['blur'],
}],
counsellorTel: [{
required: true,
message: '请输入辅导员手机号',
trigger: ['blur'],
},{
message: '请输入正确的手机号码',
validator: phoneCheck,
trigger: ['blur'],
}],
}, },
// //
tips: '', tips: '',
@ -975,7 +1012,7 @@
// 线 // 线
gobaomingFn() { gobaomingFn() {
uni.pageScrollTo({ uni.pageScrollTo({
scrollTop: '590' scrollTop: '2000'
// selector:'.titletopt' // selector:'.titletopt'
}) })
}, },
@ -1199,11 +1236,13 @@
let data = { let data = {
trainClassCode: this.form.trainClassCode, trainClassCode: this.form.trainClassCode,
mobile: this.wxUserInfo.phonenumber, mobile: this.wxUserInfo.phonenumber,
homeCollege: this.form.homeCollege, // homeCollege: this.form.homeCollege,
majorName: this.form.majorName, majorName: this.form.majorName,
studentName: this.form.studentName, studentName: this.form.studentName,
studentCode: this.form.studentCode, studentCode: this.form.studentCode,
trainClassId, trainClassId,
counsellor: this.form.counsellor,
counsellorTel: this.form.counsellorTel,
} }
this.http.quickPost(`/train/training/apply`, data, true).then(res => { this.http.quickPost(`/train/training/apply`, data, true).then(res => {
if (res.data.data.code == 200) { if (res.data.data.code == 200) {

@ -1,9 +1,9 @@
import comstemutil from "./comstemutil"; import comstemutil from "./comstemutil";
//es6 //es6
// const baseUrl = 'http://192.168.0.229:9999'; const baseUrl = 'http://192.168.0.229:9999';
// const baseUrl = 'https://www.bjkeyware.com/test-api'; // const baseUrl = 'https://www.bjkeyware.com/test-api';
const baseUrl = 'https://www.bjkeyware.com/prod-api'; // const baseUrl = 'https://www.bjkeyware.com/prod-api';
// const baseUrl = 'http://172.16.36.180:9999'; // const baseUrl = 'http://172.16.36.180:9999';
// const baseUrl = 'https://www.bjkeyware.com/prod-api'; // const baseUrl = 'https://www.bjkeyware.com/prod-api';

Loading…
Cancel
Save