From 8bc2aa30d3e228dd407b5e7a07f413b291138e85 Mon Sep 17 00:00:00 2001 From: JinxChen <2183691628@qq.com> Date: Sat, 17 Sep 2022 16:55:27 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat=20-=20=E6=B7=BB=E5=8A=A0=E6=96=87?= =?UTF-8?q?=E7=AB=A0=20=20=20-=20=E5=A2=9E=E5=8A=A0=20=E5=AF=8C=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E4=B8=80=E4=BA=9B=E5=9F=BA=E6=9C=AC=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 15 ++++++- src/main.js | 6 +-- .../main/add-articles/index.vue | 39 ++++++++++++++++++- 3 files changed, 53 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 827c5b3..3f2d2f3 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ @@ -83,4 +83,15 @@ feat `2022.9.14` feat - 添加文章 - - 富文本编辑器更换为 wangeditor/editor-for-vue \ No newline at end of file + - 富文本编辑器更换为 wangeditor/editor-for-vue + + +## v1.0.4 +`2022.9.17` +feat +- 添加文章 + - 增加 富文本一些基本配置 +- 添加群发 + - 增加 接口对接 +- 群发列表 + - 增加 接口对接 \ No newline at end of file diff --git a/src/main.js b/src/main.js index 0178848..f657f76 100644 --- a/src/main.js +++ b/src/main.js @@ -1,8 +1,8 @@ /* * @Date: 2021-11-30 15:35:16 * @LastEditors: JinxChen - * @LastEditTime: 2022-08-06 10:25:02 - * @FilePath: \telpoAdminTemplate\src\main.js + * @LastEditTime: 2022-09-17 15:12:15 + * @FilePath: \TelpoUserManageAdmin\src\main.js * @description: */ import Vue from 'vue' @@ -10,7 +10,7 @@ import Vue from 'vue' import 'normalize.css/normalize.css' // A modern alternative to CSS resets import ElementUI from 'element-ui' -import 'element-ui/lib/theme-chalk/index.css' +import 'element-ui/lib/theme-chalk/index.css'; /* import locale from 'element-ui/lib/locale/lang/en' */ // lang i18n import '@/styles/index.scss' // global css diff --git a/src/views/message-manage/main/add-articles/index.vue b/src/views/message-manage/main/add-articles/index.vue index 8c95661..d2d6bae 100644 --- a/src/views/message-manage/main/add-articles/index.vue +++ b/src/views/message-manage/main/add-articles/index.vue @@ -1,7 +1,7 @@ @@ -70,6 +70,12 @@ :defaultConfig="editorConfig" :mode="mode" @onCreated="onCreated" + @onChange="onChange" + @onDestroyed="onDestroyed" + @onMaxLength="onMaxLength" + @onFocus="onFocus" + @onBlur="onBlur" + @customPaste="customPaste" /> @@ -113,8 +119,16 @@ export default { fileList: [], editor: null, toolbarConfig: { }, - editorConfig: { placeholder: '请输入内容...' }, mode: 'default', // or 'simple' + // 菜单配置 + editorConfig: { + MENU_CONF: { + uploadImage: { + server: '', //上传图片地址 todo 待后端提供 + + } + } + } } }, @@ -132,6 +146,27 @@ export default { onCreated(editor) { this.editor = Object.seal(editor) // 一定要用 Object.seal() ,否则会报错 }, + onChange(editor) { console.log('onChange', editor.children) }, + onDestroyed(editor) { console.log('onDestroyed', editor) }, + onMaxLength(editor) { console.log('onMaxLength', editor) }, + onFocus(editor) { console.log('onFocus', editor) }, + onBlur(editor) { console.log('onBlur', editor) }, + customPaste(editor, event, callback) { + console.log('ClipboardEvent 粘贴事件对象', event) + // const html = event.clipboardData.getData('text/html') // 获取粘贴的 html + // const text = event.clipboardData.getData('text/plain') // 获取粘贴的纯文本 + // const rtf = event.clipboardData.getData('text/rtf') // 获取 rtf 数据(如从 word wsp 复制粘贴) + + // 自定义插入内容 + editor.insertText('') + + // 返回 false ,阻止默认粘贴行为 + event.preventDefault() + callback(false) // 返回值(注意,vue 事件的返回值,不能用 return) + + // 返回 true ,继续默认的粘贴行为 + // callback(true) + }, // 清空本地上传的图片列表 clearFiles() {}, // 删除上传的图片 From 6234cc0ce489b9ffa9355b446a036b858c172c1f Mon Sep 17 00:00:00 2001 From: JinxChen <2183691628@qq.com> Date: Sat, 17 Sep 2022 16:58:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat=20-=20=E6=B7=BB=E5=8A=A0=E7=BE=A4?= =?UTF-8?q?=E5=8F=91=20=20=20-=20=E5=A2=9E=E5=8A=A0=20=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5=20-=20=E7=BE=A4=E5=8F=91=E5=88=97=E8=A1=A8?= =?UTF-8?q?=20=20=20-=20=E5=A2=9E=E5=8A=A0=20=E6=8E=A5=E5=8F=A3=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wechat-fans.js | 67 +++++ src/components/TTable/TTable.vue | 7 +- src/utils/model.js | 4 +- src/utils/request-wx-fans.js | 78 +++++ .../message-manage/main/add-mass/index.vue | 269 ++++++++++++++---- .../message-manage/main/mass-list/index.vue | 135 +++++++-- 6 files changed, 469 insertions(+), 91 deletions(-) create mode 100644 src/api/wechat-fans.js create mode 100644 src/utils/request-wx-fans.js diff --git a/src/api/wechat-fans.js b/src/api/wechat-fans.js new file mode 100644 index 0000000..c1492ac --- /dev/null +++ b/src/api/wechat-fans.js @@ -0,0 +1,67 @@ +/* + * @Date: 2022-09-15 16:40:39 + * @LastEditors: JinxChen + * @LastEditTime: 2022-09-17 16:34:33 + * @FilePath: \TelpoUserManageAdmin\src\api\wechat-fans.js + * @description: + */ +import requestWxFans from '@/utils/request-wx-fans'; +export const APIWechatFans = { + SelfGroups, //获取自定义分组 + getGroupSender, //获取群发列表 + addGroupSender, //添加模板消息群发 + getArticlesGroup, //获取文章列表 + getGroupSenderDetails, //获取单个群发记录 + deleteGroupSender, //删除单个群发记录 +}; +export default APIWechatFans; + + +function SelfGroups(data) { + return requestWxFans({ + url: '/SelfGroups', + method: 'get', + params: data, + }); +} + +function getGroupSender(data) { + return requestWxFans({ + url: '/GroupSender', + method: 'get', + params: data, + }); +} + +function getArticlesGroup(data) { + return requestWxFans({ + url: '/Articles', + method: 'get', + params: data, + }); +} + +function addGroupSender(params) { + return requestWxFans({ + url: '/GroupSender', + method: 'post', + data: params, + }); +} + + +function getGroupSenderDetails(data) { + return requestWxFans({ + url: '/GroupSender/detail', + method: 'get', + params: data, + }); +} + +function deleteGroupSender(data) { + return requestWxFans({ + url: '/GroupSender', + method: 'delete', + params: data, + }); +} diff --git a/src/components/TTable/TTable.vue b/src/components/TTable/TTable.vue index 9e25196..ec524b9 100644 --- a/src/components/TTable/TTable.vue +++ b/src/components/TTable/TTable.vue @@ -1,14 +1,14 @@