修复已知问题

This commit is contained in:
2024-09-27 14:17:12 +08:00
parent c0328fa23e
commit 5e56c31300
299 changed files with 17512 additions and 987 deletions
+2
View File
@@ -13,6 +13,7 @@ export interface Ad {
path?: string;
images?: string;
userId?: number;
merchantId?: number;
sortNumber?: number;
comments?: string;
status?: number;
@@ -29,6 +30,7 @@ export interface AdParam extends PageParam {
adId?: string;
name?: number;
type?: number;
merchantId?: number;
adType?: string;
userId?: number;
}
+12 -1
View File
@@ -1,7 +1,8 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { CmsArticle, CmsArticleParam } from './model';
import { SERVER_API_URL } from '@/config/setting';
import { MODULES_API_URL, SERVER_API_URL } from "@/config/setting";
import type { ArticleParam } from "@/api/cms/article/model";
/**
* 分页查询文章
@@ -104,3 +105,13 @@ export async function getCmsArticle(id: number) {
}
return Promise.reject(new Error(res.data.message));
}
export async function getCount(params: ArticleParam) {
const res = await request.get(SERVER_API_URL + '/cms/cms-article/data', {
params
});
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
+11 -9
View File
@@ -1,14 +1,14 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { CmsArticleCategory, CmsArticleCategoryParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
import { SERVER_API_URL } from '@/config/setting';
/**
* 分页查询文章分类表
*/
export async function pageCmsArticleCategory(params: CmsArticleCategoryParam) {
const res = await request.get<ApiResult<PageResult<CmsArticleCategory>>>(
MODULES_API_URL + '/cms/cms-article-category/page',
SERVER_API_URL + '/cms/cms-article-category/page',
{
params
}
@@ -24,7 +24,7 @@ export async function pageCmsArticleCategory(params: CmsArticleCategoryParam) {
*/
export async function listCmsArticleCategory(params?: CmsArticleCategoryParam) {
const res = await request.get<ApiResult<CmsArticleCategory[]>>(
MODULES_API_URL + '/cms/cms-article-category',
SERVER_API_URL + '/cms/cms-article-category',
{
params
}
@@ -40,7 +40,7 @@ export async function listCmsArticleCategory(params?: CmsArticleCategoryParam) {
*/
export async function addCmsArticleCategory(data: CmsArticleCategory) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-article-category',
SERVER_API_URL + '/cms/cms-article-category',
data
);
if (res.data.code === 0) {
@@ -54,7 +54,7 @@ export async function addCmsArticleCategory(data: CmsArticleCategory) {
*/
export async function updateCmsArticleCategory(data: CmsArticleCategory) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-article-category',
SERVER_API_URL + '/cms/cms-article-category',
data
);
if (res.data.code === 0) {
@@ -68,7 +68,7 @@ export async function updateCmsArticleCategory(data: CmsArticleCategory) {
*/
export async function removeCmsArticleCategory(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-article-category/' + id
SERVER_API_URL + '/cms/cms-article-category/' + id
);
if (res.data.code === 0) {
return res.data.message;
@@ -79,9 +79,11 @@ export async function removeCmsArticleCategory(id?: number) {
/**
* 批量删除文章分类表
*/
export async function removeBatchCmsArticleCategory(data: (number | undefined)[]) {
export async function removeBatchCmsArticleCategory(
data: (number | undefined)[]
) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/cms/cms-article-category/batch',
SERVER_API_URL + '/cms/cms-article-category/batch',
{
data
}
@@ -97,7 +99,7 @@ export async function removeBatchCmsArticleCategory(data: (number | undefined)[]
*/
export async function getCmsArticleCategory(id: number) {
const res = await request.get<ApiResult<CmsArticleCategory>>(
MODULES_API_URL + '/cms/cms-article-category/' + id
SERVER_API_URL + '/cms/cms-article-category/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
@@ -46,6 +46,8 @@ export interface CmsArticleCategory {
createTime?: string;
// 修改时间
updateTime?: string;
value?: number;
label?: string;
}
/**
+28 -23
View File
@@ -4,46 +4,51 @@ import type { PageParam } from '@/api';
* 页面管理记录表
*/
export interface CmsDesign {
// ID
pageId?: number;
// 页面标题
name?: string;
// 所属栏目ID
categoryId?: number;
// 页面关键词
keywords?: string;
// 页面描述
description?: string;
// 缩列图
path?: string;
component?: string;
photo?: string;
// 购买链接
buyUrl?: string;
content?: string;
// 类型
type?: string;
categoryId?: number;
// 宽
width?: string;
// 高
height?: string;
// 页面样式
style?: string;
// 页面内容
content?: string;
// 是否开启布局
showLayout?: number;
// 页面布局
layout?: string;
// 上级id, 0是顶级
parentId?: number;
// 附件
images?: string;
// 用户ID
userId?: number;
// 设为首页
home?: number;
// 排序(数字越小越靠前)
// 排序
sortNumber?: number;
// 备注
comments?: string;
// 状态, 0正常, 1冻结
// 状态
status?: number;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 更新时间
updateTime?: string;
// 页面布局
layout?: string;
backgroundColor?: string;
// 关联网站导航ID
navigationId?: number;
showLayout?: boolean;
btn?: any[];
showBanner?: boolean;
buyUrl?: string;
demoUrl?: string;
account?: string;
docUrl?: string;
}
/**
+16
View File
@@ -2,6 +2,7 @@ import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { CmsNavigation, CmsNavigationParam } from './model';
import { SERVER_API_URL } from '@/config/setting';
import type { Navigation, NavigationParam } from '@/api/cms/navigation/model';
/**
* 分页查询网站导航记录表
@@ -35,6 +36,21 @@ export async function listCmsNavigation(params?: CmsNavigationParam) {
return Promise.reject(new Error(res.data.message));
}
/**
* 查询导航列表(树形结构)
*/
export async function treeNavigation(params?: NavigationParam) {
const res = await request.get<ApiResult<Navigation[]>>(
SERVER_API_URL + '/cms/cms-navigation/tree',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加网站导航记录表
*/
+1
View File
@@ -18,6 +18,7 @@ export interface CmsNavigation {
path?: string;
// 菜单组件地址, 目录可为空
component?: string;
componentPath?: string;
// 打开位置
target?: string;
// 菜单图标
+1 -1
View File
@@ -1,7 +1,7 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { CmsWebsite, CmsWebsiteParam } from './model';
import { MODULES_API_URL, SERVER_API_URL } from '@/config/setting';
import { SERVER_API_URL } from '@/config/setting';
/**
* 分页查询网站信息记录表
+1
View File
@@ -93,5 +93,6 @@ export interface CmsWebsite {
*/
export interface CmsWebsiteParam extends PageParam {
websiteId?: number;
status?: number;
keywords?: string;
}
+16
View File
@@ -35,6 +35,22 @@ export async function listNavigation(params?: NavigationParam) {
return Promise.reject(new Error(res.data.message));
}
/**
* 查询导航列表(树形结构)
*/
export async function treeNavigation(params?: NavigationParam) {
const res = await request.get<ApiResult<Navigation[]>>(
MODULES_API_URL + '/cms/navigation/tree',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加导航
*/