diff --git a/src/api/mp/template/index.ts b/src/api/mp/template/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..8d3e168ba4eb5505fc348fab459aac5cbe721c65 --- /dev/null +++ b/src/api/mp/template/index.ts @@ -0,0 +1,115 @@ +import request from '@/config/axios' + +// 消息模板 VO +export interface MsgTemplateVO { + id: number // 主键 + appId: string // appid + templateId: string // 公众号模板ID + name: string // 模版名称 + title: string // 标题 + content: string // 模板内容 + data: string // 消息内容 + url: string // 链接 + //miniprogram: string // 小程序信息 + miniProgramAppId: string + miniProgramPagePath: string + isRemoved: number + configId: number + templateType: number + status: number // 是否有效 +} + +// 消息模板 API +export const MsgTemplateApi = { + // 查询消息模板分页 + getMsgTemplatePage: async (params: any) => { + return await request.get({ url: `/mp/template/page`, params }) + }, + + // 查询消息模板详情 + getMsgTemplate: async (id: number) => { + return await request.get({ url: `/mp/template/get?id=` + id }) + }, + + // 新增消息模板 + createMsgTemplate: async (data: MsgTemplateVO) => { + return await request.post({ url: `/mp/template/create`, data }) + }, + + // 修改消息模板 + updateMsgTemplate: async (data: MsgTemplateVO) => { + return await request.put({ url: `/mp/template/update`, data }) + }, + + // 删除消息模板 + deleteMsgTemplate: async (id: number) => { + return await request.delete({ url: `/mp/template/delete?id=` + id }) + }, + + // 导出消息模板 Excel + exportMsgTemplate: async (params) => { + return await request.download({ url: `/mp/template/export-excel`, params }) + }, + + // 同步公众号模板 + syncMsgTemplate: async (params: any) => { + return await request.get({ url: `/mp/template/syncMsgTemplate`,params}) + }, + + // 同步公众号模板 + sendMsgBatch: async (data: any) => { + return await request.post({ url: `/mp/template/sendMsgBatch`,data}) + }, + + deleteList: async (data: any) => { + return await request.delete({ url: `/mp/template/delete-list`,data}) + }, +} + +// 微信模版消息发送记录 VO +export interface MsgTemplateLogVO { + id: number // 主键 + appId: string // appId + toUser: string // 用户openid + templateId: string // 公众号模板ID + data: string // 消息内容 + url: string // 链接 + miniProgramAppId: string // 小程序appid + miniProgramPagePath: string // 小程序页面路径 + sendTime: Date // 发送时间 + sendStatus: string // 发送状态 0成功,1失败 + sendResult: string // 发送结果 +} + +// 微信模版消息发送记录 API +export const MsgTemplateLogApi = { + // 查询微信模版消息发送记录分页 + getMsgTemplateLogPage: async (params: any) => { + return await request.get({ url: `/mp/template/log/page`, params }) + }, + + // 查询微信模版消息发送记录详情 + getMsgTemplateLog: async (id: number) => { + return await request.get({ url: `/mp/template/log/get?id=` + id }) + }, + + // 新增微信模版消息发送记录 + createMsgTemplateLog: async (data: MsgTemplateLogVO) => { + return await request.post({ url: `/mp/template/log/create`, data }) + }, + + // 修改微信模版消息发送记录 + updateMsgTemplateLog: async (data: MsgTemplateLogVO) => { + return await request.put({ url: `/mp/template/log/update`, data }) + }, + + // 删除微信模版消息发送记录 + deleteMsgTemplateLog: async (id: number) => { + return await request.delete({ url: `/mp/template/log/delete?id=` + id }) + }, + + // 导出微信模版消息发送记录 Excel + exportMsgTemplateLog: async (params) => { + return await request.download({ url: `/mp/template/log/export-excel`, params }) + }, +} \ No newline at end of file diff --git a/src/views/mp/template/MsgTemplate.vue b/src/views/mp/template/MsgTemplate.vue new file mode 100644 index 0000000000000000000000000000000000000000..da64475992fa89826aada60076daea5df99c7446 --- /dev/null +++ b/src/views/mp/template/MsgTemplate.vue @@ -0,0 +1,333 @@ + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + + + + 重置 + + + + + 同步模板 + + + + 导出 + + + + + + 推送消息 + + + + + + 批量删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 配置 + + + 删除 + + + + + + + + + + + + + + diff --git a/src/views/mp/template/MsgTemplateForm.vue b/src/views/mp/template/MsgTemplateForm.vue new file mode 100644 index 0000000000000000000000000000000000000000..77d31830ae6ce3fac4d3887e7e553a6052bb5161 --- /dev/null +++ b/src/views/mp/template/MsgTemplateForm.vue @@ -0,0 +1,335 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ dict.label }} + + + + + + + + + + + + + + + + + {{ item.name }} + + + + + + + + + + + + + + + + + + 确 定 + 取 消 + + + + + + + diff --git a/src/views/mp/template/MsgTemplateLog.vue b/src/views/mp/template/MsgTemplateLog.vue new file mode 100644 index 0000000000000000000000000000000000000000..e3fd9234c1766de1050be08b6ea13d3a1243c85a --- /dev/null +++ b/src/views/mp/template/MsgTemplateLog.vue @@ -0,0 +1,214 @@ + + + + + + + + + + + + + + + + + + + + + 搜索 + + + + 重置 + + + + + 导出 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 删除 + + + + + + + + + + + + + diff --git a/src/views/mp/template/MsgTemplateLogForm.vue b/src/views/mp/template/MsgTemplateLogForm.vue new file mode 100644 index 0000000000000000000000000000000000000000..1266806f554cf3ba1086d00e4db62320072d9fcf --- /dev/null +++ b/src/views/mp/template/MsgTemplateLogForm.vue @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 请选择字典生成 + + + + + + + + 确 定 + 取 消 + + + + \ No newline at end of file diff --git a/src/views/mp/template/MsgTemplateSend.vue b/src/views/mp/template/MsgTemplateSend.vue new file mode 100644 index 0000000000000000000000000000000000000000..286be80e9e90d4e1268c659927ff84f2434dc851 --- /dev/null +++ b/src/views/mp/template/MsgTemplateSend.vue @@ -0,0 +1,82 @@ + + + 已选择{{ + multipleSelection.length > 0 ? multipleSelection + .length : total + }}个用户 + + + + 推 送 + 取 消 + + + + + + + diff --git a/src/views/mp/user/index.vue b/src/views/mp/user/index.vue index 772018e808341b39a9d3c99605bbe234bdfa0b88..431e1c6ba55af214fa3ef7f4cd5c39c9af7ce908 100644 --- a/src/views/mp/user/index.vue +++ b/src/views/mp/user/index.vue @@ -11,7 +11,7 @@ label-width="68px" > - + - + + - + @@ -105,20 +106,24 @@