提交 e668fcc7 authored 作者: caodi\cd's avatar caodi\cd

fix:优化

上级 308a35c6
......@@ -163,59 +163,62 @@ export default {
// 如果有,则返回 B 数组中的对象,否则返回原对象
return updatedItem ? updatedItem : item;
});
writeDeviceData(tmepList, userName)
.then((res) => {
console.log("tmepList", tmepList);
this.$store.commit("SET_DEVICEDATA", this.list);
console.log("arr", arr);
setTimeout(() => {
uni.showToast({
title: "打包成功",
icon: "none",
duration: 2000,
});
this.close();
this.loading = false;
let length = tmepList.length;
// 生成日志
const logContent = getLogContent(
LOG_TYPE_ENUM.sys,
`${length}张照同步`,
"同步"
);
const log_list = this.$store.state.log_list;
log_list.push(logContent);
this.$store.commit("SET_LOG_LIST", log_list);
addLog(log_list).then(() => {});
// 更新同步时间
this.updateSysTime();
// this.getDetails();
}, 2 * 1000,
uni.navigateTo({
url: "/pages/listingManagement/index?backValue=home",
}));
})
.catch((error) => {
this.loading = false;
// writeDeviceData(tmepList, userName)
// .then((res) => {
// console.log("tmepList", tmepList);
this.$store.commit("SET_DEVICEDATA", this.list);
console.log("arr", arr);
setTimeout(
() => {
uni.showToast({
title: error,
title: "打包成功",
icon: "none",
duration: 2000,
});
this.close();
this.loading = false;
let length = tmepList.length;
// 生成日志
const logContent = getLogContent(
LOG_TYPE_ENUM.sys,
`${length}张照同步`,
"同步"
);
const log_list = this.$store.state.log_list;
log_list.push(logContent);
this.$store.commit("SET_LOG_LIST", log_list);
addLog(log_list).then(() => {});
// 更新同步时间
this.updateSysTime();
// this.getDetails();
},
2 * 1000,
uni.navigateTo({
url: "/pages/listingManagement/index?backValue=home",
})
.catch(() => {
setTimeout(() => {
uni.showToast({
title: "打包失败",
icon: "none",
duration: 2000,
});
this.loading = false;
}, 2 * 1000);
});
);
// })
// .catch((error) => {
// this.loading = false;
// uni.showToast({
// title: error,
// icon: "none",
// duration: 2000,
// });
// })
// .catch(() => {
// setTimeout(() => {
// uni.showToast({
// title: "打包失败",
// icon: "none",
// duration: 2000,
// });
// this.loading = false;
// }, 2 * 1000);
// });
},
// 打包文件
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论