添加后台清缓存的处理

This commit is contained in:
kron
2025-12-03 16:46:07 +08:00
parent d9ac803902
commit a9156e57ca
4 changed files with 9 additions and 2 deletions

View File

@@ -29,7 +29,12 @@ watch(
}
);
function emitUpdateUser(value) {
updateUser(value);
}
onShow(() => {
uni.$on("update-user", emitUpdateUser);
const token = uni.getStorageSync(
`${uni.getAccountInfoSync().miniProgram.envVersion}_token`
);
@@ -42,6 +47,7 @@ onShow(() => {
});
onHide(() => {
uni.$off("update-user", emitUpdateUser);
websocket.closeWebSocket();
});
</script>