feat(vue-app,flask): Vue 试验田全量对接与 Session 用户上下文统一
新增 vue-app(生成/收藏/历史/登录/优化/Android/饭菜/诗词/简历等),Flask 增加 user_context 并调整历史、生成、简历等路由;模板 base/generate 可访问性改进;补充部署说明与文档。 Made-with: Cursor
This commit is contained in:
17
vue-app/src/api/modules/history.ts
Normal file
17
vue-app/src/api/modules/history.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import client from '../client'
|
||||
import type { HistoryListResponse } from '../types/history'
|
||||
|
||||
export interface HistoryListQuery {
|
||||
page?: number
|
||||
per_page?: number
|
||||
search?: string
|
||||
sort?: string
|
||||
}
|
||||
|
||||
export function fetchHistoryList(params: HistoryListQuery) {
|
||||
return client.get<HistoryListResponse>('/api/history', { params }).then((r) => r.data)
|
||||
}
|
||||
|
||||
export function deleteHistoryItem(id: number) {
|
||||
return client.delete<{ success: boolean; message?: string }>(`/api/history/${id}`).then((r) => r.data)
|
||||
}
|
||||
Reference in New Issue
Block a user