From 1364cd5c217887b76505ebe8736d7fd7333afaaf Mon Sep 17 00:00:00 2001 From: JinxChen <2183691628@qq.com> Date: Thu, 8 Sep 2022 16:18:44 +0800 Subject: [PATCH 01/10] =?UTF-8?q?feat=20-=20=E5=A2=9E=E5=8A=A0=20=E6=B5=81?= =?UTF-8?q?=E9=87=8F=E7=BB=9F=E8=AE=A1=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 +++- src/layout/components/Sidebar/Logo.vue | 2 +- src/router/index.js | 26 ++++++++++- src/settings.js | 2 +- src/styles/index.scss | 2 +- src/utils/get-page-title.js | 2 +- src/utils/model.js | 4 +- src/views/dashboard/index.vue | 2 +- src/views/traffic-statistics/main/index.vue | 31 +++++++++++++ .../main/ssjl-statistics/index.vue | 43 +++++++++++++++++++ vue.config.js | 2 +- 11 files changed, 114 insertions(+), 10 deletions(-) create mode 100644 src/views/traffic-statistics/main/index.vue create mode 100644 src/views/traffic-statistics/main/ssjl-statistics/index.vue diff --git a/README.md b/README.md index 38364b3..39492a2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ @@ -66,3 +66,9 @@ fix `2022.8.8` feat - 增加 收单系统,众筹拼单系统,消息管理和系统管理路由配置 + + +## v1.0.1 +`2022.9.8` +feat +- 增加 流量统计功能 \ No newline at end of file diff --git a/src/layout/components/Sidebar/Logo.vue b/src/layout/components/Sidebar/Logo.vue index c5fd855..140eff7 100644 --- a/src/layout/components/Sidebar/Logo.vue +++ b/src/layout/components/Sidebar/Logo.vue @@ -31,7 +31,7 @@ export default { }, data() { return { - title: '用户运营管理系统', + title: '用户运营管理平台', logo: require('@/assets/telpo.png') } } diff --git a/src/router/index.js b/src/router/index.js index bfeb9a3..629953e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -72,6 +72,7 @@ export const constantRoutes = [{ component: Layout, redirect: '/collection-order-list', name: 'collection-order-system', + hidden: true, meta: { title: '收单系统', icon: 'el-icon-s-help' @@ -89,6 +90,29 @@ export const constantRoutes = [{ ] }, + // 流量统计 todo + { + path: '/traffic-statistics', + component: Layout, + redirect: '/ssjl-statistics', + name: 'traffic-statistics', + hidden: false, + meta: { + title: '流量统计', + icon: 'el-icon-data-line' + }, + children: [ + { + path: '/ssjl-statistics', + name: 'ssjl-statistics', + component: () => import('@/views/traffic-statistics/main/ssjl-statistics/index'), + meta: { + title: '家长端流量统计', //收单列表 + icon: 'el-icon-office-building' + } + }, + ] + }, // 众筹拼单系统 { path: 'crowd-funding-otrder-system', @@ -168,7 +192,7 @@ export const constantRoutes = [{ redirect: '/wechat-fans', name: 'message-manage', meta: { - title: '消息管理', + title: '消息发送系统', icon: 'el-icon-message-solid' }, children: [ diff --git a/src/settings.js b/src/settings.js index 905afee..1127141 100644 --- a/src/settings.js +++ b/src/settings.js @@ -7,7 +7,7 @@ */ module.exports = { - title: '用户运营管理系统', + title: '用户运营管理平台', /** * @type {boolean} true | false diff --git a/src/styles/index.scss b/src/styles/index.scss index 5f4c34a..ff00425 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -66,7 +66,7 @@ div:focus { height: 600px; position: relative; margin: 60px 20px 0 20px; - padding: 10px 0; + padding: 10px 10px; border: 1px solid #d8dce5; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04); .top-container { diff --git a/src/utils/get-page-title.js b/src/utils/get-page-title.js index 49a2787..daf98fc 100644 --- a/src/utils/get-page-title.js +++ b/src/utils/get-page-title.js @@ -7,7 +7,7 @@ */ import defaultSettings from '@/settings' -const title = defaultSettings.title || '用户运营管理系统' +const title = defaultSettings.title || '用户运营管理平台' export default function getPageTitle(pageTitle) { if (pageTitle) { diff --git a/src/utils/model.js b/src/utils/model.js index 7d0c27a..ac5b554 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-08-08 11:10:59 + * @LastEditTime: 2022-09-08 16:18:13 * @FilePath: \TelpoUserManageAdmin\src\utils\model.js * @description: 版本号 */ -export const VersionModel = '1.0.0'; +export const VersionModel = '1.0.1'; diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 0c83662..9796120 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -7,7 +7,7 @@ --> diff --git a/src/views/traffic-statistics/main/index.vue b/src/views/traffic-statistics/main/index.vue new file mode 100644 index 0000000..a01d72f --- /dev/null +++ b/src/views/traffic-statistics/main/index.vue @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/src/views/traffic-statistics/main/ssjl-statistics/index.vue b/src/views/traffic-statistics/main/ssjl-statistics/index.vue new file mode 100644 index 0000000..2a500ae --- /dev/null +++ b/src/views/traffic-statistics/main/ssjl-statistics/index.vue @@ -0,0 +1,43 @@ + + + + + + diff --git a/vue.config.js b/vue.config.js index 2a8528a..bdbdcae 100644 --- a/vue.config.js +++ b/vue.config.js @@ -6,7 +6,7 @@ function resolve(dir) { return path.join(__dirname, dir) } -const name = defaultSettings.title || '用户运营管理系统' // page title +const name = defaultSettings.title || '用户运营管理平台' // page title // If your port is set to 80, // use administrator privileges to execute the command line. From 77d72d577df4e34a1c9e4227557c3b73e546e31b Mon Sep 17 00:00:00 2001 From: JinxChen <2183691628@qq.com> Date: Fri, 9 Sep 2022 15:06:43 +0800 Subject: [PATCH 02/10] =?UTF-8?q?feat=20-=20=E5=A2=9E=E5=8A=A0=20=E7=BE=A4?= =?UTF-8?q?=E5=8F=91=E5=88=97=E8=A1=A8=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 +- src/router/index.js | 10 ++ src/styles/index.scss | 3 +- src/utils/model.js | 4 +- .../message-manage/main/mass-list/index.vue | 159 +++++++++++++++--- .../main/send-details/index.vue | 77 +++++++++ 6 files changed, 238 insertions(+), 25 deletions(-) create mode 100644 src/views/message-manage/main/send-details/index.vue diff --git a/README.md b/README.md index 39492a2..45471e5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ @@ -71,4 +71,10 @@ feat ## v1.0.1 `2022.9.8` feat -- 增加 流量统计功能 \ No newline at end of file +- 增加 流量统计功能 + + +## v1.0.2 +`2022.9.9` +feat +- 增加 群发列表功能 \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 629953e..4067651 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -235,6 +235,16 @@ export const constantRoutes = [{ icon: 'el-icon-document' } }, + { + path: '/send-details', + name: 'send-details', + component: () => import('@/views/message-manage/main/send-details/index'), + meta: { + title: '发送明细', + icon: 'el-icon-document' + }, + hidden: true + }, { path: '/unsubscribe-list', diff --git a/src/styles/index.scss b/src/styles/index.scss index ff00425..3bc4f31 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -64,6 +64,7 @@ div:focus { // main-container global css .home-container { height: 600px; + width: 100%; position: relative; margin: 60px 20px 0 20px; padding: 10px 10px; @@ -71,7 +72,7 @@ div:focus { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04); .top-container { display: inline-block; - padding: 0 20px 0 20px; + padding: 0 20px 0 0; span { font-size: 14px; } diff --git a/src/utils/model.js b/src/utils/model.js index ac5b554..215f2b6 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-08 16:18:13 + * @LastEditTime: 2022-09-09 15:05:38 * @FilePath: \TelpoUserManageAdmin\src\utils\model.js * @description: 版本号 */ -export const VersionModel = '1.0.1'; +export const VersionModel = '1.0.2'; diff --git a/src/views/message-manage/main/mass-list/index.vue b/src/views/message-manage/main/mass-list/index.vue index 6471cd3..f9158f4 100644 --- a/src/views/message-manage/main/mass-list/index.vue +++ b/src/views/message-manage/main/mass-list/index.vue @@ -1,38 +1,157 @@ diff --git a/src/views/message-manage/main/send-details/index.vue b/src/views/message-manage/main/send-details/index.vue new file mode 100644 index 0000000..58d15f3 --- /dev/null +++ b/src/views/message-manage/main/send-details/index.vue @@ -0,0 +1,77 @@ + + + + + + + From c20312ff401ef39ea22f4096096c43056ebfce43 Mon Sep 17 00:00:00 2001 From: JinxChen <2183691628@qq.com> Date: Thu, 15 Sep 2022 10:43:34 +0800 Subject: [PATCH 03/10] =?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=20-=20=E5=AF=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E6=9B=B4=E6=8D=A2=E4=B8=BA=20wanged?= =?UTF-8?q?itor/editor-for-vue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 ++++- package.json | 6 ++- src/utils/model.js | 4 +- .../main/add-articles/index.vue | 37 +++++++++++++++++-- 4 files changed, 47 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 45471e5..827c5b3 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ @@ -77,4 +77,10 @@ feat ## v1.0.2 `2022.9.9` feat -- 增加 群发列表功能 \ No newline at end of file +- 增加 群发列表功能 + +## v1.0.3 +`2022.9.14` +feat +- 添加文章 + - 富文本编辑器更换为 wangeditor/editor-for-vue \ No newline at end of file diff --git a/package.json b/package.json index f634d28..43b9a4a 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,8 @@ "test:ci": "npm run lint && npm run test:unit" }, "dependencies": { + "@wangeditor/editor": "^5.1.15", + "@wangeditor/editor-for-vue": "^1.0.1", "axios": "0.18.1", "core-js": "3.6.5", "element-ui": "2.13.2", @@ -23,7 +25,7 @@ "normalize.css": "7.0.0", "nprogress": "0.2.0", "path-to-regexp": "2.4.0", - "vue": "2.6.10", + "vue": "2.6.14", "vue-router": "3.0.6", "vuex": "3.1.0", "xlsx": "0.14.1" @@ -52,7 +54,7 @@ "serve-static": "1.13.2", "svg-sprite-loader": "4.1.3", "svgo": "1.2.2", - "vue-template-compiler": "2.6.10" + "vue-template-compiler": "2.6.14" }, "browserslist": [ "> 1%", diff --git a/src/utils/model.js b/src/utils/model.js index 215f2b6..8ed6a6e 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-09 15:05:38 + * @LastEditTime: 2022-09-14 09:05:54 * @FilePath: \TelpoUserManageAdmin\src\utils\model.js * @description: 版本号 */ -export const VersionModel = '1.0.2'; +export const VersionModel = '1.0.3'; diff --git a/src/views/message-manage/main/add-articles/index.vue b/src/views/message-manage/main/add-articles/index.vue index 18f6e1c..8c95661 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 @@ @@ -55,8 +55,23 @@ - + +
+ + +
@@ -70,10 +85,11 @@ + diff --git a/src/utils/model.js b/src/utils/model.js index 50cba47..eb1b14a 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-20 09:20:40 + * @LastEditTime: 2022-09-21 14:18:59 * @FilePath: \TelpoUserManageAdmin\src\utils\model.js * @description: 版本号 */ -export const VersionModel = '1.0.6'; +export const VersionModel = '1.0.7'; diff --git a/src/views/message-manage/main/add-mass/index.vue b/src/views/message-manage/main/add-mass/index.vue index c65a6ee..271dd16 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 @@ @@ -14,41 +14,26 @@ - - - - -

{{firstData}}

- -
- - -

消息类别{{keyword1Data}}

- -
- - -

通知用户{{keyword2Data}}

- -
- - -

通知内容{{keyword3Data}}

- -
- - -

{{remarkData}}

- + + + + + + + + + +

{{item.name}}

+ +
- - - - - + + + + @@ -68,14 +53,14 @@
-

{{form.first}}

-

消息类别:{{form.keyword1}}

-

通知用户:{{form.keyword2}}

-

通知内容:{{form.keyword3}}

-

更新时间:{{initUpdateTime}}

+

{{templateInput.first}}

+

+ {{item.name}}:{{item.value}} +

+

{{templateInput.remark}}

-
-

{{form.remark}}

+
+

详情

>

@@ -95,6 +80,16 @@ export default { name: 'add-mass', components: { }, data(){ + const checkUrl = (rule, value, callback) => { + let urlrReg = /^((https?|ftp):\/\/)?([\da-z.-]+)\.([a-z.]{2,6})(\/\w\.-]*)*\/?/; + if(urlrReg.test(value)) { + callback(); + } else if (this.form.articleId !== '') { + callback(); + } else { + callback(`请输入正确的网址`); + } + }; return { buttonList: [], // 头部按钮,例子: {name: '添加', type: 'primary', icon: 'el-icon-circle-plus', click: () => { this.AddDialog();}} firstData: '{{first.DATA}}:', @@ -113,6 +108,7 @@ export default { keyword2: '' /* || '财商36问' */, //更新内容 keyword3: '', remark: '' /* || '请点击内容查看详情' */, //内容详情 + tempId: '' || '-kOhlwJPhO7v3WW3rAdmNs76lR7ZpQEJtbVSY8Y35Eg', //模板id }, article: '', //选择文章 // 文章列表 @@ -128,12 +124,17 @@ export default { ], // 预览dialog previewShow: false, + // 要预览的页面字段 + previewData: [], // form验证 rules: { subject: [ { required: true, message: '请输入消息主题', trigger: 'blur' }, ], - first: [ + tempId: [ + { required: true, message: '请选择模板消息', trigger: 'blur' }, + ], + /* first: [ { required: true, message: '请填写消息模板内容', trigger: 'blur' }, ], keyword1: [ @@ -145,35 +146,70 @@ export default { keyword3: [ { required: true, message: '请填写消息模板内容', trigger: 'blur' }, ], - remark: [ + keyword4: [ { required: true, message: '请填写消息模板内容', trigger: 'blur' }, ], - messageSubject: [ + keyword5: [ { required: true, message: '请填写消息模板内容', trigger: 'blur' }, ], + remark: [ + { required: true, message: '请填写消息模板内容', trigger: 'blur' }, + ], */ articleContent: [ - { required: true, message: '请选择文章获取填写外部URL', trigger: 'blur' }, + { required: true, validator: checkUrl, message: '请输入正确的外部URL', trigger: 'blur' }, ], selfGroupId: [ { required: true, message: '请选择群发分组', trigger: 'blur' }, ], - } + }, + // 模板消息列表 + templateMsgList: [], + // 模板内容 + templateMsgCon: [ + { + key: 'first', + name: '{{first.DATA}}', + }, + { + key: 'keyword1', + name: '消息类别:{{keyword1.DATA}}', + }, + { + key: 'keyword2', + name: '通知用户:{{keyword2.DATA}}', + }, + { + key: 'keyword3', + name: '通知内容:{{keyword3.DATA}}', + }, + { + key: 'remark', + name: '{{remark.DATA}}' + } + ], + // 动态生成的input + templateInput: {}, + tempData: [] || [ + {first: 'first', remark: 'remark'} + ] } }, computed: { // 初始弹窗更新时间 initUpdateTime() { return initTime(new Date(), 'ymdhm'); //更新时间 - } + }, }, activated() { this.getSelfGroups(); this.getArticlesGroup(); + this.getTemplateMsgList(); }, mounted() { }, created() { this.getSelfGroups(); + this.getTemplateMsgList(); this.getArticlesGroup(); }, methods: { @@ -215,23 +251,39 @@ export default { }, // 查看白名单 onCheckList() {}, + // objectToArray + objectToArray(obj) { + let arr = []; + for(let i in obj) { + // arr.push (obj[i] ) //返回属性值 + arr.push(obj[i]) //返回键名 + }; + return arr; + }, // 立即发送 onSend() { + this.tempData.push(this.templateInput); + console.log("tempData", JSON.stringify(this.templateInput)); // 拼接所需字段 - let keywordStr = this.form.keyword1 + ',' + this.form.keyword2 + ',' + this.form.keyword3; let reqBody = { send_now: true, //true 是立即发送, false是保存 subject: this.form.subject, - template_id: '1', + template_id: this.form.tempId, self_group_id: this.form.selfGroupId, article_id: this.form.articleId || 0, - first: this.form.first, - remark: this.form.remark, - keyword: keywordStr, + mptemplate_content: JSON.stringify(this.templateInput), url: this.form.articleContent }; this.$refs['form'].validate((valid) => { if(valid) { + const isCanSave = this.checkTemplateInput(); + if(!isCanSave) { + this.$message({ + type: "error", + message: "请完善模板内容" + }); + return + } this.addGroupSender(reqBody, '群发'); } else { this.$message({ @@ -240,25 +292,43 @@ export default { }); } }); - //this.addGroupSender(reqBody); + }, + // 验证动态模板 + checkTemplateInput() { + console.log("templateInput", this.templateInput); + // 获取模板输入框的实际数量 + let tempInputLen = this.templateMsgCon.length; + console.log("tempInputLen", tempInputLen); + // 计算模板输入的数量 + let tempLen = (Object.keys(this.templateInput).length); + if( tempLen !== tempInputLen) { + return false + } else { + return true + } }, // 保存 onSave() { // 拼接所需字段 - let keywordStr = this.form.keyword1 + ',' + this.form.keyword2 + ',' + this.form.keyword3; let reqBody = { send_now: false, //true 是立即发送, false是保存 subject: this.form.subject, - template_id: '1', + template_id: this.form.tempId, self_group_id: this.form.selfGroupId, article_id: this.form.articleId || 0, - first: this.form.first, - remark: this.form.remark, - keyword: keywordStr, + mptemplate_content: JSON.stringify(this.templateInput), url: this.form.articleContent }; this.$refs['form'].validate((valid) => { if(valid) { + const isCanSave = this.checkTemplateInput(); + if(!isCanSave) { + this.$message({ + type: "error", + message: "请完善模板内容" + }); + return + } this.addGroupSender(reqBody, '保存'); } else { this.$message({ @@ -298,7 +368,20 @@ export default { }, // 预览 onPreview() { + const isCanSave = this.checkTemplateInput(); + if(!isCanSave) { + this.$message({ + type: "error", + message: "请先完善模板内容" + }); + return + } this.previewShow = true; + this.tempData.push(this.templateInput); + let previewArr = this.objectToArray(this.tempData[0]).slice(1, this.objectToArray(this.tempData[0]).length - 1); + this.previewData.forEach((value, index) => { + value['value'] = previewArr[index]; + }); }, // 预览确认 onConfirm() { @@ -321,6 +404,62 @@ export default { this.form.selfGroupId = value; console.log("选择的对象分组", value); } + }, + // 获取消息模板列表 + getTemplateMsgList() { + APIWechatFans.getTemplateMsgList() + .then(res => { + let telpData = res.data; + this.templateMsgList = telpData.map(item => { + return { + label: item.title, + value: item.template_id + } + }); + // 默认显示第一个模板id + this.getTemplateMsgListById(this.templateMsgList[0].value); + }) + }, + // 根据模板id获取对应模板消息 + getTemplateMsgListById(id) { + APIWechatFans.getTemplateById(id) + .then(res => { + console.log("res", res); + let data = res.data; + let splitData = data.content.split('\\n'); + this.templateMsgCon = splitData.map(item => { + return { + name: item, + key: item.substring( item.indexOf("{{") + 2, item.indexOf(".DATA")) + } + }); + this.previewData = splitData.splice(1, splitData.length - 2 ).map(item => { + return { + name: item.substring( 0, item.indexOf(":")), + key: item.substring( item.indexOf("{{") + 2, item.indexOf(".DATA")) + } + }); + }) + }, + // 选择模板消息 + onSelectTemp(value) { + console.log("选择了模板消息", value); + this.form.tempId = value; + this.templateInput = {}; + this.getTemplateMsgListById(value); + }, + // 清空url填写 + onClearUrl() { + this.form.articleContent = ''; + if( this.form.articleId ) { + this.form.articleId = ''; + } + }, + onClearSelect() { + this.form.articleContent = ''; + }, + onOpenUrl() { + window.open(this.form.articleContent); } } } @@ -381,6 +520,7 @@ export default { flex-direction: column; padding: 0 40px; border-bottom: 1px solid #d8dce5 ; + overflow-y: scroll; } .fot { width: 100%; @@ -388,6 +528,9 @@ export default { display: flex; justify-content: space-between; align-items: center; + &:hover { + cursor: pointer; + } } } .preview-btn { diff --git a/src/views/message-manage/main/mass-list/index.vue b/src/views/message-manage/main/mass-list/index.vue index 079c6b9..411834c 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 @@ @@ -20,7 +20,7 @@ /> 搜索
- + { console.log("res::", res); - this.dataList = res.data.rows; + this.dataList = res.data.rows.map(item => { + item.template_content = item.template_content ? JSON.parse(item.template_content).remark : ''; + return item + }); this.total = res.data.totals; }) }, @@ -176,13 +177,14 @@ export default { type: "success", message: "删除成功" }); + this.getGroupSender(); + } else { + this.$message({ + type: "error", + message: `删除失败!${error.message}` + }); } }) - }).catch(error => { - this.$message({ - type: "error", - message: `删除失败!${error.message}` - }); }) }, // 群发明细 @@ -220,8 +222,8 @@ export default { }, // 分页发生变化 pageChange() { - if (this.searchParams.keywords !== "") { - this.searchParams.keywords = ""; + if (this.searchParams.subject !== "") { + this.searchParams.subject = ""; this.getGroupSender(); } else { this.getGroupSender(); @@ -230,6 +232,11 @@ export default { // 群发明细发生变化 pageDetailsChange() { this.getGroupSenderDetails(this.massDetailsId); + }, + // 打开链接 + openUrl(value) { + window.open(value.url); + console.log("value", value.url); } } }; From 3202e9c08b1ece1fe0ede194a57048cbd5209e34 Mon Sep 17 00:00:00 2001 From: JinxChen <2183691628@qq.com> Date: Thu, 5 Jan 2023 14:53:55 +0800 Subject: [PATCH 10/10] =?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=8F=96=E6=B6=88=20=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=B8=BA=E7=A9=BA=E6=97=B6=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=A8=A1=E6=9D=BFid=20=20=20-=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=20=E6=AD=A3=E5=BC=8F=E7=8E=AF=E5=A2=83=E7=9A=84?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=9C=B0=E5=9D=80=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 11 ++++++++-- src/utils/model.js | 4 ++-- src/utils/request-wx-fans.js | 18 +++++++++++------ .../message-manage/main/add-mass/index.vue | 20 +++++++++---------- 4 files changed, 32 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index b25c4a0..8d2409e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ @@ -121,4 +121,11 @@ feat - 添加群发 - 增加 动态创建消息模板 - 群发列表 - - 修复 分页异常的问题 \ No newline at end of file + - 修复 分页异常的问题 + +## v1.0.8 +`2023.1.5` +feat +- 添加群发 + - 取消 模板列表为空时显示默认模板id + - 增加 正式环境的接口地址配置 \ No newline at end of file diff --git a/src/utils/model.js b/src/utils/model.js index eb1b14a..72a2d9d 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-21 14:18:59 + * @LastEditTime: 2022-12-12 11:35:33 * @FilePath: \TelpoUserManageAdmin\src\utils\model.js * @description: 版本号 */ -export const VersionModel = '1.0.7'; +export const VersionModel = '1.0.8'; diff --git a/src/utils/request-wx-fans.js b/src/utils/request-wx-fans.js index 034e603..8c6b982 100644 --- a/src/utils/request-wx-fans.js +++ b/src/utils/request-wx-fans.js @@ -1,7 +1,7 @@ /* * @Date: 2021-12-08 15:59:46 * @LastEditors: JinxChen - * @LastEditTime: 2022-09-15 17:30:14 + * @LastEditTime: 2023-01-05 14:53:02 * @FilePath: \TelpoUserManageAdmin\src\utils\request-wx-fans.js * @description: */ @@ -13,11 +13,17 @@ import store from '@/store' /* import { getToken } from '@/utils/auth' */ // create an axios instance +// 区分正式和测试环境,注意 :http://localhost:9528/ 是你本地项目的启动地址 +const currentUrl = window.location.href.split('#'); // 当前url,因项目部署方式不同,用当前url区分正式环境和测试环境 +const testUrlList = [ + 'http://ping.ssjlai.com', + 'http://localhost:9528' +]; +const proUrl = 'http://47.116.67.214:8766/api'; //正式环境接口地址 +const isTest = testUrlList.some(item => { return currentUrl[0].indexOf(item) > -1; }); const service = axios.create({ - baseURL: /* process.env.VUE_APP_BASE_API */'http://ping.ssjlai.com:8008/api/', // url = base url + request url - // withCredentials: true, // send cookies when cross-domain requests - /* timeout: 5000 */ // request timeout -}) + baseURL: process.env === 'test' || process.env === 'development' ? 'http://ping.ssjlai.com:8008/api/' : isTest ? 'http://ping.ssjlai.com:8008/api/': proUrl, +}); // request interceptor service.interceptors.request.use( @@ -27,7 +33,7 @@ service.interceptors.request.use( /* if (store.getters.token) { config.headers['AuthToken'] = store.getters.token; } */ - return config + return config; }, error => { // do something with request error diff --git a/src/views/message-manage/main/add-mass/index.vue b/src/views/message-manage/main/add-mass/index.vue index 271dd16..f8c7d54 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 @@ @@ -72,10 +72,8 @@