feat: update auth flow and homepage behavior

This commit is contained in:
你çšnepiedg
2026-03-19 15:41:26 +08:00
parent ee4beaa7a0
commit 219a6f6231
5 changed files with 253 additions and 110 deletions
+13
View File
@@ -2,6 +2,19 @@ import { request } from './request'
import { MINI_PROGRAM_ID } from '@/config'
import { storage, SESSION_KEY, USER_KEY } from '@/utils/storage'
const H5_DEBUG_SESSION_KEY = 'o3dUk5QYaPdfMN9hBxeuouE0q63E'
export function applyH5DebugSession() {
let applied = false
// #ifdef H5
if (process.env.NODE_ENV === 'development' && !storage.get(SESSION_KEY)) {
storage.set(SESSION_KEY, H5_DEBUG_SESSION_KEY)
applied = true
}
// #endif
return applied
}
export async function login() {
return new Promise((resolve, reject) => {
uni.login({