修复提交时的异步问题

This commit is contained in:
OBKoro1 2020-01-02 17:19:47 +08:00
parent fa47e25a6e
commit 3d7fbd196c
4 changed files with 20 additions and 10 deletions

View File

@ -2,6 +2,7 @@
# 用于学习交流
<!-- TODO: 18年 -->
<!-- TODO: 前面先选中的日期会覆盖后面的日期 -->
@ -10,3 +11,7 @@
<!-- TODO: 可以挂在后台慢慢commit -->
<!-- TODO: icon -->
<!-- 分支未创建 未上传问题 -->
<!-- 注意保持git干净不要有未合并merge、rebase等情况 -->

BIN
images/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -20,6 +20,7 @@
"email": "obkoro1@foxmail.com",
"url": "http://obkoro1.com/web_accumulate/"
},
"icon": "images/icon.png",
"galleryBanner": {
"color": "#3B4859",
"theme": "dark"
@ -63,6 +64,9 @@
"github commit",
"github autoCommit",
"git commit",
"自动提交",
"git 自动提交",
"github 自动提交",
"git",
"github",
"commit",

View File

@ -2,7 +2,7 @@
* Author : OBKoro1
* Date : 2019-12-30 16:59:30
* LastEditors : OBKoro1
* LastEditTime : 2020-01-02 14:18:36
* LastEditTime : 2020-01-02 16:22:22
* FilePath : /autoCommit/src/models/commitHandle.ts
* Description : commit
* https://github.com/OBKoro1
@ -49,13 +49,14 @@ class CommitHandle {
let index = this.timeArr.findIndex(element => {
return element.value === ele;
});
// 添加不存在的日期
if (index === -1) {
this.timeArr.push({
value: ele,
commitNumber: item.commitNumber
});
// 删除重复日期
if (index !== -1) {
this.timeArr.splice(index, 1);
}
this.timeArr.push({
value: ele,
commitNumber: item.commitNumber
});
});
});
this.sortTime();
@ -125,7 +126,7 @@ class CommitHandle {
});
});
} catch (err) {
continue; // 错误 退出本次循环
continue; // 错误 退出本次循环
}
} else {
// 模拟git提交