From fc3ec41ea084426a9c6af7e95937c70dc4912d3e Mon Sep 17 00:00:00 2001 From: "liu.xiaofeng@ebiz-digits.com" Date: Thu, 10 Aug 2023 14:42:19 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90GFRS-3645=E3=80=91=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E5=BD=93=E7=82=B9=E5=87=BB=E9=A1=B5=E9=9D=A2=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E6=97=B6=EF=BC=8Cvue=E7=9A=84store=E6=95=B0=E6=8D=AE=E4=B8=A2?= =?UTF-8?q?=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 10 ++++++++++ src/views/ebiz/YB_agentSign/step2.vue | 10 +++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/App.vue b/src/App.vue index 992ee9417..def7824fc 100644 --- a/src/App.vue +++ b/src/App.vue @@ -26,6 +26,16 @@ export default { reload: this.reload } }, + created () { + // 在页面加载时读取sessionStorage + if (sessionStorage.getItem('store')) { + this.$store.replaceState(Object.assign({}, this.$store.state, JSON.parse(sessionStorage.getItem('store')))) + } + // 在页面刷新时将store保存到sessionStorage里 + window.addEventListener('beforeunload', () => { + sessionStorage.setItem('store', JSON.stringify(this.$store.state)) + }) + }, mounted(){ }, methods: { diff --git a/src/views/ebiz/YB_agentSign/step2.vue b/src/views/ebiz/YB_agentSign/step2.vue index 27bd8849b..00c504948 100644 --- a/src/views/ebiz/YB_agentSign/step2.vue +++ b/src/views/ebiz/YB_agentSign/step2.vue @@ -12,7 +12,7 @@
投保人签名 : - {{signInfo.status == '0' ? '签名' : '已签名' }} + {{signInfo.status == '1' ? '签名' : '已签名' }}
@@ -40,7 +40,7 @@ isDisabledComplite:true, isOver: false, signInfo: { - status: '0' + status: '1' }, } }, @@ -64,9 +64,9 @@ if(res.result == 0){ this.pdfUrl = config.assetsUpUrl + res.content.rgssUrl let signInfo = JSON.parse(localStorage.getItem('signInfo')) - if (signInfo && signInfo.status == '0') { + if (signInfo && signInfo.status == '1') { this.base64 = sessionStorage.getItem('twoimgBase64Data') - this.$set(this.signInfo, 'status', '1') + this.$set(this.signInfo, 'status', '2') } }else{ this.$toast(res.resultMessage) @@ -141,7 +141,7 @@ } else { that.signBtnDisable = true } - if (that.radio == '1' && val.signInfo.status == '1') { + if (that.radio == '1' && val.signInfo.status == '2') { that.isDisabledComplite = false } else { that.isDisabledComplite = true