mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-16 22:36:43 +08:00
个人设置,一次性奖励检查添加
This commit is contained in:
@@ -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,6 +269,7 @@
|
||||
this.$message.success('我的签名修改成功');
|
||||
this.form.sign = this.signData.sign;
|
||||
this.signData.isEdit = false;
|
||||
this.checkAndSendFinish();
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -280,6 +305,7 @@
|
||||
if(res.status == 200) {
|
||||
this.interestIsEdit = false;
|
||||
this.getInfo();
|
||||
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("保存图片失败")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user