diff --git a/pages/index/testtraining/testtraining.vue b/pages/index/testtraining/testtraining.vue index 7b9e3df..0704155 100644 --- a/pages/index/testtraining/testtraining.vue +++ b/pages/index/testtraining/testtraining.vue @@ -407,7 +407,7 @@ - + x @@ -431,14 +431,14 @@ 培训班代号由校企合作老师统一发送,请联系培训老师 - + @@ -458,11 +458,27 @@ - + * + + + + * + + + + + + + + * + + + + @@ -558,6 +574,13 @@ } }) } + const phoneCheck = (rule, value, callback) => { + if (!/^1[34578]\d{9}$/.test(value)) { + callback(new Error('请输入正确的手机号码!')) + } else { + callback() + } + } return { flag: true, accessToken: null, @@ -779,9 +802,9 @@ }, ], - homeCollege: [{ + studentCode: [{ required: true, - message: '请输入您的学院名称', + message: '请输入您的学号', trigger: ['blur'], }], majorName: [{ @@ -793,7 +816,21 @@ required: true, message: '请输入您的姓名', trigger: ['blur'], - }] + }], + counsellor: [{ + required: true, + message: '请输入辅导员姓名', + trigger: ['blur'], + }], + counsellorTel: [{ + required: true, + message: '请输入辅导员手机号', + trigger: ['blur'], + },{ + message: '请输入正确的手机号码', + validator: phoneCheck, + trigger: ['blur'], + }], }, // 评测班弹窗 tips: '', @@ -955,12 +992,12 @@ if (height > 0) { // 校企 this.flag = false - + } // 键盘收回 else { this.flag = true - + } }, // 获取专家列表 @@ -975,7 +1012,7 @@ // 在线报名 gobaomingFn() { uni.pageScrollTo({ - scrollTop: '590' + scrollTop: '2000' // selector:'.titletopt' }) }, @@ -1199,11 +1236,13 @@ let data = { trainClassCode: this.form.trainClassCode, mobile: this.wxUserInfo.phonenumber, - homeCollege: this.form.homeCollege, + // homeCollege: this.form.homeCollege, majorName: this.form.majorName, studentName: this.form.studentName, studentCode: this.form.studentCode, trainClassId, + counsellor: this.form.counsellor, + counsellorTel: this.form.counsellorTel, } this.http.quickPost(`/train/training/apply`, data, true).then(res => { if (res.data.data.code == 200) { diff --git a/utils/http.js b/utils/http.js index ebf1c99..a6ddb9f 100644 --- a/utils/http.js +++ b/utils/http.js @@ -1,9 +1,9 @@ import comstemutil from "./comstemutil"; //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/prod-api'; +// const baseUrl = 'https://www.bjkeyware.com/prod-api'; // const baseUrl = 'http://172.16.36.180:9999'; // const baseUrl = 'https://www.bjkeyware.com/prod-api';