mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-04-05 08:46:35 +08:00
- 在 Header Avatar 菜单新增翻牌活动(cardFlip)入口,并添加对应插槽 <card-flip-activity/> - 在 types/components.d.ts 中添加 CardFlipActivity 与 ElCollapseTransition 类型声明 - 在 .eslintrc-auto-import.json 中新增 ElMessage 与 ElMessageBox 自动导入 - 从 import_meta.d.ts 中移除 VITE_BUILD_COMPRESS 环境声明 - 在 YiAbpWebModule.cs 中添加相关 using 并保留数据库建表初始化的注释(CodeFirst.InitTables)
34 lines
914 B
TypeScript
34 lines
914 B
TypeScript
import { get, post } from '@/utils/request';
|
|
import type {
|
|
CardFlipStatusOutput,
|
|
FlipCardInput,
|
|
FlipCardOutput,
|
|
UseInviteCodeInput,
|
|
InviteCodeOutput
|
|
} from './types';
|
|
|
|
// 获取本周翻牌任务状态
|
|
export function getWeeklyTaskStatus() {
|
|
return get<CardFlipStatusOutput>('/card-flip/weekly-task-status').json();
|
|
}
|
|
|
|
// 翻牌
|
|
export function flipCard(data: FlipCardInput) {
|
|
return post<FlipCardOutput>('/card-flip/flip-card', data).json();
|
|
}
|
|
|
|
// 使用邀请码解锁翻牌次数
|
|
export function useInviteCode(data: UseInviteCodeInput) {
|
|
return post<void>('/card-flip/use-invite-code', data).json();
|
|
}
|
|
|
|
// 获取我的邀请码信息
|
|
export function getMyInviteCode() {
|
|
return get<InviteCodeOutput>('/card-flip/my-invite-code').json();
|
|
}
|
|
|
|
// 生成我的邀请码(如果没有)
|
|
export function generateMyInviteCode() {
|
|
return post<string>('/card-flip/generate-my-invite-code').json();
|
|
}
|