From b0596a986cc0969e6e5f857f7f056250158e4fa4 Mon Sep 17 00:00:00 2001 From: daihh Date: Thu, 13 Oct 2022 18:33:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E8=AE=BE=E7=BD=AE=EF=BC=8C?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=E6=80=A7=E5=A5=96=E5=8A=B1=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/user/Setting.vue | 41 +++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/src/views/user/Setting.vue b/src/views/user/Setting.vue index 1f4c614a..3d6bc869 100644 --- a/src/views/user/Setting.vue +++ b/src/views/user/Setting.vue @@ -57,14 +57,14 @@
{{sys.name}} -
+
{{ch.name}}
- +
取消 保存 @@ -195,7 +195,7 @@ } }, computed: { - + ...mapGetters(['userInfo','sysTypeMap']), avatar(){ if(this.userInfo.avatar){ @@ -232,6 +232,30 @@ }); }, methods:{ + checkAndSendFinish(){ + //验证并发送完成事件 + if(this.userInfo.avatar && this.form.sign && this.form.sign!='' && this.interestList.length>1){ + let event = { + key: "FinishSelf",//后台的事件key 发布文章且审核通过 + title: "完善个人信息奖励",//事件的标题 + parameters:"",//用户自定义参数 name:value,name:value + content: "需完成头像,个性签名,学习偏好设置",//事件的内容 + source:'page', + objId: this.userInfo.aid,//关联的id + objType: "98",//关联的类型 + objInfo: "个人信息", + aid: this.userInfo.aid, //当前登录人的id + aname: this.userInfo.name,//当前人的姓名 + status: 1 //状态,直接写1 + } + this.$store.dispatch("userTrigger", event); + }else{ + // console.log('还未达到奖励'); + // console.log('this.userInfo.avatar',this.userInfo.avatar); + // console.log('this.form.sign',this.form.sign); + // console.log('this.interestList',this.interestList); + } + }, saveDynamic() { userApi.updateDynamic(this.form.dynamic).then(res=>{ if(res.status == 200) { @@ -245,11 +269,12 @@ this.$message.success('我的签名修改成功'); this.form.sign = this.signData.sign; this.signData.isEdit = false; + this.checkAndSendFinish(); } }) }, getInfo() { //获取用户兴趣关联的id - this.checkboxGroup = []; + this.checkboxGroup = []; apiUserhobby.info(this.userInfo.aid).then(res=>{ if(res.status == 200) { res.result.forEach(item=>{ @@ -280,7 +305,8 @@ if(res.status == 200) { this.interestIsEdit = false; this.getInfo(); - this.$message.success('更改成功!') + this.checkAndSendFinish(); + this.$message.success('更改成功!') } else { this.$message.error("更改失败!") } @@ -326,6 +352,7 @@ this.$store.dispatch('InitData'); this.$message.success("保存图片成功") this.dialogVisibleAvatar=false; + this.checkAndSendFinish(); }else{ this.$message.error("保存图片失败") } @@ -372,7 +399,7 @@ // outline: none !important; // } ::v-deep .el-checkbox-button:first-child .el-checkbox-button__inner{ - border-left:none; + border-left:none; } .el-checkbox-button, .el-checkbox-button__inner { margin-right: 40px; @@ -458,7 +485,7 @@ top:45px; right:45px; } - + ::v-deep .el-radio-button__inner{ background: #F4F4F4 !important; border-radius: 4px !important;