修复上传时间错误的bug

This commit is contained in:
Peng-YM 2020-12-12 17:04:36 +08:00
parent 433fe5446f
commit a0d799c832

View File

@ -146,7 +146,7 @@ export default {
},
// eslint-disable-next-line no-unused-vars
sync(action) {
async sync(action) {
const setLoading = (status) => {
if (action === 'upload') {
this.status.uploading = status;
@ -164,10 +164,6 @@ export default {
axios.get(`/utils/backup?action=${action}`).then(resp => {
if (resp.data.status === 'success') {
this.$store.commit("SET_SUCCESS_MESSAGE", `${action === 'upload' ? "备份" : "还原"}成功!`);
if (action === 'upload') {
this.settings.syncTime = new Date().getTime();
}
axios.patch(`/settings`, this.settings);
this.updateStore(this.$store);
}
}).catch(err => {