初步完成ai插件对接

This commit is contained in:
2026-08-26 22:10:04 +08:00
parent 26192167f3
commit f5176ada20
13 changed files with 4367 additions and 3540 deletions
+8
View File
@@ -3,6 +3,7 @@ import { useRoute } from 'vue-router';
import { defineStore } from 'pinia';
import { useLoading } from '@sa/hooks';
import { fetchGetUserInfo, fetchLogin } from '@/service/api';
import { setAiUser } from '@/service/api/ai';
import { useRouterPush } from '@/hooks/common/router';
import { localStg } from '@/utils/storage';
import { SetupStoreId } from '@/enum';
@@ -151,6 +152,13 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
// update store
Object.assign(userInfo, info);
// 同步 AI 插件用户身份(exchange 换 ai_token 用)
setAiUser({
platform_user_id: String(info.userId),
align_key: info.username,
display_name: info.username
});
return true;
}