报名表建议项改为非必填

main
hcj 5 months ago
parent 726ecb2c74
commit 0d30235861
  1. 2
      pages/index/testtraining/teacherDetail.vue
  2. 22
      pages/index/testtraining/teacherSign.vue
  3. 2
      utils/http.js

@ -299,7 +299,7 @@
{ {
time: "8月5号", time: "8月5号",
content: [ content: [
"政府、高校领导行业动态分享。" "政府、高校及企业领导分享行业动态。"
] ]
}, },
{ {

@ -18,7 +18,7 @@
<view class="lineewewe"></view> <view class="lineewewe"></view>
<!-- 表单 --> <!-- 表单 -->
<u-form :model="form" ref="uForm" label-position="top" class="uformclass" :rules="rules"> <u-form :model="form" ref="uForm" label-position="top" class="uformclass" :rules="rules">
<u-form-item v-for="(it,index) in detailForm" :key="it.key" :label="`${index + 1}.${it[it.key]}`"> <u-form-item :class="{'lastcl' : index == detailForm.length-1}" v-for="(it,index) in detailForm" :key="it.key" :label="`${index + 1}.${it[it.key]}`">
<u-input v-if="it.type == 'input'" border v-model="form[it.key]" /> <u-input v-if="it.type == 'input'" border v-model="form[it.key]" />
<u-radio-group v-if="it.type == 'radio'" wrap v-model="form[it.key]" > <u-radio-group v-if="it.type == 'radio'" wrap v-model="form[it.key]" >
<u-radio v-for="(item, i) in it.value" :key="item" :name="item"> <u-radio v-for="(item, i) in it.value" :key="item" :name="item">
@ -63,7 +63,7 @@
this.trainClassId = res.data.trainClassId this.trainClassId = res.data.trainClassId
} else { } else {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: res.data.msg, title: "当前暂无师资培训班开班,请耐心等待开班通知",
icon: 'none' icon: 'none'
}) })
} }
@ -103,7 +103,13 @@
// }) // })
// } // }
// }) // })
const toggle = this.detailForm.some(item=>{return !this.form[item.key]}) const toggle = this.detailForm.some((item,index)=>{
console.log(item);
if(!this.form[item.key] && (item.key != "suggestion")){
return item
}
}
)
console.log(toggle); console.log(toggle);
if(toggle){ if(toggle){
uni.showToast({ uni.showToast({
@ -244,6 +250,16 @@
color: #EF3D3D; color: #EF3D3D;
margin-right: 10rpx; margin-right: 10rpx;
} }
// .u-form>*{
// background-color: #1A81F9;
// }
}
::v-deep .lastcl {
.u-form-item--left__content__label::before {
content: '';
color: #EF3D3D;
margin-right: 10rpx;
}
} }
} }

@ -1,7 +1,7 @@
import comstemutil from "./comstemutil"; import comstemutil from "./comstemutil";
//es6 //es6
// const baseUrl = 'http://192.168.0.230: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';

Loading…
Cancel
Save