From d898ae79baafe98beb5a157983e0ae95890342d7 Mon Sep 17 00:00:00 2001 From: bianyaqi Date: Wed, 17 May 2023 16:27:35 +0800 Subject: [PATCH] =?UTF-8?q?cookie=E5=92=8C=E7=94=A8=E6=88=B7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=82=A8=E5=AD=98=E5=9C=A8session=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/360View/afterPart/index-copy.vue | 5 ++--- src/components/360View/afterPart/index.vue | 5 ++--- src/components/360View/collection.vue | 4 ++-- src/components/360View/commonForm/eyesVision.vue | 2 +- .../360View/commonForm/optometryForm-copy.vue | 2 +- src/components/360View/commonForm/optometryForm.vue | 2 +- src/components/360View/commonForm/threeVision.vue | 2 +- src/components/360View/forePart/index-copy.vue | 5 ++--- src/components/360View/forePart/index.vue | 5 ++--- .../medicalRecord/outPatientRecord/afterForm.vue | 5 ++--- .../medicalRecord/outPatientRecord/foreForm.vue | 5 ++--- src/components/360View/special/index.vue | 2 +- src/components/bread-crumb/index.vue | 2 +- src/components/patient-search/index.vue | 2 +- src/page-subspecialty/router/index.js | 6 +++--- src/page-subspecialty/store/index.js | 11 +---------- src/page-subspecialty/utils/request.js | 9 ++------- .../views/modules/formList/InformedConsent.vue | 2 +- .../views/modules/formList/laserSurgery.vue | 2 +- .../views/modules/formList/reportForm.vue | 2 +- .../cornea/patient-add-or-update.vue | 2 +- .../dioptric/patient-add-or-update.vue | 2 +- .../optometryManagement/seeDoctor/historyRecord.vue | 2 +- .../call/patient-add-or-update.vue | 2 +- .../treat/patient-add-or-update.vue | 2 +- .../modules/systemManagement/team/edit-password.vue | 2 +- .../views/modules/systemManagement/team/index.vue | 2 +- .../systemManagement/team/team-add-or-update.vue | 2 +- src/page-subspecialty/views/pages/login.vue | 12 +++--------- static/js/sign.js | 2 +- 30 files changed, 42 insertions(+), 68 deletions(-) diff --git a/src/components/360View/afterPart/index-copy.vue b/src/components/360View/afterPart/index-copy.vue index 4213b33..4b1fe23 100644 --- a/src/components/360View/afterPart/index-copy.vue +++ b/src/components/360View/afterPart/index-copy.vue @@ -359,7 +359,7 @@ export default { created() { }, mounted() { - this.userData = this.$store.state.currentUser + this.userData = JSON.parse(window.sessionStorage.getItem('qg-userData')) this.doctorId = this.userData.id this.queryOptions() this.getforeList() @@ -611,8 +611,7 @@ export default { queryTree(type) { const baseUrl = window.SITE_CONFIG['apiURL'] + '/treetag/findTree' return new Promise((resolve, reject) => { - const employeeId = this.$store.state.currentUser.employeeId - axios.defaults.headers.common['token'] = Cookies.get('xa-token' + employeeId) || '' + axios.defaults.headers.common['token'] = window.sessionStorage.getItem('xa-token') || '' axios.get(baseUrl, { params: { doctorId: this.doctorId, diff --git a/src/components/360View/afterPart/index.vue b/src/components/360View/afterPart/index.vue index f1be0d8..d69d721 100644 --- a/src/components/360View/afterPart/index.vue +++ b/src/components/360View/afterPart/index.vue @@ -244,7 +244,7 @@ export default { created() { }, mounted() { - this.userData = this.$store.state.currentUser + this.userData = JSON.parse(window.sessionStorage.getItem('qg-userData')) this.doctorId = this.userData.id this.getforeList().then(() => { this.queryOptions() @@ -608,8 +608,7 @@ export default { queryTree(type) { const baseUrl = window.SITE_CONFIG['apiURL'] + '/treetag/findTree' return new Promise((resolve, reject) => { - const employeeId = this.$store.state.currentUser.employeeId - axios.defaults.headers.common['token'] = Cookies.get('xa-token' + employeeId) || '' + axios.defaults.headers.common['token'] = window.sessionStorage.getItem('xa-token') || '' axios.get(baseUrl, { params: { doctorId: this.doctorId, diff --git a/src/components/360View/collection.vue b/src/components/360View/collection.vue index 7c35ec3..0843b85 100644 --- a/src/components/360View/collection.vue +++ b/src/components/360View/collection.vue @@ -88,7 +88,7 @@ export default { id: '', parentId: 0 }, - doctorId: this.$store.state.currentUser.id, + doctorId: JSON.parse(window.sessionStorage.getItem('qg-userData')).idid, collectData: [], tableData: [], defaultProps: { @@ -179,7 +179,7 @@ export default { async findTree() { const { data } = await this.$http.get(`/tree/findTree`, { params: { - doctorId: this.$store.state.currentUser.id, + doctorId: JSON.parse(window.sessionStorage.getItem('qg-userData')).idid, platform: this.platform } }) diff --git a/src/components/360View/commonForm/eyesVision.vue b/src/components/360View/commonForm/eyesVision.vue index e14324a..fd73955 100644 --- a/src/components/360View/commonForm/eyesVision.vue +++ b/src/components/360View/commonForm/eyesVision.vue @@ -832,7 +832,7 @@ export default { methods: { // 获取签名 setSign() { - const userData = this.$store.state.currentUser + const userData = window.sessionStorage.getItem('qg-userData') const date = this.$moment().format('YYYY-MM-DD') const mzName = window.localStorage.getItem('mzDoctorName') this.formData.ygsSign = userData.signImgBase diff --git a/src/components/360View/commonForm/optometryForm-copy.vue b/src/components/360View/commonForm/optometryForm-copy.vue index b13070c..df8e491 100644 --- a/src/components/360View/commonForm/optometryForm-copy.vue +++ b/src/components/360View/commonForm/optometryForm-copy.vue @@ -578,7 +578,7 @@ export default { methods: { // 设置签名 setSign() { - const userData = this.$store.state.currentUser + const userData = window.sessionStorage.getItem('qg-userData') const date = this.$moment().format('YYYY-MM-DD') const mzName = window.localStorage.getItem('mzDoctorName') this.dataForm.tongk = '正常瞳孔' diff --git a/src/components/360View/commonForm/optometryForm.vue b/src/components/360View/commonForm/optometryForm.vue index 016240a..be98a49 100644 --- a/src/components/360View/commonForm/optometryForm.vue +++ b/src/components/360View/commonForm/optometryForm.vue @@ -546,7 +546,7 @@ export default { }, methods: { setSign() { - const userData = this.$store.state.currentUser + const userData = window.sessionStorage.getItem('qg-userData') const date = this.$moment().format('YYYY-MM-DD') const mzName = window.localStorage.getItem('mzDoctorName') this.dataForm.optometrist = userData.signImgBase diff --git a/src/components/360View/commonForm/threeVision.vue b/src/components/360View/commonForm/threeVision.vue index 4a1f192..3a2a49d 100644 --- a/src/components/360View/commonForm/threeVision.vue +++ b/src/components/360View/commonForm/threeVision.vue @@ -1243,7 +1243,7 @@ export default { } }, setSign() { - const userData = this.$store.state.currentUser + const userData = window.sessionStorage.getItem('qg-userData') const date = this.$moment().format('YYYY-MM-DD') this.dataForm.sgsSign = userData.signImgBase this.dataForm.riQi = date diff --git a/src/components/360View/forePart/index-copy.vue b/src/components/360View/forePart/index-copy.vue index 4fc00cf..7acd1a3 100644 --- a/src/components/360View/forePart/index-copy.vue +++ b/src/components/360View/forePart/index-copy.vue @@ -753,7 +753,7 @@ export default { } }, mounted() { - this.userData = this.$store.state.currentUser + this.userData = JSON.parse(window.sessionStorage.getItem('qg-userData')) this.doctorId = this.userData.id this.queryOptions() this.getforeList() @@ -1008,8 +1008,7 @@ export default { queryTree(type) { const baseUrl = window.SITE_CONFIG['apiURL'] + '/treetag/findTree' return new Promise((resolve, reject) => { - const employeeId = this.$store.state.currentUser.employeeId - axios.defaults.headers.common['token'] = Cookies.get('xa-token' + employeeId) || '' + axios.defaults.headers.common['token'] = window.sessionStorage.getItem('xa-token') || '' axios.get(baseUrl, { params: { doctorId: this.doctorId, diff --git a/src/components/360View/forePart/index.vue b/src/components/360View/forePart/index.vue index 0b621e1..5f76763 100644 --- a/src/components/360View/forePart/index.vue +++ b/src/components/360View/forePart/index.vue @@ -409,7 +409,7 @@ export default { created() { }, mounted() { - this.userData = this.$store.state.currentUser + this.userData = JSON.parse(window.sessionStorage.getItem('qg-userData')) this.doctorId = this.userData.id this.getforeList().then(() => { this.queryOptions() @@ -811,8 +811,7 @@ export default { queryTree(type) { const baseUrl = window.SITE_CONFIG['apiURL'] + '/treetag/findTree' return new Promise((resolve, reject) => { - const employeeId = this.$store.state.currentUser.employeeId - axios.defaults.headers.common['token'] = Cookies.get('xa-token' + employeeId) || '' + axios.defaults.headers.common['token'] = window.sessionStorage.getItem('xa-token') || '' axios.get(baseUrl, { params: { doctorId: this.doctorId, diff --git a/src/components/360View/medicalRecord/outPatientRecord/afterForm.vue b/src/components/360View/medicalRecord/outPatientRecord/afterForm.vue index f0c8343..87a1d5c 100644 --- a/src/components/360View/medicalRecord/outPatientRecord/afterForm.vue +++ b/src/components/360View/medicalRecord/outPatientRecord/afterForm.vue @@ -198,7 +198,7 @@ export default { } }, mounted() { - this.userData = this.$store.state.currentUser + this.userData = JSON.parse(window.sessionStorage.getItem('qg-userData')) this.doctorId = this.userData.id this.queryOptions() }, @@ -207,8 +207,7 @@ export default { queryTree(type) { const baseUrl = window.SITE_CONFIG['apiURL'] + '/treetag/findTree' return new Promise((resolve, reject) => { - const employeeId = this.$store.state.currentUser.employeeId - axios.defaults.headers.common['token'] = Cookies.get('xa-token' + employeeId) || '' + axios.defaults.headers.common['token'] = window.sessionStorage.getItem('xa-token') || '' axios.get(baseUrl, { params: { doctorId: this.doctorId, diff --git a/src/components/360View/medicalRecord/outPatientRecord/foreForm.vue b/src/components/360View/medicalRecord/outPatientRecord/foreForm.vue index df2b37d..9a1c1ec 100644 --- a/src/components/360View/medicalRecord/outPatientRecord/foreForm.vue +++ b/src/components/360View/medicalRecord/outPatientRecord/foreForm.vue @@ -557,7 +557,7 @@ export default { } }, mounted() { - this.userData = this.$store.state.currentUser + this.userData = JSON.parse(window.sessionStorage.getItem('qg-userData')) this.doctorId = this.userData.id this.queryOptions() }, @@ -569,8 +569,7 @@ export default { queryTree(type) { const baseUrl = window.SITE_CONFIG['apiURL'] + '/treetag/findTree' return new Promise((resolve, reject) => { - const employeeId = this.$store.state.currentUser.employeeId - axios.defaults.headers.common['token'] = Cookies.get('xa-token' + employeeId) || '' + axios.defaults.headers.common['token'] = window.sessionStorage.getItem('xa-token') || '' axios.get(baseUrl, { params: { doctorId: this.doctorId, diff --git a/src/components/360View/special/index.vue b/src/components/360View/special/index.vue index a8df645..c9caf10 100644 --- a/src/components/360View/special/index.vue +++ b/src/components/360View/special/index.vue @@ -123,7 +123,7 @@ export default { } }, mounted() { - const user = this.$store.state.currentUser + const user = window.sessionStorage.getItem('qg-userData') this.employeeId = user.employeeId this.getPatientData() this.getSpecialItem() diff --git a/src/components/bread-crumb/index.vue b/src/components/bread-crumb/index.vue index 96bcbb7..9f477d5 100644 --- a/src/components/bread-crumb/index.vue +++ b/src/components/bread-crumb/index.vue @@ -27,7 +27,7 @@ export default { } }, created() { - this.userData = this.$store.state.currentUser + this.userData = window.sessionStorage.getItem('qg-userData') this.getBreadcrumb() }, methods: { diff --git a/src/components/patient-search/index.vue b/src/components/patient-search/index.vue index 9542feb..2075032 100644 --- a/src/components/patient-search/index.vue +++ b/src/components/patient-search/index.vue @@ -105,7 +105,7 @@ export default { return { uploadUrl: window.SITE_CONFIG['apiURL'] + '/patient/data/searchByExcel', headers: { - token: Cookies.get('xa-token' + this.$store.state.currentUser.employeeId) + token: window.sessionStorage.setItem('xa-token') }, dataForm: {}, keyWord: '', diff --git a/src/page-subspecialty/router/index.js b/src/page-subspecialty/router/index.js index f5ad9d2..2ca8de6 100644 --- a/src/page-subspecialty/router/index.js +++ b/src/page-subspecialty/router/index.js @@ -226,9 +226,9 @@ function loginByDocId(doctorId, next) { return this.$message.error(res.msg) } console.log(res) - const employeeId = res.data.currentUser.employeeId - Cookies.set('xa-token' + employeeId, res.data.token) - window.localStorage.setItem('qg-userData' + employeeId, JSON.stringify(res.data.currentUser)) + // Cookies.set('xa-token', res.data.token) + window.sessionStorage.setItem('xa-token', res.data.token) + window.sessionStorage.setItem('qg-userData', JSON.stringify(res.data.currentUser)) getNavList(next) muneList(next) diff --git a/src/page-subspecialty/store/index.js b/src/page-subspecialty/store/index.js index 2899c27..29a09dc 100644 --- a/src/page-subspecialty/store/index.js +++ b/src/page-subspecialty/store/index.js @@ -28,8 +28,7 @@ export default new Vuex.Store({ title: 'home' } ], - defauleActiveIndex: '', - currentUser: null + defauleActiveIndex: '' }, modules: { user, @@ -49,14 +48,6 @@ export default new Vuex.Store({ activeIndexFun(state, id) { state.defauleActiveIndex = id window.sessionStorage.setItem('defauleActiveIndex', id) - }, - setCurUser(state, value) { - state.currentUser = value - } - }, - actions: { - acSetUser(context, value) { - context.commit('setCurUser', value) } } }) diff --git a/src/page-subspecialty/utils/request.js b/src/page-subspecialty/utils/request.js index ad6f85b..164a783 100644 --- a/src/page-subspecialty/utils/request.js +++ b/src/page-subspecialty/utils/request.js @@ -9,7 +9,7 @@ import store from '../store' */ export function clearLoginInfo() { store.commit('resetStore') - Cookies.remove('xa-token' + store.state.currentUser.employeeId) + Cookies.remove('xa-token') window.localStorage.clear() window.SITE_CONFIG['dynamicMenuRoutesHasAdded'] = false } @@ -25,12 +25,7 @@ const http = axios.create({ */ http.interceptors.request.use(config => { config.headers['Accept-Language'] = Cookies.get('language') || 'zh-CN' - const employeeId = store.state.currentUser && store.state.currentUser.employeeId - if (employeeId) { - config.headers['token'] = Cookies.get('xa-token' + employeeId) || '' - } else { - config.headers['token'] = Cookies.get('xa-token') || '' - } + config.headers['token'] = window.sessionStorage.getItem('xa-token') || '' // 默认参数 var defaults = {} // 防止缓存,GET请求默认带_t参数 diff --git a/src/page-subspecialty/views/modules/formList/InformedConsent.vue b/src/page-subspecialty/views/modules/formList/InformedConsent.vue index f09be76..2739ead 100644 --- a/src/page-subspecialty/views/modules/formList/InformedConsent.vue +++ b/src/page-subspecialty/views/modules/formList/InformedConsent.vue @@ -372,7 +372,7 @@ export default { this.confirmData.patientName = this.patientDetail.patientName this.confirmData.patientAge = this.patientDetail.patientAge this.confirmData.patientGender = this.patientDetail.patientSex - const userData = this.$store.state.currentUser + const userData = window.sessionStorage.getItem('qg-userData') this.confirmData.operationSign = userData.signImgBase this.confirmData.operationDate = this.$moment().format('YYYY-MM-DD HH:mm:ss') this.confirmData.patientDate = this.$moment().format('YYYY-MM-DD HH:mm:ss') diff --git a/src/page-subspecialty/views/modules/formList/laserSurgery.vue b/src/page-subspecialty/views/modules/formList/laserSurgery.vue index 91ba532..02b079d 100644 --- a/src/page-subspecialty/views/modules/formList/laserSurgery.vue +++ b/src/page-subspecialty/views/modules/formList/laserSurgery.vue @@ -298,7 +298,7 @@ export default { this.confirmData.jgzlSyt = odOrOs.os } } - const userData = this.$store.state.currentUser + const userData = window.sessionStorage.getItem('qg-userData') this.confirmData.operateSign = userData.signImgBase }) }, diff --git a/src/page-subspecialty/views/modules/formList/reportForm.vue b/src/page-subspecialty/views/modules/formList/reportForm.vue index 3d84610..20ebed6 100644 --- a/src/page-subspecialty/views/modules/formList/reportForm.vue +++ b/src/page-subspecialty/views/modules/formList/reportForm.vue @@ -144,7 +144,7 @@ export default { created() { this.origin = JSON.parse(JSON.stringify(this.formData)) this.confirmData.patientName = this.patientDetail.patientName - const userData = this.$store.state.currentUser + const userData = window.sessionStorage.getItem('qg-userData') this.confirmData.operator = userData.signImgBase this.getReportInfo() }, diff --git a/src/page-subspecialty/views/modules/optometryManagement/cornea/patient-add-or-update.vue b/src/page-subspecialty/views/modules/optometryManagement/cornea/patient-add-or-update.vue index 1d47384..288509d 100644 --- a/src/page-subspecialty/views/modules/optometryManagement/cornea/patient-add-or-update.vue +++ b/src/page-subspecialty/views/modules/optometryManagement/cornea/patient-add-or-update.vue @@ -213,7 +213,7 @@ export default { } else { this.mzDoctorList = data.data.data } - // this.dataForm.sgDoctorId = this.$store.state.currentUser.employeeId + // this.dataForm.sgDoctorId = JSON.parse(window.sessionStorage.getItem('qg-userData')).employeeId }) }, // 获取项目列表 diff --git a/src/page-subspecialty/views/modules/optometryManagement/dioptric/patient-add-or-update.vue b/src/page-subspecialty/views/modules/optometryManagement/dioptric/patient-add-or-update.vue index ede29c2..d8b3665 100644 --- a/src/page-subspecialty/views/modules/optometryManagement/dioptric/patient-add-or-update.vue +++ b/src/page-subspecialty/views/modules/optometryManagement/dioptric/patient-add-or-update.vue @@ -213,7 +213,7 @@ export default { } else { this.mzDoctorList = data.data.data } - this.dataForm.sgDoctorId = this.$store.state.currentUser.employeeId + this.dataForm.sgDoctorId = JSON.parse(window.sessionStorage.getItem('qg-userData')).employeeId }) }, // 获取项目列表 diff --git a/src/page-subspecialty/views/modules/optometryManagement/seeDoctor/historyRecord.vue b/src/page-subspecialty/views/modules/optometryManagement/seeDoctor/historyRecord.vue index c3c5636..81a85fa 100644 --- a/src/page-subspecialty/views/modules/optometryManagement/seeDoctor/historyRecord.vue +++ b/src/page-subspecialty/views/modules/optometryManagement/seeDoctor/historyRecord.vue @@ -54,7 +54,7 @@ export default { patientId: this.patientId }, headers: { - token: Cookies.get('xa-token' + this.$store.state.currentUser.employeeId) + token: window.sessionStorage.setItem('xa-token') }, filePath: '', recordList: [], diff --git a/src/page-subspecialty/views/modules/outpatientManagement/call/patient-add-or-update.vue b/src/page-subspecialty/views/modules/outpatientManagement/call/patient-add-or-update.vue index fd24e87..15b7024 100644 --- a/src/page-subspecialty/views/modules/outpatientManagement/call/patient-add-or-update.vue +++ b/src/page-subspecialty/views/modules/outpatientManagement/call/patient-add-or-update.vue @@ -211,7 +211,7 @@ export default { } else { this.mzDoctorList = data.data.data } - this.dataForm.mzDoctorId = this.$store.state.currentUser.employeeId + this.dataForm.mzDoctorId = JSON.parse(window.sessionStorage.getItem('qg-userData')).employeeId }) }, // 获取项目列表 diff --git a/src/page-subspecialty/views/modules/outpatientManagement/treat/patient-add-or-update.vue b/src/page-subspecialty/views/modules/outpatientManagement/treat/patient-add-or-update.vue index 65cca34..aa9a48f 100644 --- a/src/page-subspecialty/views/modules/outpatientManagement/treat/patient-add-or-update.vue +++ b/src/page-subspecialty/views/modules/outpatientManagement/treat/patient-add-or-update.vue @@ -209,7 +209,7 @@ export default { } else { this.mzDoctorList = data.data.data } - this.dataForm.mzDoctorId = this.$store.state.currentUser.employeeId + this.dataForm.mzDoctorId = JSON.parse(window.sessionStorage.getItem('qg-userData')).employeeId }) }, // 获取项目列表 diff --git a/src/page-subspecialty/views/modules/systemManagement/team/edit-password.vue b/src/page-subspecialty/views/modules/systemManagement/team/edit-password.vue index 66f11f2..bc93b5e 100644 --- a/src/page-subspecialty/views/modules/systemManagement/team/edit-password.vue +++ b/src/page-subspecialty/views/modules/systemManagement/team/edit-password.vue @@ -66,7 +66,7 @@ export default { methods: { init() { this.visible = true - this.loginInfo = this.$store.state.currentUser + this.loginInfo = window.sessionStorage.getItem('qg-userData') this.$nextTick(() => { this.$refs.dataForm.resetFields() // 重置表单 }) diff --git a/src/page-subspecialty/views/modules/systemManagement/team/index.vue b/src/page-subspecialty/views/modules/systemManagement/team/index.vue index 5b8d76b..5414b4c 100644 --- a/src/page-subspecialty/views/modules/systemManagement/team/index.vue +++ b/src/page-subspecialty/views/modules/systemManagement/team/index.vue @@ -105,7 +105,7 @@ export default { created() { // 获取权限名称 this.getRoleName() - this.qgUserData = this.$store.state.currentUser + this.qgUserData = window.sessionStorage.getItem('qg-userData') }, methods: { // 获取权限名称 diff --git a/src/page-subspecialty/views/modules/systemManagement/team/team-add-or-update.vue b/src/page-subspecialty/views/modules/systemManagement/team/team-add-or-update.vue index d5f7f6d..ccb4973 100644 --- a/src/page-subspecialty/views/modules/systemManagement/team/team-add-or-update.vue +++ b/src/page-subspecialty/views/modules/systemManagement/team/team-add-or-update.vue @@ -204,7 +204,7 @@ export default { // 获取中心 // this.getCentreList() // this.getCentreJobList() - this.loginInfo = this.$store.state.currentUser + this.loginInfo = window.sessionStorage.getItem('qg-userData') this.$refs.dataForm.resetFields() // 重置表单 if (this.dataForm.id) { this.getInfo() diff --git a/src/page-subspecialty/views/pages/login.vue b/src/page-subspecialty/views/pages/login.vue index b780b8e..901d895 100644 --- a/src/page-subspecialty/views/pages/login.vue +++ b/src/page-subspecialty/views/pages/login.vue @@ -53,7 +53,6 @@ import Cookies from 'js-cookie' import debounce from 'lodash/debounce' import { messages } from '@/i18n' import { getUUID } from '@/utils' -import { mapActions, MapActions } from 'vuex' export default { data() { return { @@ -86,7 +85,6 @@ export default { // this.getCaptcha() }, methods: { - ...mapActions(['acSetUser']), submitNext() { this.$refs.passWord.focus() }, @@ -107,13 +105,9 @@ export default { this.getCaptcha() return this.$message.error(res.msg) } - if (!res.data.currentUser) { - return - } - this.acSetUser(res.data.currentUser) - const employeeId = this.$store.state.currentUser.employeeId - Cookies.set('xa-token' + employeeId, res.data.token) - // window.localStorage.setItem('qg-userData', JSON.stringify(res.data.currentUser)) + // Cookies.set('xa-token', res.data.token) + window.sessionStorage.setItem('xa-token', res.data.token) + window.sessionStorage.setItem('qg-userData', JSON.stringify(res.data.currentUser)) this.$router.push({ name: 'outpatientManagement-call' }) }).catch(() => { }) }) diff --git a/static/js/sign.js b/static/js/sign.js index 6021950..8ceaba0 100644 --- a/static/js/sign.js +++ b/static/js/sign.js @@ -170,7 +170,7 @@ function initCRF() { function setAutoImport() { console.log(123); const nodeIdName = JSON.parse(window.sessionStorage.getItem('sign-nodeIdName')) - const img_base64 = this.$store.state.currentUser.signImgBase + const img_base64 = JSON.parse(window.sessionStorage.getItem('qg-userData')).signImgBasesignImgBase // 调取接口 let img = `` // 动态插入img