diff --git a/README.md b/README.md index 3f2d2f3..d1d204d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ @@ -94,4 +94,12 @@ feat - 添加群发 - 增加 接口对接 - 群发列表 - - 增加 接口对接 \ No newline at end of file + - 增加 接口对接 + + +## v1.0.5 +`2022.9.19` +fix +- 添加群发 +- 群发列表 + - 修改 接口数据结构 diff --git a/src/api/wechat-fans.js b/src/api/wechat-fans.js index c1492ac..8e4062f 100644 --- a/src/api/wechat-fans.js +++ b/src/api/wechat-fans.js @@ -1,7 +1,7 @@ /* * @Date: 2022-09-15 16:40:39 * @LastEditors: JinxChen - * @LastEditTime: 2022-09-17 16:34:33 + * @LastEditTime: 2022-09-19 16:50:23 * @FilePath: \TelpoUserManageAdmin\src\api\wechat-fans.js * @description: */ @@ -50,18 +50,17 @@ function addGroupSender(params) { } -function getGroupSenderDetails(data) { +function getGroupSenderDetails(subject_id, data) { return requestWxFans({ - url: '/GroupSender/detail', + url: `/GroupSender/${subject_id}/details`, method: 'get', params: data, }); } -function deleteGroupSender(data) { +function deleteGroupSender(id) { return requestWxFans({ - url: '/GroupSender', + url: `/GroupSender/${id}`, method: 'delete', - params: data, }); } diff --git a/src/router/index.js b/src/router/index.js index 4067651..409c5cc 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -203,7 +203,8 @@ export const constantRoutes = [{ meta: { title: '公众号粉丝', icon: 'el-icon-user-solid' - } + }, + hidden: true }, { @@ -213,7 +214,8 @@ export const constantRoutes = [{ meta: { title: '添加文章', icon: 'el-icon-edit' - } + }, + hidden: true }, { @@ -253,7 +255,8 @@ export const constantRoutes = [{ meta: { title: '退订列表', icon: 'el-icon-notebook-2' - } + }, + hidden: true }, ] diff --git a/src/utils/model.js b/src/utils/model.js index aabcb9b..6991ce6 100644 --- a/src/utils/model.js +++ b/src/utils/model.js @@ -1,8 +1,8 @@ /* * @Date: 2021-11-30 15:09:25 * @LastEditors: JinxChen - * @LastEditTime: 2022-09-17 14:58:22 + * @LastEditTime: 2022-09-19 16:18:49 * @FilePath: \TelpoUserManageAdmin\src\utils\model.js * @description: 版本号 */ -export const VersionModel = '1.0.4'; +export const VersionModel = '1.0.5'; diff --git a/src/views/message-manage/main/add-mass/index.vue b/src/views/message-manage/main/add-mass/index.vue index 8bbfb29..6f41d41 100644 --- a/src/views/message-manage/main/add-mass/index.vue +++ b/src/views/message-manage/main/add-mass/index.vue @@ -1,7 +1,7 @@ @@ -176,7 +176,7 @@ export default { APIWechatFans.SelfGroups(reqBody) .then(res => { let data = res.data; - this.groupList = data.map(item => { + this.groupList = data.rows.map(item => { return { label: item.name, value: item.id @@ -195,7 +195,7 @@ export default { .then(res => { let data = res.data; console.log("文章data", data); - this.articleList = data.map(item => { + this.articleList = data.rows.map(item => { return { label: item.title, value: item.id @@ -214,10 +214,11 @@ export default { subject: this.form.subject, template_id: '1', self_group_id: this.form.selfGroupId, - article_id: this.form.articleId, + article_id: this.form.articleId || 0, first: this.form.first, remark: this.form.remark, - keyword: keywordStr + keyword: keywordStr, + url: this.form.articleContent }; this.$refs['form'].validate((valid) => { if(valid) { @@ -240,10 +241,11 @@ export default { subject: this.form.subject, template_id: '1', self_group_id: this.form.selfGroupId, - article_id: this.form.articleId, + article_id: this.form.articleId || 0, first: this.form.first, remark: this.form.remark, - keyword: keywordStr + keyword: keywordStr, + url: this.form.articleContent }; this.$refs['form'].validate((valid) => { if(valid) { diff --git a/src/views/message-manage/main/mass-list/index.vue b/src/views/message-manage/main/mass-list/index.vue index dd9bddd..fab7f97 100644 --- a/src/views/message-manage/main/mass-list/index.vue +++ b/src/views/message-manage/main/mass-list/index.vue @@ -1,7 +1,7 @@ @@ -86,13 +86,13 @@ export default { title: "操作", fixed: "right", actions: [ - { + /* { fnName: "update", title: "修改", type: "primary", icon: "el-icon-edit", size: "small" - }, + }, */ { fnName: "delete", title: "删除", @@ -111,9 +111,9 @@ export default { ] } ], - total: 10, + total: 0, isDetailsShow: false, - detailsTotal: 10, + detailsTotal: 0, detailsParams: { page: 1, limit: 10 @@ -142,8 +142,8 @@ export default { APIWechatFans.getGroupSender(reqBody) .then(res => { console.log("res::", res); - this.dataList = res.data; - + this.dataList = res.data.rows; + this.total = res.data.totals; }) }, // 搜索 @@ -165,12 +165,9 @@ export default { cancelButtonText: "取消", type: "warning" }).then(() => { - let reqBody = { - id: value.id - } - APIWechatFans.deleteGroupSender(reqBody) + APIWechatFans.deleteGroupSender(value.id) .then(res => { - if(res.code === 0) { + if(res.code === 20000) { this.$message({ type: "success", message: "删除成功" @@ -194,18 +191,18 @@ export default { // 获取单个群发明细 getGroupSenderDetails(id) { let reqBody = { - subject_id: id, page_index: 1, page_size: 10, }; - APIWechatFans.getGroupSenderDetails(reqBody) + APIWechatFans.getGroupSenderDetails(id,reqBody) .then(res => { console.log("res", res); if(res.data !== null) { - this.detailsDataList = res.data.map(item => { + this.detailsDataList = res.data.rows.map(item => { item.status = item.status === 1 ? '发送成功' : '发送失败'; return item }); + this.detailsTotal = res.data.totals; } else { this.errorMessage = res.message; }