update:优化设备缓存逻辑
This commit is contained in:
@@ -16,7 +16,7 @@ import {
|
||||
|
||||
import useStore from "@/store";
|
||||
const store = useStore();
|
||||
const { updateUser, updateDevice, updateOnline } = store;
|
||||
const { updateUser, updateDevice, updateOnline, clearDevice } = store;
|
||||
|
||||
const props = defineProps({
|
||||
show: {
|
||||
@@ -107,6 +107,8 @@ async function doLogin() {
|
||||
);
|
||||
const data = await getDeviceBatteryAPI();
|
||||
updateOnline(data.online);
|
||||
} else {
|
||||
clearDevice();
|
||||
}
|
||||
props.onClose();
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user