diff --git a/src/views/ebiz/sale/InsuredInfo.vue b/src/views/ebiz/sale/InsuredInfo.vue index f79355522..4b037c0a3 100644 --- a/src/views/ebiz/sale/InsuredInfo.vue +++ b/src/views/ebiz/sale/InsuredInfo.vue @@ -551,7 +551,8 @@ export default { //如果是编辑/导航进来 this.isElecCont = '0' if (this.$route.query.edit) { - getOrderDetail({ orderNo: localStorage.orderNo }).then((res) => { + const orderNo = this.$CacheUtils.getLocItem('orderNo') + getOrderDetail({ orderNo: orderNo }).then((res) => { if (res.result == 0) { //投保人信息返显 this.userInfo = res.orderDTO.appntDTO @@ -1274,7 +1275,7 @@ export default { orderType: 'APPNT_ORDER', orderDTO: { orderInfoDTO: { - orderNo: localStorage.orderNo, + orderNo: this.$CacheUtils.getLocItem('orderNo'), isElecCont: this.isElecCont, }, appntDTO: {}, @@ -1301,7 +1302,7 @@ export default { } else { str = str + 'edit=1&salePageFlag=2' } - localStorage.orderNo = resultData.orderNo + this.$CacheUtils.setLocItem('orderNo', resultData.orderNo) // localStorage.insuredDetail = JSON.stringify(this.userInfo) // 添加提示 let age = utilsAge.getAge(this.userInfo.birthday, new Date()) diff --git a/src/views/ebiz/sale/InsuredPerson.vue b/src/views/ebiz/sale/InsuredPerson.vue index 94f0e3f24..b419a63e4 100644 --- a/src/views/ebiz/sale/InsuredPerson.vue +++ b/src/views/ebiz/sale/InsuredPerson.vue @@ -610,8 +610,9 @@ export default { this.specilFlag = this.$route.query.specilFlag //如果是编辑/导航进来 // if (this.$route.query.edit) { - if (localStorage.orderNo) { - getOrderDetail({ orderNo: localStorage.orderNo }).then((res) => { + const orderNo = this.$CacheUtils.getLocItem('orderNo') + if (orderNo) { + getOrderDetail({ orderNo: orderNo }).then((res) => { if (res.result == 0) { //投被同人 if (res.orderDTO.insuredDTOs.length && res.orderDTO.insuredDTOs[0].relationToAppnt == '1') { @@ -913,7 +914,8 @@ export default { //如果关系是本人 if (value.id == 1) { //获取订单详情 - getOrderDetail({ orderNo: localStorage.orderNo }).then((res) => { + const orderNo = this.$CacheUtils.getLocItem('orderNo') + getOrderDetail({ orderNo: orderNo }).then((res) => { if (res.result == 0) { this.isAppnt = true //获取投保人信息 @@ -1563,7 +1565,7 @@ export default { orderType: 'INSURED_ORDER', orderDTO: { orderInfoDTO: { - orderNo: localStorage.orderNo, + orderNo: this.$CacheUtils.getLocItem('orderNo'), }, appntDTO: {}, }, @@ -1814,8 +1816,9 @@ export default { }, watch: { async 'withRootUser.value'(n) { - if (n) { - const rs = await getOrderDetail({ orderNo: window.localStorage.getItem('orderNo') }) + const orderNo = this.$CacheUtils.getLocItem('orderNo') + if (n && orderNo) { + const rs = await getOrderDetail({ orderNo: orderNo}) this.homeName = getAreaName([ { code: rs.orderDTO.appntDTO.homeProvince }, { code: rs.orderDTO.appntDTO.homeCity },