mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-15 05:46:43 +08:00
修改用户偏好(支持用户不选择时保存,如果修改需满足>=3)
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user