feat: 更新微信小程序登录流程和演示环境配置

This commit is contained in:
Ray.Hao
2026-03-05 16:57:54 +08:00
parent 67ada6263b
commit 5bf7f0561f
11 changed files with 137 additions and 64 deletions

View File

@@ -44,10 +44,10 @@ export const useUserStore = defineStore("user", () => {
});
};
// 微信小程序登录(个人小程序)
// 微信小程序静默登录
const loginByWechatMiniapp = (code: string) => {
return new Promise((resolve, reject) => {
AuthAPI.wechatMiniappLogin(code)
AuthAPI.wechatMiniappSilentLogin(code)
.then((data) => {
if (data.accessToken) {
setAccessToken(data.accessToken);