diff --git a/src/api/community/miniappconfig/index.ts b/src/api/community/miniappconfig/index.ts new file mode 100644 index 0000000..d02dd41 --- /dev/null +++ b/src/api/community/miniappconfig/index.ts @@ -0,0 +1,54 @@ +import request from '@/config/axios' +import type {Dayjs} from 'dayjs'; + +/** 小程序配置信息 */ +export interface MiniAppConfig { + id: number; // 编号 + name?: string; // 功能名称 + icon: string; // 功能图标 + position?: number; // 显示位置(1-首页,2-更多服务) + sort?: number; // 排序(数字越小越靠前) + status?: number; // 是否显示(0-启用,1-禁用) + communityId?: number; // 小区ID + communityName: string; // 小区名称 + url: string; // 跳转链接 + remark: string; // 备注 + } + +// 小程序配置 API +export const MiniAppConfigApi = { + // 查询小程序配置分页 + getMiniAppConfigPage: async (params: any) => { + return await request.get({ url: `/community/mini-app-config/page`, params }) + }, + + // 查询小程序配置详情 + getMiniAppConfig: async (id: number) => { + return await request.get({ url: `/community/mini-app-config/get?id=` + id }) + }, + + // 新增小程序配置 + createMiniAppConfig: async (data: MiniAppConfig) => { + return await request.post({ url: `/community/mini-app-config/create`, data }) + }, + + // 修改小程序配置 + updateMiniAppConfig: async (data: MiniAppConfig) => { + return await request.put({ url: `/community/mini-app-config/update`, data }) + }, + + // 删除小程序配置 + deleteMiniAppConfig: async (id: number) => { + return await request.delete({ url: `/community/mini-app-config/delete?id=` + id }) + }, + + /** 批量删除小程序配置 */ + deleteMiniAppConfigList: async (ids: number[]) => { + return await request.delete({ url: `/community/mini-app-config/delete-list?ids=${ids.join(',')}` }) + }, + + // 导出小程序配置 Excel + exportMiniAppConfig: async (params) => { + return await request.download({ url: `/community/mini-app-config/export-excel`, params }) + } +} \ No newline at end of file diff --git a/src/utils/dict.ts b/src/utils/dict.ts index a88f989..981a68b 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -203,4 +203,5 @@ export enum DICT_TYPE { COMM_RELATION_TYPE = 'comm_relation_type', COMM_ID_TYPE = 'comm_id_type', COMM_BANNER_LOCATION = 'comm_banner_location', + COMM_MINI_APP_LOCATION = 'comm_mini_app_location' } diff --git a/src/views/community/miniappconfig/MiniAppConfigForm.vue b/src/views/community/miniappconfig/MiniAppConfigForm.vue new file mode 100644 index 0000000..6b5ec63 --- /dev/null +++ b/src/views/community/miniappconfig/MiniAppConfigForm.vue @@ -0,0 +1,214 @@ + + + diff --git a/src/views/community/miniappconfig/index.vue b/src/views/community/miniappconfig/index.vue new file mode 100644 index 0000000..27387b6 --- /dev/null +++ b/src/views/community/miniappconfig/index.vue @@ -0,0 +1,295 @@ + + +