From d0c34858e362d7b3ed34532b9ae79fab7edae80a Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 12 Feb 2022 10:36:37 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E5=B8=82=E5=8C=97=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=88=86=E6=94=AF-=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production.uat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.production.uat b/.env.production.uat index 14457f27..689ae107 100644 --- a/.env.production.uat +++ b/.env.production.uat @@ -1,4 +1,4 @@ NODE_ENV=production -VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api +VUE_APP_API_SERVER = http://120.27.18.76:/api VUE_APP_NODE_ENV=prod:uat VUE_APP_PUBLIC_PATH=epmet-oper \ No newline at end of file From 3f998f5145ec68352892bb7889481910441e0e71 Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 12 Feb 2022 10:47:48 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E5=B8=82=E5=8C=97=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=88=86=E6=94=AF-=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production.uat | 2 +- public/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.production.uat b/.env.production.uat index 689ae107..0e4ab2af 100644 --- a/.env.production.uat +++ b/.env.production.uat @@ -1,4 +1,4 @@ NODE_ENV=production -VUE_APP_API_SERVER = http://120.27.18.76:/api +VUE_APP_API_SERVER = http://120.27.18.76/api VUE_APP_NODE_ENV=prod:uat VUE_APP_PUBLIC_PATH=epmet-oper \ No newline at end of file diff --git a/public/index.html b/public/index.html index 9e19414c..b2020bc6 100644 --- a/public/index.html +++ b/public/index.html @@ -57,7 +57,7 @@ <% if (process.env.VUE_APP_NODE_ENV==='prod:uat' ) { %> <% } %> From ed370aa041b9c9f8566945124fe57de4fac1042c Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Sun, 13 Feb 2022 15:05:28 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E5=85=BC=E5=AE=B9iframe=E5=B5=8C=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 2 +- .../ren-process-detail/src/ren-process-detail.vue | 2 +- src/i18n/index.js | 2 +- src/js/ajax.js | 6 +++--- src/main.js | 4 +++- src/mixins/view-module.js | 2 +- src/utils/request.js | 6 +++--- src/views/modules/activiti/model.vue | 4 ++-- src/views/modules/activiti/process-deploy.vue | 2 +- src/views/modules/activiti/process-initiation.vue | 2 +- src/views/modules/activiti/process.vue | 2 +- src/views/modules/message/mail-template-add-or-update.vue | 2 +- src/views/modules/oss/oss-upload.vue | 2 +- src/views/modules/sys/news-add-or-update.vue | 2 +- src/views/pages/index.vue | 2 +- src/views/pages/login copy.vue | 2 +- src/views/pages/login.vue | 4 ++-- 17 files changed, 25 insertions(+), 23 deletions(-) diff --git a/src/App.vue b/src/App.vue index 6226e0aa..dbd953b1 100644 --- a/src/App.vue +++ b/src/App.vue @@ -19,7 +19,7 @@ export default { methods: { i18nHandle (val, oldVal) { - Cookies.set('language', val) + localStorage.setItem('language', val) document.querySelector('html').setAttribute('lang', val) document.title = messages[val].brand.lg // 非登录页面,切换语言刷新页面 diff --git a/src/components/ren-process-detail/src/ren-process-detail.vue b/src/components/ren-process-detail/src/ren-process-detail.vue index 5eef7dfd..0d0bfe91 100644 --- a/src/components/ren-process-detail/src/ren-process-detail.vue +++ b/src/components/ren-process-detail/src/ren-process-detail.vue @@ -69,7 +69,7 @@ export default { // 获取流程(xml/image)url地址 getResourceURL () { var params = qs.stringify({ - 'token': Cookies.get('token'), + 'token': localStorage.getItem('token'), 'processInstanceId': this.dataForm.processInstanceId }) return `${window.SITE_CONFIG['apiURL']}/activiti/his/getInstImage?${params}` diff --git a/src/i18n/index.js b/src/i18n/index.js index 27bb7533..2491efa4 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -29,6 +29,6 @@ export const messages = { } export default new VueI18n({ - locale: Cookies.get('language') || 'zh-CN', + locale: localStorage.getItem('language') || 'zh-CN', messages }) diff --git a/src/js/ajax.js b/src/js/ajax.js index e8f95dc0..d147c4d8 100644 --- a/src/js/ajax.js +++ b/src/js/ajax.js @@ -45,9 +45,9 @@ function endLoading () { */ axios.interceptors.request.use( (config) => { - config.headers['Accept-Language'] = Cookies.get('language') || 'zh-CN' - config.headers['token'] = Cookies.get('token') || '' - config.headers['Authorization'] = Cookies.get('token') || '' + config.headers['Accept-Language'] = localStorage.getItem('language') || 'zh-CN' + config.headers['token'] = localStorage.getItem('token') || '' + config.headers['Authorization'] = localStorage.getItem('token') || '' // 默认参数 var defaults = {} // 防止缓存,GET请求默认带_t参数 diff --git a/src/main.js b/src/main.js index 05b7580e..6d65da32 100644 --- a/src/main.js +++ b/src/main.js @@ -33,7 +33,9 @@ import getQueryPara from "dai-js/modules/getQueryPara"; // 兼容token传参登录 if (getQueryPara("token")) { console.log('token', getQueryPara("token")); - Cookies.set("token", getQueryPara("token")); + localStorage.setItem("token", getQueryPara("token")); + console.log('token222222', localStorage.getItem('token')); + } window.app = Object.assign( diff --git a/src/mixins/view-module.js b/src/mixins/view-module.js index cfc165b3..f881711c 100644 --- a/src/mixins/view-module.js +++ b/src/mixins/view-module.js @@ -142,7 +142,7 @@ export default { // 导出 exportHandle () { var params = qs.stringify({ - 'token': Cookies.get('token'), + 'token': localStorage.getItem('token'), ...this.dataForm }) window.location.href = `${window.SITE_CONFIG['apiURL']}${this.mixinViewModuleOptions.exportURL}?${params}` diff --git a/src/utils/request.js b/src/utils/request.js index 419f83ec..d51a48a9 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -15,9 +15,9 @@ const http = axios.create({ * 请求拦截 */ http.interceptors.request.use(config => { - config.headers['Accept-Language'] = Cookies.get('language') || 'zh-CN' - config.headers['token'] = Cookies.get('token') || '' - config.headers['Authorization'] = Cookies.get('token') || '' + config.headers['Accept-Language'] = localStorage.getItem('language') || 'zh-CN' + config.headers['token'] = localStorage.getItem('token') || '' + config.headers['Authorization'] = localStorage.getItem('token') || '' // 默认参数 var defaults = {} // 防止缓存,GET请求默认带_t参数 diff --git a/src/views/modules/activiti/model.vue b/src/views/modules/activiti/model.vue index 8ca2bb07..0fa0e3e5 100644 --- a/src/views/modules/activiti/model.vue +++ b/src/views/modules/activiti/model.vue @@ -83,7 +83,7 @@ export default { // 获取在线设计url地址 getModelerURL (id) { var params = qs.stringify({ - 'token': Cookies.get('token'), + 'token': localStorage.getItem('token'), 'modelId': id }) return `${window.SITE_CONFIG['apiURL']}/activiti/modeler.html?${params}` @@ -91,7 +91,7 @@ export default { // 获取导出url地址 getExportURL (id) { var params = qs.stringify({ - 'token': Cookies.get('token') + 'token': localStorage.getItem('token') }) return `${window.SITE_CONFIG['apiURL']}/activiti/model/export/${id}?${params}` }, diff --git a/src/views/modules/activiti/process-deploy.vue b/src/views/modules/activiti/process-deploy.vue index a01410c1..1f1d1cb8 100644 --- a/src/views/modules/activiti/process-deploy.vue +++ b/src/views/modules/activiti/process-deploy.vue @@ -28,7 +28,7 @@ export default { methods: { init () { this.visible = true - this.url = `${window.SITE_CONFIG['apiURL']}/activiti/process/deploy?token=${Cookies.get('token')}` + this.url = `${window.SITE_CONFIG['apiURL']}/activiti/process/deploy?token=${localStorage.getItem('token')}` this.fileList = [] }, // 上传之前 diff --git a/src/views/modules/activiti/process-initiation.vue b/src/views/modules/activiti/process-initiation.vue index bd053d2f..ead05425 100644 --- a/src/views/modules/activiti/process-initiation.vue +++ b/src/views/modules/activiti/process-initiation.vue @@ -85,7 +85,7 @@ export default { // 获取流程(xml/image)url地址 getResourceURL (id, name) { var params = qs.stringify({ - 'token': Cookies.get('token'), + 'token': localStorage.getItem('token'), 'deploymentId': id, 'resourceName': name }) diff --git a/src/views/modules/activiti/process.vue b/src/views/modules/activiti/process.vue index 2e80cd9f..65741f6f 100644 --- a/src/views/modules/activiti/process.vue +++ b/src/views/modules/activiti/process.vue @@ -101,7 +101,7 @@ export default { // 获取流程(xml/image)url地址 getResourceURL (id, name) { var params = qs.stringify({ - 'token': Cookies.get('token'), + 'token': localStorage.getItem('token'), 'deploymentId': id, 'resourceName': name }) diff --git a/src/views/modules/message/mail-template-add-or-update.vue b/src/views/modules/message/mail-template-add-or-update.vue index c7f382ed..b9078d6b 100644 --- a/src/views/modules/message/mail-template-add-or-update.vue +++ b/src/views/modules/message/mail-template-add-or-update.vue @@ -108,7 +108,7 @@ export default { theme: 'snow' }) // 自定义上传图片功能 (使用element upload组件) - this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}` + this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${localStorage.getItem('token')}` this.quillEditor.getModule('toolbar').addHandler('image', () => { this.$refs.uploadBtn.$el.click() }) diff --git a/src/views/modules/oss/oss-upload.vue b/src/views/modules/oss/oss-upload.vue index 3adc52a0..b60f8162 100644 --- a/src/views/modules/oss/oss-upload.vue +++ b/src/views/modules/oss/oss-upload.vue @@ -29,7 +29,7 @@ export default { methods: { init () { this.visible = true - this.url = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}` + this.url = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${localStorage.getItem('token')}` this.num = 0 this.fileList = [] }, diff --git a/src/views/modules/sys/news-add-or-update.vue b/src/views/modules/sys/news-add-or-update.vue index da08bf74..cd73e24a 100644 --- a/src/views/modules/sys/news-add-or-update.vue +++ b/src/views/modules/sys/news-add-or-update.vue @@ -108,7 +108,7 @@ export default { theme: 'snow' }) // 自定义上传图片功能 (使用element upload组件) - this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/sys/oss/upload?token=${Cookies.get('token')}` + this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/sys/oss/upload?token=${localStorage.getItem('token')}` this.quillEditor.getModule('toolbar').addHandler('image', () => { this.$refs.uploadBtn.$el.click() }) diff --git a/src/views/pages/index.vue b/src/views/pages/index.vue index d9012cce..f208e869 100644 --- a/src/views/pages/index.vue +++ b/src/views/pages/index.vue @@ -73,7 +73,7 @@ export default { localStorage.setItem('customerId', res.data.customerId) localStorage.setItem('userType', 'work') localStorage.setItem('showHeader', '0') - Cookies.set('token', res.data.token) + localStorage.setItem('token', res.data.token) this.$router.replace({ name: 'home' }) }) .catch(() => {}) diff --git a/src/views/pages/login copy.vue b/src/views/pages/login copy.vue index 4f074934..ee220351 100644 --- a/src/views/pages/login copy.vue +++ b/src/views/pages/login copy.vue @@ -145,7 +145,7 @@ export default { return this.$message.error(res.msg) } localStorage.setItem('userType', 'oper') - Cookies.set('token', res.data.token) + localStorage.setItem('token', res.data.token) this.$router.replace({ name: 'home' }).catch(() => { }) }).catch(() => { }) }) diff --git a/src/views/pages/login.vue b/src/views/pages/login.vue index 013f89d4..dc3e7111 100644 --- a/src/views/pages/login.vue +++ b/src/views/pages/login.vue @@ -243,7 +243,7 @@ export default { localStorage.setItem('customerId', res.data.customerId) localStorage.setItem('userType', 'work') localStorage.setItem('showHeader', '0') - Cookies.set('token', res.data.token) + localStorage.setItem('token', res.data.token) this.$router.replace({ name: 'home' }) }) .catch(() => { }) @@ -271,7 +271,7 @@ export default { localStorage.setItem('userType', 'work') - Cookies.set('token', res.data.token) + localStorage.setItem('token', res.data.token) this.$router.replace({ name: 'indexWork' }).catch(() => { }) }) .catch(() => { }) From 6a295a0f2cfa41bfd1ba4e1cd5ebafa2459e8a76 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Wed, 16 Feb 2022 16:58:03 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=BC=8F=E6=8E=89?= =?UTF-8?q?=E7=9A=84cokkie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/tinymce/index.vue | 2 +- src/views/main-content.vue | 6 +++--- src/views/main-shuju/main-content.vue | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/views/components/tinymce/index.vue b/src/views/components/tinymce/index.vue index 8403b43c..73c48e26 100644 --- a/src/views/components/tinymce/index.vue +++ b/src/views/components/tinymce/index.vue @@ -137,7 +137,7 @@ export default { }) }, getUserToken () { - let token = Cookie.get('token') + let token = localStorage.getItem('token') // console.log('获取token', token) // return this.$store.getters['user/isLogin'] return token diff --git a/src/views/main-content.vue b/src/views/main-content.vue index 89096412..08c7e249 100644 --- a/src/views/main-content.vue +++ b/src/views/main-content.vue @@ -87,7 +87,7 @@ export default { // this.$nextTick(() => { // this.sendMessage() // }) - this.token = Cookie.get("token"); + this.token = localStorage.getItem("token"); this.customerId = localStorage.getItem("customerId"); }, methods: { @@ -100,7 +100,7 @@ export default { this.iframeUrl = url + "?token=" + - Cookie.get("token") + + localStorage.getItem("token") + "&customerId=" + localStorage.getItem("customerId"); return isURL(url); @@ -169,7 +169,7 @@ export default { console.log("iframe", iframe); // iframe.postMessage({ - // token: Cookie.get('token'), + // token: localStorage.getItem('token'), // customerId: localStorage.getItem('customerId') // }, '*') iframe.postMessage({ name: "lalalal" }, "*"); diff --git a/src/views/main-shuju/main-content.vue b/src/views/main-shuju/main-content.vue index b2da8855..e78235c6 100644 --- a/src/views/main-shuju/main-content.vue +++ b/src/views/main-shuju/main-content.vue @@ -24,7 +24,7 @@ export default { // this.$nextTick(() => { // this.sendMessage() // }) - this.token = Cookie.get('token') + this.token = localStorage.getItem('token') this.customerId = localStorage.getItem('customerId') }, methods: { @@ -34,7 +34,7 @@ export default { // tabs, 是否通过iframe展示 tabIsIframe (url) { // this.appendIframe(url) - this.iframeUrl = url + '?token=' + Cookie.get('token') + '&customerId=' + localStorage.getItem('customerId') + this.iframeUrl = url + '?token=' + localStorage.getItem('token') + '&customerId=' + localStorage.getItem('customerId') return isURL(url) }, // tabs, 选中tab @@ -85,7 +85,7 @@ export default { console.log('iframe', iframe) // iframe.postMessage({ - // token: Cookie.get('token'), + // token: localStorage.getItem('token'), // customerId: localStorage.getItem('customerId') // }, '*') iframe.postMessage({ name: 'lalalal' }, '*') From e9671cb087bce16043bf15a0159882b91cc6f3ea Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Thu, 24 Feb 2022 09:01:35 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E5=9C=B0=E5=9D=80=E6=9B=BF=E6=8D=A2=E4=B8=BA?= =?UTF-8?q?=E5=B8=82=E5=8C=97=E7=BA=BF=E4=B8=8A=E7=8E=AF=E5=A2=83=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 2 +- public/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.production b/.env.production index 6592f042..17eebff3 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,4 @@ NODE_ENV=production -VUE_APP_API_SERVER = https://epmet-cloud.elinkservice.cn/api +VUE_APP_API_SERVER = https://epdc-shibei.elinkservice.cn/api VUE_APP_NODE_ENV=prod VUE_APP_PUBLIC_PATH=epmet-oper \ No newline at end of file diff --git a/public/index.html b/public/index.html index b2020bc6..a1ac2eb1 100644 --- a/public/index.html +++ b/public/index.html @@ -63,7 +63,7 @@ <% if (process.env.VUE_APP_NODE_ENV==='prod' ) { %> <% } %> From ae3ffba7f11d66c704e5fe8b57cbedae2e235300 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Thu, 24 Feb 2022 10:47:17 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=AF=BC=E8=88=AA=E6=A0=8F=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/main-shuju/main-navbar.vue | 32 ++++---- src/views/main-shuju/main.vue | 118 ++++++++++----------------- 2 files changed, 59 insertions(+), 91 deletions(-) diff --git a/src/views/main-shuju/main-navbar.vue b/src/views/main-shuju/main-navbar.vue index 19c148a4..05d44587 100644 --- a/src/views/main-shuju/main-navbar.vue +++ b/src/views/main-shuju/main-navbar.vue @@ -3,9 +3,7 @@