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

fix:优化

上级 308a35c6
...@@ -163,59 +163,62 @@ export default { ...@@ -163,59 +163,62 @@ export default {
// 如果有,则返回 B 数组中的对象,否则返回原对象 // 如果有,则返回 B 数组中的对象,否则返回原对象
return updatedItem ? updatedItem : item; return updatedItem ? updatedItem : item;
}); });
writeDeviceData(tmepList, userName) // writeDeviceData(tmepList, userName)
.then((res) => { // .then((res) => {
console.log("tmepList", tmepList); // console.log("tmepList", tmepList);
this.$store.commit("SET_DEVICEDATA", this.list); this.$store.commit("SET_DEVICEDATA", this.list);
console.log("arr", arr); console.log("arr", arr);
setTimeout(() => { 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;
uni.showToast({ uni.showToast({
title: error, title: "打包成功",
icon: "none", icon: "none",
duration: 2000, 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({ // .catch((error) => {
title: "打包失败", // this.loading = false;
icon: "none",
duration: 2000, // uni.showToast({
}); // title: error,
this.loading = false; // icon: "none",
}, 2 * 1000); // duration: 2000,
}); // });
// })
// .catch(() => {
// setTimeout(() => {
// uni.showToast({
// title: "打包失败",
// icon: "none",
// duration: 2000,
// });
// this.loading = false;
// }, 2 * 1000);
// });
}, },
// 打包文件 // 打包文件
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论