From dd40769e3c2dac33693fa5765b216540a4ce5cf9 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期五, 07 六月 2024 15:56:55 +0800 Subject: [PATCH] feat:多产品称重页面修改 --- utils/status.js | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/utils/status.js b/utils/status.js index 0777b0f..e930f61 100644 --- a/utils/status.js +++ b/utils/status.js @@ -4,7 +4,8 @@ UsernameKey, SuccessRedirect, FailRedirect, - customerIdKey + customerIdKey, + nameKey } from './status.config.js'; const SetStorage = (key) => (value) => uni.setStorageSync(key, value); @@ -12,14 +13,17 @@ export const setToken = SetStorage(TokenKey); export const setRefreshToken = SetStorage(RefreshToken); export const setUsernameKey = SetStorage(UsernameKey); -export const setCustomerId = SetStorage(customerIdKey) +export const setCustomerId = SetStorage(customerIdKey); +export const setName = SetStorage(nameKey) export const redirectHome = (path) => { uni.switchTab({ url: path || SuccessRedirect }) } export const redirectLogin = (path) => { + let data=uni.getStorageSync('userList')?JSON.parse(uni.getStorageSync('userList')):[]; uni.clearStorageSync(); + uni.setStorageSync("userList", JSON.stringify(data)) uni.reLaunch({ url: path || FailRedirect }) -- Gitblit v1.9.1