提交 1af651af authored 作者: 王王拯's avatar 王王拯

修复学院信息提交bug

上级 d69dc7db
...@@ -73,15 +73,21 @@ export default { ...@@ -73,15 +73,21 @@ export default {
this.$refs.form.submit() this.$refs.form.submit()
}, },
onSubmit(data) { onSubmit(data) {
const ruleForm = this.$refs.form.ruleFor const ruleForm = this.$refs.form.ruleForm
if (this.type) { if (this.type) {
this.$toast('正在上传文件,请稍后') this.$toast('正在上传文件,请稍后')
return return
} }
const params = { const params = {
mobile: data.mobile, mobile: data.mobile,
photos: JSON.stringify(ruleForm.photos.map(k => k.url)), photos: '',
videos: JSON.stringify(ruleForm.videos.map(k => k.url)) videos: ''
}
if (data.photos.length > 0) {
params.photos = JSON.stringify(ruleForm.photos.map(k => k.url))
}
if (data.videos.length > 0) {
params.videos = JSON.stringify(ruleForm.videos.map(k => k.url))
} }
api.addSubmitStudent(params).then(response => { api.addSubmitStudent(params).then(response => {
if (response.success) { if (response.success) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论