添加动态事件

This commit is contained in:
zhaofang
2022-09-14 15:15:19 +08:00
parent 4109cab4b4
commit 5146759a08
8 changed files with 127 additions and 4 deletions

View File

@@ -147,7 +147,6 @@
autoSaveNote() {
this.autoSave = setInterval(()=>{
localStorage.setItem("NOTE_TEXT",this.mynoteData.content);
console.log("2222222222");
},10000);
},
noteEdit(note) {
@@ -198,6 +197,20 @@
if(res.status == 200 ) {
if(!this.mynoteData.id) {
this.inAnimation = true;
// 是编辑新增
let event = {
key: "PublishNote",//后台的事件key
title: "发布公开的笔记",//事件的标题
parameters:"",//用户自定义参数 name:value,name:value
content: "每发布一个公开 的笔记",//事件的内容
objId: res.result.id,//关联的id
objType: "4",//关联的类型
objInfo: "笔记",
aid: this.userInfo.aid, //当前登录人的id
aname: this.userInfo.name,//当前人的姓名
status: 1 //状态直接写1
}
this.$store.dispatch("userTrigger", event);
}
setTimeout(()=>{
localStorage.setItem("NOTE_TEXT",'');