diff --git a/src/api/system/user.js b/src/api/system/user.js index 1a8ec6a5..65608edc 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -81,6 +81,15 @@ const updateDynamic=function (dynamic){ return ajax.get('/xboe/sys/user/update-dynamic?dynamic='+dynamic); } +/** + * 个人主页开关设置 + * flag true - 打开; false - 关闭 + * */ +const updateShowHome=function (flag){ + return ajax.post('/xboe/sys/user/show-home?showHome='+flag); +} + + /** * 二次查询 签名和动态 * */ @@ -96,7 +105,8 @@ export default{ findByName, detail, getOrgSimpleByUserId, - updateSign, - updateDynamic, - findSignDynamic + updateSign, + updateDynamic, + findSignDynamic, + updateShowHome } diff --git a/src/views/portal/case/Index.vue b/src/views/portal/case/Index.vue index 37eb48d2..c813d934 100644 --- a/src/views/portal/case/Index.vue +++ b/src/views/portal/case/Index.vue @@ -92,13 +92,14 @@
{{ item.keyword5 }}
-
+
+ {{ item.summary }} - {{displayAll(item)}} + - - {{item.isAll?'收起':'展开'}} - + + +
diff --git a/src/views/user/Setting.vue b/src/views/user/Setting.vue index f65fdd29..e51d032d 100644 --- a/src/views/user/Setting.vue +++ b/src/views/user/Setting.vue @@ -10,7 +10,7 @@
修改头像
- +
@@ -254,6 +254,8 @@ if(this.userInfo.avatar){ this.avatarUrl = this.avatar; } + console.log("sss "+this.userInfo.showHome); + this.hideHome = this.userInfo.showHome; this.load(); this.getInfo(); this.getSysTypeTree().then(rs => { @@ -261,8 +263,15 @@ }); }, methods:{ + // 保存个人主页选项的编辑 saveHideHome(){ //执行隐藏操作 + userApi.updateShowHome(!this.hideHome).then(res=>{ + if(res.status == 200) { + this.userInfo.showHome = !this.hideHome; + this.$message.success('修改成功'); + } + }) }, checkAndSendFinish(){ //验证并发送完成事件 @@ -439,7 +448,7 @@ color: #FFFFFF; margin: 0px; } - + } .avatar:hover .avatarhover{ display: block;