mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-16 22:36:43 +08:00
修改用户偏好(支持用户不选择时保存,如果修改需满足>=3)
This commit is contained in:
@@ -229,6 +229,7 @@
|
|||||||
this.getInfo();
|
this.getInfo();
|
||||||
this.getSysTypeTree().then(rs => {
|
this.getSysTypeTree().then(rs => {
|
||||||
this.sysTypeListMap = rs;
|
this.sysTypeListMap = rs;
|
||||||
|
console.log("============"+this.sysTypeListMap[0].name);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
@@ -291,11 +292,13 @@
|
|||||||
if(code==''){return '';}
|
if(code==''){return '';}
|
||||||
return this.sysTypeMap.get(code);
|
return this.sysTypeMap.get(code);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 更新用户与偏好数据
|
||||||
saveHobby(){
|
saveHobby(){
|
||||||
let data = []
|
let data = []
|
||||||
if(this.checkboxGroup.length == 0) {
|
if(this.checkboxGroup.length <3 && this.checkboxGroup.length>=1) {
|
||||||
this.$message.error('请选择爱好!')
|
this.$message.error('至少选择三个兴趣偏好!')
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
this.checkboxGroup.forEach(item=>{
|
this.checkboxGroup.forEach(item=>{
|
||||||
data.push({
|
data.push({
|
||||||
|
|||||||
Reference in New Issue
Block a user