报名表验证

main
hcj 5 months ago
parent 87a2cf304b
commit b2e67f9a15
  1. 10
      pages/index/testtraining/teacherDetail.vue
  2. 12
      pages/index/testtraining/teacherSign.vue
  3. 26
      pages/index/testtraining/testtraining.vue

@ -234,11 +234,15 @@
</view> </view>
<view class="rightBox"> <view class="rightBox">
<view class="rightBox1"> <view class="rightBox1">
<view class="rightBoxRow"> <!-- <view class="rightBoxRow">
<text>报名方式1</text><text style="cursor: pointer;color: #1B68DE;" <text>报名方式1</text><text style="cursor: pointer;color: #1B68DE;"
@click="gosign">点击报名</text> @click="gosign">点击报名</text>
</view> -->
<view class="rightBoxRow">
<text>报名方式</text><text style="cursor: pointer;color: #1B68DE;"
@click="gosign">点击报名</text>
</view> </view>
<view class="rightBoxRow rightBoxRowflex"> <!-- <view class="rightBoxRow rightBoxRowflex">
<text>报名方式2</text> <text>报名方式2</text>
<view class="" style="display: flex;flex-direction: column;"> <view class="" style="display: flex;flex-direction: column;">
<text style="cursor: pointer;color: #FB6827;" <text style="cursor: pointer;color: #FB6827;"
@ -248,7 +252,7 @@
src="http://image.bjkeyware.com/static/index/renliwb/627teacherlogo6.png" mode=""> src="http://image.bjkeyware.com/static/index/renliwb/627teacherlogo6.png" mode="">
</image> </image>
</view> </view>
</view> </view> -->
<view class="rightBoxRow"> <view class="rightBoxRow">
<text>项目负责人</text>牛中东 13683248482同微信 <text>项目负责人</text>牛中东 13683248482同微信
</view> </view>

@ -1,6 +1,6 @@
<template> <template>
<view class="boxsxx"> <view class="boxsxx">
<image src="http://image.bjkeyware.com/static/index/renliwb/627teacherbg.png" class="topbg" mode=""></image> <!-- <image src="http://image.bjkeyware.com/static/index/renliwb/627teacherbg.png" class="topbg" mode=""></image> -->
<view class="tscontent"> <view class="tscontent">
<view class="contitle">北京关键科技股份有限公司&河南科技大学</view> <view class="contitle">北京关键科技股份有限公司&河南科技大学</view>
@ -53,6 +53,7 @@
this.getformDe() this.getformDe()
}, },
onReady() { onReady() {
this.$refs.uForm.setRules(this.rules);
}, },
methods: { methods: {
getformDe() { getformDe() {
@ -95,12 +96,21 @@
// rules, // rules,
this.detailForm.forEach(it => { this.detailForm.forEach(it => {
if (!this.form[it.key]) { if (!this.form[it.key]) {
console.log("不完整");
return uni.showToast({ return uni.showToast({
title: '请将报名表填写完整', title: '请将报名表填写完整',
icon: 'none' icon: 'none'
}) })
} }
}) })
const toggle = this.form.some(item=>{return toggle === ""})
if(toggle){
uni.showToast({
title: '请将报名表填写完整',
icon: 'none'
})
return
}
// json // json
const newData = JSON.parse(JSON.stringify(this.detailForm)) const newData = JSON.parse(JSON.stringify(this.detailForm))
newData.forEach((it) => { newData.forEach((it) => {

@ -841,7 +841,10 @@
// //
tips: '', tips: '',
isPCshow: false, isPCshow: false,
classInfo: {}, classInfo: {
classId:"",
classType:""
},
jjrules: { jjrules: {
studentName: [{ studentName: [{
required: true, required: true,
@ -1008,9 +1011,13 @@
getSwiperImages(){ getSwiperImages(){
this.http.quickGet(`/train/banners?type=app`).then(res => { this.http.quickGet(`/train/banners?type=app`).then(res => {
this.swipelist = res.data.data.map(item=>{ this.swipelist = res.data.data.map(item=>{
console.log(item);
return { return {
'classType':item.classType, 'classType':item.classType,
'image':this.http.baseUrl + item.filePath 'image':this.http.baseUrl + item.filePath,
'classId':item.entityId,
'classType':item.classType,
} }
}) })
console.log(this.swipelist); console.log(this.swipelist);
@ -1018,6 +1025,7 @@
}, },
bgClick(e) { bgClick(e) {
const type = this.swipelist[e].classType const type = this.swipelist[e].classType
const item = this.swipelist[e]
console.log(e); console.log(e);
console.log(this.swipelist); console.log(this.swipelist);
console.log(type); console.log(type);
@ -1029,6 +1037,16 @@
url: '/pages/index/testtraining/teacherDetail' url: '/pages/index/testtraining/teacherDetail'
}) })
} }
if(type == 1){
this.classInfo.classId = item.entityId
this.classInfo.classType = item.classType
this.jjOpen()
}
if(type == 2){
this.classInfo.classId = item.entityId
this.classInfo.classType = item.classType
this.jjOpen()
}
}, },
onKeyboardHeightChange(res) { onKeyboardHeightChange(res) {
const { const {
@ -1210,8 +1228,10 @@
// this.isPCshow = true // this.isPCshow = true
// this.classInfo = it // this.classInfo = it
// } // }
this.isPCshow = true if(it){
this.classInfo = it this.classInfo = it
}
this.isPCshow = true
}, },
// //
jjbaoming() { jjbaoming() {

Loading…
Cancel
Save