diff --git a/src/api/sytopic/module/index.js b/src/api/sytopic/module/index.js new file mode 100644 index 0000000..1759507 --- /dev/null +++ b/src/api/sytopic/module/index.js @@ -0,0 +1,106 @@ +import request from '@/utils/request'; + +/** + * 分页查询模块 + * @param params 查询条件 + */ +export async function pageSyTopicModule(params) { + const res = await request.get('/sytopic/module/page', { + params + }); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加专题 + * @param data + */ +export async function addTopicModule(data) { + const res = await request.post('/sytopic/module', data); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改专题 + * @param data + */ +export async function updateTopicModule(data) { + const res = await request.put('/sytopic/module', data); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除 + * @param ids id集合 + */ +export async function removeTopicModule(ids) { + const res = await request.delete('/sytopic/module/delete', { + data: { ids } + }); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 获取类型列表 + */ +export async function pageTopicModuleTypes(params) { + const res = await request.get('/sytopic/module/types', { + params + }); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 分页查询模块配置项 + * @param params 查询条件 + */ +export async function pageSyTopicModuleOptions(params) { + const res = await request.get('/sytopic/module/options', { + params + }); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加专题配置项 + * @param data + */ +export async function addTopicModuleOptions(data) { + const res = await request.post('/sytopic/module/options', data); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除模块配置 + * @param id id + */ +export async function removeTopicModuleOption(id) { + const res = await request.delete('/sytopic/module/options', { + data: { id } + }); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/sytopic/sytopic/index.js b/src/api/sytopic/sytopic/index.js new file mode 100644 index 0000000..3298d44 --- /dev/null +++ b/src/api/sytopic/sytopic/index.js @@ -0,0 +1,69 @@ +import request from '@/utils/request'; + +/** + * 分页查询专题 + * @param params 查询条件 + */ +export async function pageSyTopic(params) { + const res = await request.get('/sytopic/topic/page', { + params + }); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加专题 + * @param data + */ +export async function addTopic(data) { + const res = await request.post('/sytopic/topic', data); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改专题 + * @param data + */ +export async function updateTopic(data) { + const res = await request.put('/sytopic/topic', data); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改活动状态 + * @param id 专题id + * @param status 状态 + */ +export async function updateTopicStatus(id, status) { + const res = await request.put('/sytopic/topic/status', { + id, + status + }); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除 + * @param ids id集合 + */ +export async function removeTopic(ids) { + const res = await request.delete('/sytopic/topic/delete', { + data: { ids } + }); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/components/UploadImg/index.vue b/src/components/UploadImg/index.vue new file mode 100644 index 0000000..62bd53d --- /dev/null +++ b/src/components/UploadImg/index.vue @@ -0,0 +1,108 @@ + + + + + + diff --git a/src/views/sytopic/module/components/module-edit.vue b/src/views/sytopic/module/components/module-edit.vue new file mode 100644 index 0000000..4e0e630 --- /dev/null +++ b/src/views/sytopic/module/components/module-edit.vue @@ -0,0 +1,152 @@ + + + + + + + + + + {{ item }} + + + + + + 数值越大越靠前面 + + + + 取消 + + 保存 + + + + + + + diff --git a/src/views/sytopic/module/components/module-option-edit.vue b/src/views/sytopic/module/components/module-option-edit.vue new file mode 100644 index 0000000..0356ec8 --- /dev/null +++ b/src/views/sytopic/module/components/module-option-edit.vue @@ -0,0 +1,315 @@ + + + + + + {{ item.title }} + + + + 新增 + + + + + + + + + + + + + + + + + + + + + + + 否 + 是 + + + + + + + + + 居中 + 底部 + + + + + + + 0不限制 + + + + + + + + + + + + + + + + + + + + + + + 取消 + + 保存 + + + + + + + diff --git a/src/views/sytopic/module/index.vue b/src/views/sytopic/module/index.vue new file mode 100644 index 0000000..74478ba --- /dev/null +++ b/src/views/sytopic/module/index.vue @@ -0,0 +1,257 @@ + + + + + {{ title }}-模块配置 + + + + + + 新建 + + + 删除 + + + + + {{ row.options }} + + + + + 内容配置 + + + 修改 + + + + + 删除 + + + + + + + + + + + + + diff --git a/src/views/sytopic/sytopic/components/sytopic-edit.vue b/src/views/sytopic/sytopic/components/sytopic-edit.vue new file mode 100644 index 0000000..84ed740 --- /dev/null +++ b/src/views/sytopic/sytopic/components/sytopic-edit.vue @@ -0,0 +1,454 @@ + + + + + + + + + + + + + + + + + + 建议尺寸750*340 + + + + 建议尺寸200X200 + + + + + 尺寸宽度750,二维码尺寸160X160,二维码位置(距离底部80,距离右边40) + + + + + + + + 新增分享文案 + + + + + + + + 取消 + + 保存 + + + + + + + diff --git a/src/views/sytopic/sytopic/index.vue b/src/views/sytopic/sytopic/index.vue new file mode 100644 index 0000000..7f14336 --- /dev/null +++ b/src/views/sytopic/sytopic/index.vue @@ -0,0 +1,312 @@ + + + + + + + + + + + + + + + 查询 + + 重置 + + + + + + + + + + 新建 + + + 删除 + + + + + + + + + + dropClick(command, row)"> + + 修改 + + + + + 修改专题 + 模块配置 + + + + + + + 删除 + + + + + + + + + + + +