diff --git a/.env.development b/.env.development index aa39b41..013ec41 100644 --- a/.env.development +++ b/.env.development @@ -1,11 +1,11 @@ VITE_APP_NAME=后台管理系统 VITE_SOCKET_URL=wss://server.gxwebsoft.com -VITE_SERVER_URL=https://server.gxwebsoft.com/api +#VITE_SERVER_URL=https://server.gxwebsoft.com/api VITE_THINK_URL=https://gxtyzx-api.websoft.top/api #VITE_API_URL=https://modules.gxwebsoft.com/api -#VITE_SERVER_URL=http://127.0.0.1:9090/api +VITE_SERVER_URL=http://127.0.0.1:9090/api VITE_API_URL=http://127.0.0.1:9001/api #VITE_THINK_URL=http://127.0.0.1:9099/api #/booking/bookingItem diff --git a/src/api/cms/article/model/index.ts b/src/api/cms/article/model/index.ts index 0486f45..7a725af 100644 --- a/src/api/cms/article/model/index.ts +++ b/src/api/cms/article/model/index.ts @@ -14,6 +14,8 @@ export interface Article { showType?: any; // 文章类型 categoryId?: number; + // 栏目名称 + categoryName?: string; // 封面图 image?: string; // 附件 @@ -63,6 +65,7 @@ export interface ArticleParam extends PageParam { title?: string; articleId?: number; categoryId?: number; + navigationId?: number; status?: string; sortNumber?: string; createTime?: string; @@ -72,3 +75,10 @@ export interface ArticleParam extends PageParam { // 商户编号 merchantCode?: string; } + +export interface ArticleCount { + totalNum?: number; + totalNum2?: number; + totalNum3?: number; + totalNum4?: number; +} diff --git a/src/api/cms/components/index.ts b/src/api/cms/components/index.ts new file mode 100644 index 0000000..ed23b38 --- /dev/null +++ b/src/api/cms/components/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { Components, ComponentsParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询组件 + */ +export async function pageComponents(params: ComponentsParam) { + const res = await request.get>>( + MODULES_API_URL + '/cms/components/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询组件列表 + */ +export async function listComponents(params?: ComponentsParam) { + const res = await request.get>( + MODULES_API_URL + '/cms/components', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加组件 + */ +export async function addComponents(data: Components) { + const res = await request.post>( + MODULES_API_URL + '/cms/components', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改组件 + */ +export async function updateComponents(data: Components) { + const res = await request.put>( + MODULES_API_URL + '/cms/components', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除组件 + */ +export async function removeComponents(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/cms/components/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除组件 + */ +export async function removeBatchComponents(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/cms/components/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询组件 + */ +export async function getComponents(id: number) { + const res = await request.get>( + MODULES_API_URL + '/cms/components/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/cms/components/model/index.ts b/src/api/cms/components/model/index.ts new file mode 100644 index 0000000..5728e85 --- /dev/null +++ b/src/api/cms/components/model/index.ts @@ -0,0 +1,43 @@ +import type { PageParam } from '@/api'; + +/** + * 组件 + */ +export interface Components { + // ID + id?: number; + // 组件标题 + title?: string; + // 关联导航ID + navigationId?: number; + // 组件类型 + type?: string; + // 页面关键词 + keywords?: string; + // 页面描述 + description?: string; + // 组件路径 + path?: string; + // 组件图标 + icon?: string; + // 用户ID + userId?: number; + // 排序(数字越小越靠前) + sortNumber?: number; + // 备注 + comments?: string; + // 状态, 0正常, 1冻结 + status?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; +} + +/** + * 组件搜索条件 + */ +export interface ComponentsParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/src/api/cms/design/model/index.ts b/src/api/cms/design/model/index.ts index e95325f..ac97be8 100644 --- a/src/api/cms/design/model/index.ts +++ b/src/api/cms/design/model/index.ts @@ -39,6 +39,7 @@ export interface Design { backgroundColor?: string; // 关联网站导航ID navigationId?: number; + buyUrl?: string; } /** @@ -49,4 +50,5 @@ export interface DesignParam extends PageParam { name?: number; type?: number; userId?: number; + navigationId?: number; } diff --git a/src/api/cms/designRecord/index.ts b/src/api/cms/designRecord/index.ts new file mode 100644 index 0000000..c5e1e88 --- /dev/null +++ b/src/api/cms/designRecord/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { DesignRecord, DesignRecordParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询页面组件表 + */ +export async function pageDesignRecord(params: DesignRecordParam) { + const res = await request.get>>( + MODULES_API_URL + '/cms/design-record/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询页面组件表列表 + */ +export async function listDesignRecord(params?: DesignRecordParam) { + const res = await request.get>( + MODULES_API_URL + '/cms/design-record', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加页面组件表 + */ +export async function addDesignRecord(data: DesignRecord) { + const res = await request.post>( + MODULES_API_URL + '/cms/design-record', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改页面组件表 + */ +export async function updateDesignRecord(data: DesignRecord) { + const res = await request.put>( + MODULES_API_URL + '/cms/design-record', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除页面组件表 + */ +export async function removeDesignRecord(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/cms/design-record/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除页面组件表 + */ +export async function removeBatchDesignRecord(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/cms/design-record/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询页面组件表 + */ +export async function getDesignRecord(id: number) { + const res = await request.get>( + MODULES_API_URL + '/cms/design-record/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/cms/designRecord/model/index.ts b/src/api/cms/designRecord/model/index.ts new file mode 100644 index 0000000..b0ad4cd --- /dev/null +++ b/src/api/cms/designRecord/model/index.ts @@ -0,0 +1,45 @@ +import type { PageParam } from '@/api'; + +/** + * 页面组件表 + */ +export interface DesignRecord { + // ID + id?: number; + // 关联导航ID + navigationId?: number; + // 组件 + title?: string; + // 组件标识 + dictCode?: string; + // 组件样式 + styles?: string; + // 页面关键词 + keywords?: string; + // 页面描述 + description?: string; + // 页面路由地址 + path?: string; + // 缩列图 + photo?: string; + // 用户ID + userId?: number; + // 排序(数字越小越靠前) + sortNumber?: number; + // 备注 + comments?: string; + // 状态, 0正常, 1冻结 + status?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; +} + +/** + * 页面组件表搜索条件 + */ +export interface DesignRecordParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/src/api/cms/navigation/model/index.ts b/src/api/cms/navigation/model/index.ts index 1c2d8a4..bf3d60c 100644 --- a/src/api/cms/navigation/model/index.ts +++ b/src/api/cms/navigation/model/index.ts @@ -13,6 +13,8 @@ export interface Navigation { hide?: number; home?: number; position?: number; + top?: number; + bottom?: number; meta?: string; children?: Navigation[]; disabled?: boolean; @@ -39,4 +41,5 @@ export interface NavigationParam { path?: string; authority?: string; parentId?: number; + navigationId?: number; } diff --git a/src/api/cms/website/model/index.ts b/src/api/cms/website/model/index.ts index ffc4614..1826153 100644 --- a/src/api/cms/website/model/index.ts +++ b/src/api/cms/website/model/index.ts @@ -31,6 +31,7 @@ export interface Website { icpNo?: string; policeNo?: string; comments?: string; + statusText?: string; sortNumber?: number; createTime?: string; disabled?: boolean; diff --git a/src/api/system/dictionary-data/index.ts b/src/api/system/dictionary-data/index.ts index 9eb786f..cc951d3 100644 --- a/src/api/system/dictionary-data/index.ts +++ b/src/api/system/dictionary-data/index.ts @@ -8,7 +8,7 @@ import { SERVER_API_URL } from '@/config/setting'; */ export async function pageDictionaryData(params: DictionaryDataParam) { const res = await request.get>>( - SERVER_API_URL + '/system/dict-data/page', + SERVER_API_URL + '/system/dictionary-data/page', { params } ); if (res.data.code === 0) { @@ -22,7 +22,7 @@ export async function pageDictionaryData(params: DictionaryDataParam) { */ export async function listDictionaryData(params: DictionaryDataParam) { const res = await request.get>( - SERVER_API_URL + '/system/dict-data', + SERVER_API_URL + '/system/dictionary-data', { params } ); if (res.data.code === 0 && res.data.data) { @@ -36,7 +36,7 @@ export async function listDictionaryData(params: DictionaryDataParam) { */ export async function addDictionaryData(data: DictionaryData) { const res = await request.post>( - SERVER_API_URL + '/system/dict-data', + SERVER_API_URL + '/system/dictionary-data', data ); if (res.data.code === 0) { @@ -50,7 +50,7 @@ export async function addDictionaryData(data: DictionaryData) { */ export async function updateDictionaryData(data: DictionaryData) { const res = await request.put>( - SERVER_API_URL + '/system/dict-data', + SERVER_API_URL + '/system/dictionary-data', data ); if (res.data.code === 0) { @@ -64,7 +64,7 @@ export async function updateDictionaryData(data: DictionaryData) { */ export async function removeDictionaryData(id?: number) { const res = await request.delete>( - SERVER_API_URL + '/system/dict-data/' + id + SERVER_API_URL + '/system/dictionary-data/' + id ); if (res.data.code === 0) { return res.data.message; @@ -77,7 +77,7 @@ export async function removeDictionaryData(id?: number) { */ export async function removeDictionaryDataBatch(data: (number | undefined)[]) { const res = await request.delete>( - SERVER_API_URL + '/system/dict-data/batch', + SERVER_API_URL + '/system/dictionary-data/batch', { data } ); if (res.data.code === 0) { diff --git a/src/components/SelectDictDictionary/components/select-data.vue b/src/components/SelectDictDictionary/components/select-data.vue new file mode 100644 index 0000000..532f2c4 --- /dev/null +++ b/src/components/SelectDictDictionary/components/select-data.vue @@ -0,0 +1,146 @@ + + + + diff --git a/src/components/SelectDictDictionary/index.vue b/src/components/SelectDictDictionary/index.vue new file mode 100644 index 0000000..b8394b9 --- /dev/null +++ b/src/components/SelectDictDictionary/index.vue @@ -0,0 +1,65 @@ + + + diff --git a/src/components/SelectFile/index.vue b/src/components/SelectFile/index.vue index ba37cb8..af277cc 100644 --- a/src/components/SelectFile/index.vue +++ b/src/components/SelectFile/index.vue @@ -10,9 +10,11 @@