diff --git a/src/views/user/Setting.vue b/src/views/user/Setting.vue index 9df083d4..d906d426 100644 --- a/src/views/user/Setting.vue +++ b/src/views/user/Setting.vue @@ -459,8 +459,14 @@ this.childData.forEach(it =>{ if(item == it.id){ this.workname.push(it.name); - console.log(this.workname) + + // this.workname.filter(function (item, index, arr) { + // return this.workname.indexOf(item, 0) === index; + // }); + // console.log(this.workname,'ces') } + console.log(this.workname,'lmj') + }) }) }) @@ -545,8 +551,12 @@ }, teacherUpdata(){ - if(this.checkboxtearGroup.length <3 && this.checkboxtearGroup.length>=1) { - this.$message.error('至少选择三个专长!') + if(this.checkboxtearGroup.length <1 && this.checkboxtearGroup.length>=1) { + this.$message.error('至少选择一个专长!') + return; + } + if(this.checkboxtearGroup.length >3 && this.checkboxtearGroup.length>=1) { + this.$message.error('最多选择三个专长!') return; } console.log(this.checkboxtearGroup);