This commit is contained in:
Archer
2023-10-30 13:26:42 +08:00
committed by GitHub
parent 008d0af010
commit 60ee160131
216 changed files with 4429 additions and 2229 deletions

View File

@@ -4,7 +4,7 @@ import type { ResLogin, PromotionRecordType } from '@/global/support/api/userRes
import { UserAuthTypeEnum } from '@/constants/common';
import { UserType, UserUpdateParams } from '@/types/user';
import type { PagingData, RequestPaging } from '@/types';
import { informSchema } from '@/types/mongoSchema';
import type { UserInformSchema } from '@fastgpt/global/support/user/type';
import { OAuthEnum } from '@/constants/user';
export const sendAuthCode = (data: {
@@ -71,7 +71,7 @@ export const loginOut = () => GET('/user/account/loginout');
export const putUserInfo = (data: UserUpdateParams) => PUT('/user/account/update', data);
export const getInforms = (data: RequestPaging) =>
POST<PagingData<informSchema>>(`/user/inform/list`, data);
POST<PagingData<UserInformSchema>>(`/user/inform/list`, data);
export const getUnreadCount = () => GET<number>(`/user/inform/countUnread`);
export const readInform = (id: string) => GET(`/user/inform/read`, { id });

View File

@@ -2,7 +2,7 @@ import { create } from 'zustand';
import { devtools, persist } from 'zustand/middleware';
import { immer } from 'zustand/middleware/immer';
import type { UserType, UserUpdateParams } from '@/types/user';
import { getMyModels, getModelById, putAppById } from '@/web/core/app/api';
import { getMyApps, getModelById, putAppById } from '@/web/core/app/api';
import { formatPrice } from '@fastgpt/global/common/bill/tools';
import { getTokenLogin, putUserInfo } from '@/web/support/user/api';
import { defaultApp } from '@/constants/model';
@@ -66,7 +66,7 @@ export const useUserStore = create<State>()(
myCollectionApps: [],
async loadMyApps(init = true) {
if (get().myApps.length > 0 && !init) return [];
const res = await getMyModels();
const res = await getMyApps();
set((state) => {
state.myApps = res;
});