diff --git a/src/api/mall/product/spu.ts b/src/api/mall/product/spu.ts index c78bef47..5cc4d8fe 100644 --- a/src/api/mall/product/spu.ts +++ b/src/api/mall/product/spu.ts @@ -104,5 +104,5 @@ export const exportSpu = async (params) => { // 获得商品 SPU 精简列表 export const getSpuSimpleList = async () => { - return request.get({ url: '/product/spu/get-simple-list' }) + return request.get({ url: '/product/spu/list-all-simple' }) } diff --git a/src/api/mall/promotion/article/index.ts b/src/api/mall/promotion/article/index.ts new file mode 100644 index 00000000..c2941d05 --- /dev/null +++ b/src/api/mall/promotion/article/index.ts @@ -0,0 +1,47 @@ +import request from '@/config/axios' + +export interface ArticleVO { + id: number + categoryId: number + title: string + author: string + picUrl: string + introduction: string + browseCount: string + sort: number + status: number + spuId: number + recommendHot: boolean + recommendBanner: boolean + content: string +} + +// 查询文章管理列表 +export const getArticlePage = async (params) => { + return await request.get({ url: `/promotion/article/page`, params }) +} + +// 查询文章管理详情 +export const getArticle = async (id: number) => { + return await request.get({ url: `/promotion/article/get?id=` + id }) +} + +// 新增文章管理 +export const createArticle = async (data: ArticleVO) => { + return await request.post({ url: `/promotion/article/create`, data }) +} + +// 修改文章管理 +export const updateArticle = async (data: ArticleVO) => { + return await request.put({ url: `/promotion/article/update`, data }) +} + +// 删除文章管理 +export const deleteArticle = async (id: number) => { + return await request.delete({ url: `/promotion/article/delete?id=` + id }) +} + +// 导出文章管理 Excel +export const exportArticle = async (params) => { + return await request.download({ url: `/promotion/article/export-excel`, params }) +} diff --git a/src/api/mall/promotion/articleCategory/index.ts b/src/api/mall/promotion/articleCategory/index.ts index 5795a41b..2950d759 100644 --- a/src/api/mall/promotion/articleCategory/index.ts +++ b/src/api/mall/promotion/articleCategory/index.ts @@ -8,32 +8,37 @@ export interface ArticleCategoryVO { sort: number } -// 查询分类列表 +// 查询文章分类列表 export const getArticleCategoryPage = async (params) => { return await request.get({ url: `/promotion/article-category/page`, params }) } -// 查询分类详情 +// 查询文章分类精简信息列表 +export const getSimpleArticleCategoryList = async () => { + return await request.get({ url: `/promotion/article-category/list-all-simple` }) +} + +// 查询文章分类详情 export const getArticleCategory = async (id: number) => { return await request.get({ url: `/promotion/article-category/get?id=` + id }) } -// 新增分类 +// 新增文章分类 export const createArticleCategory = async (data: ArticleCategoryVO) => { return await request.post({ url: `/promotion/article-category/create`, data }) } -// 修改分类 +// 修改文章分类 export const updateArticleCategory = async (data: ArticleCategoryVO) => { return await request.put({ url: `/promotion/article-category/update`, data }) } -// 删除分类 +// 删除文章分类 export const deleteArticleCategory = async (id: number) => { return await request.delete({ url: `/promotion/article-category/delete?id=` + id }) } -// 导出分类 Excel +// 导出文章分类 Excel export const exportArticleCategory = async (params) => { return await request.download({ url: `/promotion/article-category/export-excel`, params }) } diff --git a/src/views/mall/promotion/article/ArticleForm.vue b/src/views/mall/promotion/article/ArticleForm.vue new file mode 100644 index 00000000..36fc1340 --- /dev/null +++ b/src/views/mall/promotion/article/ArticleForm.vue @@ -0,0 +1,236 @@ + + diff --git a/src/views/mall/promotion/articleCategory/ArticleCategoryForm.vue b/src/views/mall/promotion/article/category/ArticleCategoryForm.vue similarity index 98% rename from src/views/mall/promotion/articleCategory/ArticleCategoryForm.vue rename to src/views/mall/promotion/article/category/ArticleCategoryForm.vue index 4b7f2948..39b1fc0f 100644 --- a/src/views/mall/promotion/articleCategory/ArticleCategoryForm.vue +++ b/src/views/mall/promotion/article/category/ArticleCategoryForm.vue @@ -38,6 +38,8 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import * as ArticleCategoryApi from '@/api/mall/promotion/articleCategory' +defineOptions({ name: 'PromotionArticleCategoryForm' }) + const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 diff --git a/src/views/mall/promotion/articleCategory/index.vue b/src/views/mall/promotion/article/category/index.vue similarity index 99% rename from src/views/mall/promotion/articleCategory/index.vue rename to src/views/mall/promotion/article/category/index.vue index d201b3a3..32d385c3 100644 --- a/src/views/mall/promotion/articleCategory/index.vue +++ b/src/views/mall/promotion/article/category/index.vue @@ -135,7 +135,7 @@ import * as ArticleCategoryApi from '@/api/mall/promotion/articleCategory' import ArticleCategoryForm from './ArticleCategoryForm.vue' import { createImageViewer } from '@/components/ImageViewer' -defineOptions({ name: 'ArticleCategory' }) +defineOptions({ name: 'PromotionArticleCategory' }) const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 diff --git a/src/views/mall/promotion/article/index.vue b/src/views/mall/promotion/article/index.vue new file mode 100644 index 00000000..7f5f4b70 --- /dev/null +++ b/src/views/mall/promotion/article/index.vue @@ -0,0 +1,321 @@ + + +