From 8d393fe44e9da7b57be3eb48dd09f91f9264c3c6 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期一, 05 八月 2024 18:16:12 +0800 Subject: [PATCH] fix:司机去除操作指引 --- utils/status.js | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-) diff --git a/utils/status.js b/utils/status.js index 0777b0f..13a5c5e 100644 --- a/utils/status.js +++ b/utils/status.js @@ -4,7 +4,9 @@ UsernameKey, SuccessRedirect, FailRedirect, - customerIdKey + BaFailRedirect, + customerIdKey, + nameKey } from './status.config.js'; const SetStorage = (key) => (value) => uni.setStorageSync(key, value); @@ -12,19 +14,32 @@ 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 }) } +export const redirectabLogin = (path) => { + let data=uni.getStorageSync('userList')?JSON.parse(uni.getStorageSync('userList')):[]; + uni.clearStorageSync(); + uni.setStorageSync("userList", JSON.stringify(data)) + uni.reLaunch({ + url: path || BaFailRedirect + }) +} + + // 鑾峰彇鐢ㄦ埛鐘舵�� export const getStatesOne = (key) => uni.getStorageSync(key); -- Gitblit v1.9.1