From 4c43d093278eb3a7c8457df69be2209196266627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E4=B8=BD=E5=90=9B?= <664953382@qq.com> Date: Mon, 26 Jul 2021 14:41:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E8=AE=AF=E5=BF=AB=E6=8A=A5=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/modules/accountManagement.js | 2 +- src/router/modules/customerManagement.js | 2 +- src/router/modules/customerService.js | 2 +- src/utils/editor.js | 6 +++-- src/views/policy/library/add.vue | 34 ++++++++++++++++++++---- 5 files changed, 36 insertions(+), 10 deletions(-) diff --git a/src/router/modules/accountManagement.js b/src/router/modules/accountManagement.js index ad95309..33f6dc7 100644 --- a/src/router/modules/accountManagement.js +++ b/src/router/modules/accountManagement.js @@ -9,7 +9,7 @@ const nestedRouter = { path: 'account', component: resolve => require(['@/views/account/index'], resolve), name: '账号管理', - meta: { title: '账号管理', noCache: true, affix: true } + meta: { title: '账号管理' } } ] }; diff --git a/src/router/modules/customerManagement.js b/src/router/modules/customerManagement.js index d95607b..a617a38 100644 --- a/src/router/modules/customerManagement.js +++ b/src/router/modules/customerManagement.js @@ -9,7 +9,7 @@ const nestedRouter = { path: 'customer', component: resolve => require(['@/views/customer/index'], resolve), name: '客户管理', - meta: { title: '客户管理', noCache: true, affix: true } + meta: { title: '客户管理' } } ] }; diff --git a/src/router/modules/customerService.js b/src/router/modules/customerService.js index 28e4edf..e12ef46 100644 --- a/src/router/modules/customerService.js +++ b/src/router/modules/customerService.js @@ -9,7 +9,7 @@ const nestedRouter = { path: 'service', component: resolve => require(['@/views/service/index'], resolve), name: '客服中心', - meta: { title: '客服中心', noCache: true, affix: true } + meta: { title: '客服中心' } } ] }; diff --git a/src/utils/editor.js b/src/utils/editor.js index fc03154..45ea86f 100644 --- a/src/utils/editor.js +++ b/src/utils/editor.js @@ -3,12 +3,14 @@ export function formatRichText(url) { console.log(src); for (let i = 0; i < src.length; i++) { const string = src[i].getAttribute('src'); - src[i].setAttribute('src', url + string); + const flag = string.includes('http://'); + if (!flag) src[i].setAttribute('src', url + string); } let src2 = document.querySelectorAll('#text .ql-editor a'); for (let i = 0; i < src2.length; i++) { const string = src2[i].getAttribute('href'); - src2[i].setAttribute('href', url + string); + const flag = string.includes('http://'); + if (!flag) src2[i].setAttribute('href', url + string); } // console.log(document.querySelectorAll('#text .ql-editor a')); // var imgReg = /|\/>)/gi; diff --git a/src/views/policy/library/add.vue b/src/views/policy/library/add.vue index e7b7b98..5553a7b 100644 --- a/src/views/policy/library/add.vue +++ b/src/views/policy/library/add.vue @@ -10,10 +10,18 @@ label-width="80px" > - + - + - + - +
- + 确定 @@ -178,3 +195,10 @@ export default { } }; +