From 4725c30dfc5a4629d38bbd239c99f63afcd9e273 Mon Sep 17 00:00:00 2001 From: lengleng Date: Tue, 19 May 2020 13:27:04 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20Fixing=20a=20bug.=20#1241=20=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E7=AE=A1=E7=90=86=E4=B8=AD=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=9B=BE=E4=BF=9D=E5=AD=98=E6=97=B6=E7=A7=9F?= =?UTF-8?q?=E6=88=B7=E4=BF=A1=E6=81=AF=E4=BC=9A=E8=87=AA=E5=8A=A8=E5=8F=98?= =?UTF-8?q?=E4=B8=BA1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/static/editor-app/app.js | 6 +++--- .../editor-app/configuration/toolbar-default-actions.js | 6 +++--- .../main/resources/static/editor-app/stencil-controller.js | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pigx-visual/pigx-oa-platform/src/main/resources/static/editor-app/app.js b/pigx-visual/pigx-oa-platform/src/main/resources/static/editor-app/app.js index 9aa92005c..6143865e8 100644 --- a/pigx-visual/pigx-oa-platform/src/main/resources/static/editor-app/app.js +++ b/pigx-visual/pigx-oa-platform/src/main/resources/static/editor-app/app.js @@ -95,8 +95,8 @@ activitiModeler /* Helper method to fetch model from server (always needed) */ function fetchModel(modelId) { var tenantId = 1 - if (sessionStorage.getItem('tenantId')) { - tenantId = sessionStorage.getItem('tenantId') + if (localStorage.getItem('pigx-tenantId')) { + tenantId = JSON.parse(localStorage.getItem('pigx-tenantId')).content } var modelUrl = KISBPM.URL.getModel(modelId); @@ -104,7 +104,7 @@ activitiModeler $http({method: 'GET', url: modelUrl, headers: { - 'TENANT_ID': tenantId + 'TENANT-ID': tenantId } }). success(function (data, status, headers, config) { diff --git a/pigx-visual/pigx-oa-platform/src/main/resources/static/editor-app/configuration/toolbar-default-actions.js b/pigx-visual/pigx-oa-platform/src/main/resources/static/editor-app/configuration/toolbar-default-actions.js index ee07ca408..e3c06f313 100644 --- a/pigx-visual/pigx-oa-platform/src/main/resources/static/editor-app/configuration/toolbar-default-actions.js +++ b/pigx-visual/pigx-oa-platform/src/main/resources/static/editor-app/configuration/toolbar-default-actions.js @@ -378,8 +378,8 @@ var SaveModelCtrl = [ '$rootScope', '$scope', '$http', '$route', '$location', }; var tenantId = 1 - if (sessionStorage.getItem('tenantId')) { - tenantId = sessionStorage.getItem('tenantId') + if (localStorage.getItem('pigx-tenantId')) { + tenantId = JSON.parse(localStorage.getItem('pigx-tenantId')).content } // Update @@ -389,7 +389,7 @@ var SaveModelCtrl = [ '$rootScope', '$scope', '$http', '$route', '$location', headers: { 'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', - 'TENANT_ID': tenantId + 'TENANT-ID': tenantId }, transformRequest: function (obj) { var str = []; diff --git a/pigx-visual/pigx-oa-platform/src/main/resources/static/editor-app/stencil-controller.js b/pigx-visual/pigx-oa-platform/src/main/resources/static/editor-app/stencil-controller.js index 1eba2407b..75796d863 100644 --- a/pigx-visual/pigx-oa-platform/src/main/resources/static/editor-app/stencil-controller.js +++ b/pigx-visual/pigx-oa-platform/src/main/resources/static/editor-app/stencil-controller.js @@ -63,14 +63,14 @@ angular.module('activitiModeler') StencilSet items */ var tenantId = 1 - if (sessionStorage.getItem('tenantId')) { - tenantId = sessionStorage.getItem('tenantId') + if (localStorage.getItem('pigx-tenantId')) { + tenantId = JSON.parse(localStorage.getItem('pigx-tenantId')).content } $http({method: 'GET', url: KISBPM.URL.getStencilSet(), headers: { - 'TENANT_ID': tenantId + 'TENANT-ID': tenantId } }).success(function (data, status, headers, config) {