chore(mobile-h5): add existing H5 app sources to the monorepo
Track the weighbridge mobile-h5 codebase (excluding node_modules, dist, and local .env) so subsequent adaptation tasks can evolve it in-repo. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
f8f9c0ceff
commit
a4b13fa2bc
91 files changed
+15791
No files matched your search
@@ -0,0 +1,45 @@
|
||||
import request from '@/utils/http'
|
||||
import { PaginationResult, BaseResult } from '@/types/axios'
|
||||
import { ArticleType, ArticleCategoryType } from './model/articleModel'
|
||||
|
||||
// 文章
|
||||
export class ArticleService {
|
||||
// 获取文章列表
|
||||
static getArticleList(params: any) {
|
||||
const { page, size, searchVal, year } = params
|
||||
return request.get<PaginationResult<ArticleType[]>>({
|
||||
url: `/api/articles/${page}/${size}?title=${searchVal}&year=${year}`
|
||||
})
|
||||
}
|
||||
|
||||
// 获取文章类型
|
||||
static getArticleTypes(params: object) {
|
||||
return request.get<BaseResult<ArticleCategoryType[]>>({
|
||||
url: '/api/articles/types',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 获取文章详情
|
||||
static getArticleDetail(id: number) {
|
||||
return request.get<BaseResult<ArticleType>>({
|
||||
url: `/api/articles/${id}`
|
||||
})
|
||||
}
|
||||
|
||||
// 新增文章
|
||||
static addArticle(params: any) {
|
||||
return request.post<BaseResult>({
|
||||
url: '/api/articles/',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
// 编辑文章
|
||||
static editArticle(id: number, params: any) {
|
||||
return request.put<BaseResult>({
|
||||
url: `/api/articles/${id}`,
|
||||
data: params
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user