个人中心我的笔记bug修改

This commit is contained in:
zhaofang
2022-09-29 15:53:05 +08:00
parent 06c9623e53
commit 97d9ed507a
4 changed files with 151 additions and 61 deletions

View File

@@ -85,7 +85,7 @@ export default {
this.notedetail();
this.timer = setInterval(()=>{
this.savedata(1);
},30000 *10);
},30000);
},
methods:{
imgDel(index) {
@@ -93,6 +93,8 @@ export default {
},
comeback(){
this.$router.go(-1);
clearImmediate(this.timer);
this.timer = null;
},
notedetail(){
apiNote.detail(this.id).then(res=>{
@@ -112,7 +114,11 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.imgContent = item.beforeContent;
if(this.editdata.contentType == 3) {
this.imgContent = item.beforeContent;
} else {
this.editdata.content = item.beforeContent;
}
}).catch(() => {
this.$message({
type: 'info',
@@ -158,6 +164,7 @@ export default {
if(res.status == 200) {
sessionStorage.setItem('isShowTip','');
if(num ==1) {//自动保存
this.editdata.sysVersion +=1;
this.isShowTip = '笔记自动保存成功';
setTimeout(()=>{
this.isShowTip = '';
@@ -181,6 +188,7 @@ export default {
},
beforeDestroy() {
clearImmediate(this.timer);
this.timer = null;
},
}