修改用户偏好(支持用户不选择时保存,如果修改需满足>=3)

This commit is contained in:
weinan2087
2022-10-20 15:02:01 +08:00
parent 0274c8a8a5
commit c2fd895155

View File

@@ -229,6 +229,7 @@
this.getInfo();
this.getSysTypeTree().then(rs => {
this.sysTypeListMap = rs;
console.log("============"+this.sysTypeListMap[0].name);
});
},
methods:{
@@ -291,11 +292,13 @@
if(code==''){return '';}
return this.sysTypeMap.get(code);
},
// 更新用户与偏好数据
saveHobby(){
let data = []
if(this.checkboxGroup.length == 0) {
this.$message.error('请选择爱好!')
return
if(this.checkboxGroup.length <3 && this.checkboxGroup.length>=1) {
this.$message.error('至少选择三个兴趣偏好!')
return;
}
this.checkboxGroup.forEach(item=>{
data.push({