fix: 修复登录拒绝也存token

This commit is contained in:
duanshuwen
2025-09-25 19:11:42 +08:00
parent 86c87b2cc4
commit f3d84c9349
4 changed files with 21 additions and 13 deletions

View File

@@ -8,13 +8,13 @@ import { useAppStore } from "@/store";
import { clientId } from "@/constant/base";
import { NOTICE_EVENT_LOGIN_SUCCESS } from "@/constant/constant";
const loginAuth = () => {
const loginAuth = (e) => {
uni.setStorageSync("token", "");
const appStore = useAppStore();
appStore.setHasToken(false);
return new Promise(async (resolve, reject) => {
const openIdCode = await getWeChatAuthCode();
const openIdCode = await getWeChatAuthCode(e);
console.log("获取到的微信授权code:", openIdCode);
const params = {
openIdCode: [openIdCode],