hotfix-从路由获取token存储到LocalStorage时新增token是否为空判断

This commit is contained in:
zhang.weiwei
2025-04-30 23:00:01 +08:00
parent a1895b540c
commit d13ce27e3c
11 changed files with 858 additions and 831 deletions

View File

@@ -204,7 +204,9 @@ export default {
//初始化信息 //初始化信息
async init() { async init() {
if (this.isWeixin) { if (this.isWeixin) {
window.localStorage.setItem('token', this.$route.query.token) if (this.$route.query.token) {
window.localStorage.setItem('token', this.$route.query.token)
}
if (this.$route.query.signInvalid) { if (this.$route.query.signInvalid) {
sessionStorage.setItem('signInvalid', this.$route.query.signInvalid) sessionStorage.setItem('signInvalid', this.$route.query.signInvalid)
} }

View File

@@ -151,7 +151,9 @@ export default {
// 初始化 // 初始化
async init() { async init() {
if (this.isWeixin) { if (this.isWeixin) {
window.localStorage.setItem('token', this.$route.query.token) if (this.$route.query.token) {
window.localStorage.setItem('token', this.$route.query.token)
}
// let signInvalid = sessionStorage.getItem('signInvalid') // let signInvalid = sessionStorage.getItem('signInvalid')
// let rs = await this.checkSignInvalid(signInvalid) // 微信分享验证校验值 // let rs = await this.checkSignInvalid(signInvalid) // 微信分享验证校验值
// if (rs == '1') { // if (rs == '1') {
@@ -163,7 +165,11 @@ export default {
//获取腾讯人脸识别URL后重新跳回页面验证腾讯人脸识别结果成功的话调签字面板 //获取腾讯人脸识别URL后重新跳回页面验证腾讯人脸识别结果成功的话调签字面板
if (localStorage['faceAuthWeXin-requestId'] && localStorage['faceAuthWeXin-bizToken'] && this.$route.query.faceAuthCountWeixin != undefined) { if (localStorage['faceAuthWeXin-requestId'] && localStorage['faceAuthWeXin-bizToken'] && this.$route.query.faceAuthCountWeixin != undefined) {
this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']), JSON.parse(localStorage['orderNo'])) this.getRecognitionResult(
JSON.parse(localStorage['faceAuthWeXin-requestId']),
JSON.parse(localStorage['faceAuthWeXin-bizToken']),
JSON.parse(localStorage['orderNo'])
)
} }
this.faceAuthCount.enjoy = this.$route.query.faceAuthCountAppnt == undefined ? 0 : Number(this.$route.query.faceAuthCountAppnt) this.faceAuthCount.enjoy = this.$route.query.faceAuthCountAppnt == undefined ? 0 : Number(this.$route.query.faceAuthCountAppnt)
this.faceAuthCount.weixin = this.$route.query.faceAuthCountWeixin == undefined ? 0 : Number(this.$route.query.faceAuthCountWeixin) this.faceAuthCount.weixin = this.$route.query.faceAuthCountWeixin == undefined ? 0 : Number(this.$route.query.faceAuthCountWeixin)

View File

@@ -213,7 +213,9 @@ export default {
//从签名页调过来的标识 //从签名页调过来的标识
sessionStorage.setItem('airSign', this.$route.query.airSign) sessionStorage.setItem('airSign', this.$route.query.airSign)
} }
localStorage.setItem('token', this.$route.query.token) if (this.$route.query.token) {
localStorage.setItem('token', this.$route.query.token)
}
if (this.$route.query.signInvalid) { if (this.$route.query.signInvalid) {
sessionStorage.setItem('signInvalid', this.$route.query.signInvalid) sessionStorage.setItem('signInvalid', this.$route.query.signInvalid)
} }

View File

@@ -396,7 +396,9 @@ export default {
} }
// this.$CacheUtils.setLocItem('saleInsuredInfo', this.$route.query.saleInsuredInfo) // this.$CacheUtils.setLocItem('saleInsuredInfo', this.$route.query.saleInsuredInfo)
// window.localStorage.setItem('saleInsuredPersonInfo', this.$route.query.saleInsuredPersonInfo) // window.localStorage.setItem('saleInsuredPersonInfo', this.$route.query.saleInsuredPersonInfo)
window.localStorage.setItem('token', this.$route.query.token) if (this.$route.query.token) {
window.localStorage.setItem('token', this.$route.query.token)
}
window.localStorage.setItem('orderNo', this.$route.query.orderNo) window.localStorage.setItem('orderNo', this.$route.query.orderNo)
// window.localStorage.setItem('relationToAppnt', this.$route.query.relationToAppnt) // window.localStorage.setItem('relationToAppnt', this.$route.query.relationToAppnt)
// window.localStorage.setItem('productCode', this.$route.query.productCode) // window.localStorage.setItem('productCode', this.$route.query.productCode)

View File

@@ -4,7 +4,7 @@
<p class="fs18 fwb">公司介绍</p> <p class="fs18 fwb">公司介绍</p>
<van-image width="100%" height="150" :src="img1" class="mt15" /> <van-image width="100%" height="150" :src="img1" class="mt15" />
<p class="fs14 indent"> <p class="fs14 indent">
国富人寿保险股份有限公司是经中国银保监会批准于2018年6月成立的全国性寿险公司公司由广西投资集团唯品会吉安新年等8家知名企业共同出资创立注册资本金15亿元总部位于南宁市是广西壮族自治区首家寿险法人机构公司以因为国富所以民安为使命用心研发实惠产品用爱提供实在服务守护幸福美好生活 国富人寿保险股份有限公司是经中国银保监会批准于2018年6月成立的全国性寿险公司公司由广西投资集团唯品会吉安新年等8家知名企业共同出资创立注册资本金15亿元总部位于南宁市是广西壮族自治区首家寿险法人机构公司以因为国富所以民安为使命用心研发实惠产品用爱提供实在服务守护幸福美好生活
</p> </p>
<!-- <p class="fs14 indent"> <!-- <p class="fs14 indent">
国富人寿将秉持老有所养病有所医红利共享国富民安的核心理念让更多的人过上有尊严的健康快乐的生活作为企业使命树立并践行简单专注诚信激情关爱领先的价值观专注于客户体验研发满足客户需求的产品为客户提供有温度的服务依法合规稳健经营立足广西深耕广西面向全国更好地回馈社会回报股东与时俱进超越自我 国富人寿将秉持老有所养病有所医红利共享国富民安的核心理念让更多的人过上有尊严的健康快乐的生活作为企业使命树立并践行简单专注诚信激情关爱领先的价值观专注于客户体验研发满足客户需求的产品为客户提供有温度的服务依法合规稳健经营立足广西深耕广西面向全国更好地回馈社会回报股东与时俱进超越自我
@@ -75,7 +75,9 @@ export default {
this.redisKey = this.$route.query.redisKey this.redisKey = this.$route.query.redisKey
if (this.redisKey) { if (this.redisKey) {
this.saveShareRecord('1') this.saveShareRecord('1')
localStorage.setItem('token', this.$route.query.token) if (this.$route.query.token) {
localStorage.setItem('token', this.$route.query.token)
}
} else { } else {
this.getShareKey() this.getShareKey()
} }
@@ -117,7 +119,7 @@ export default {
url: `${location.origin}/#/manpower/increaseStaffTools/CompanyIntroduction` url: `${location.origin}/#/manpower/increaseStaffTools/CompanyIntroduction`
} }
getShareKey(data) getShareKey(data)
.then(res => { .then((res) => {
console.log(res) console.log(res)
if (res.result == 0) { if (res.result == 0) {
this.redisKey = res.content this.redisKey = res.content
@@ -125,7 +127,7 @@ export default {
this.$toast(res.resultMessage) this.$toast(res.resultMessage)
} }
}) })
.catch(err => { .catch((err) => {
console.log(err) console.log(err)
}) })
}, },

View File

@@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<iframe :src="src + pdfUrl" style="width:100vw;height:100vh"></iframe> <iframe :src="src + pdfUrl" style="width: 100vw; height: 100vh"></iframe>
</div> </div>
</template> </template>
@@ -38,7 +38,9 @@ export default {
this.redisKey = this.$route.query.redisKey this.redisKey = this.$route.query.redisKey
if (this.redisKey) { if (this.redisKey) {
this.saveShareRecord('1') this.saveShareRecord('1')
localStorage.setItem('token', this.$route.query.token) if (this.$route.query.token) {
localStorage.setItem('token', this.$route.query.token)
}
} else { } else {
this.getShareKey() this.getShareKey()
} }
@@ -83,7 +85,7 @@ export default {
url: `${location.origin}/pdfjs/web/viewer.html?file=${this.pdfUrl}` url: `${location.origin}/pdfjs/web/viewer.html?file=${this.pdfUrl}`
} }
getShareKey(data) getShareKey(data)
.then(res => { .then((res) => {
console.log(res) console.log(res)
if (res.result == 0) { if (res.result == 0) {
this.redisKey = res.content this.redisKey = res.content
@@ -91,7 +93,7 @@ export default {
this.$toast(res.resultMessage) this.$toast(res.resultMessage)
} }
}) })
.catch(err => { .catch((err) => {
console.log(err) console.log(err)
}) })
}, },

View File

@@ -48,7 +48,7 @@
</div> </div>
<div v-else> <div v-else>
<template v-if="redirectUrl"> <template v-if="redirectUrl">
<iframe v-show="thirdUrlReady" style="width: 100vw; min-height: 100vh;" :src="redirectUrl" frameborder="0"></iframe> <iframe v-show="thirdUrlReady" style="width: 100vw; min-height: 100vh" :src="redirectUrl" frameborder="0"></iframe>
</template> </template>
<template v-if="detailImg"> <template v-if="detailImg">
<img id="detailImg" v-if="detailImg" :src="$assetsUrl + detailImg" /> <img id="detailImg" v-if="detailImg" :src="$assetsUrl + detailImg" />
@@ -151,7 +151,9 @@ export default {
}, },
async mounted() { async mounted() {
if (this.isWeixin) { if (this.isWeixin) {
window.localStorage.setItem('token', this.$route.query.token) if (this.$route.query.token) {
window.localStorage.setItem('token', this.$route.query.token)
}
this.loginInfo.aname = decodeURI(this.$route.query.aname) this.loginInfo.aname = decodeURI(this.$route.query.aname)
this.loginInfo.password = decodeURI(this.$route.query.password) this.loginInfo.password = decodeURI(this.$route.query.password)
this.shareId = this.$route.query.shareId this.shareId = this.$route.query.shareId
@@ -162,7 +164,7 @@ export default {
}, },
methods: { methods: {
prevImg(i) { prevImg(i) {
let imgs = this.imgList.map(img => { let imgs = this.imgList.map((img) => {
return this.$assetsUrl + img return this.$assetsUrl + img
}) })
ImagePreview(imgs, i) ImagePreview(imgs, i)
@@ -259,7 +261,7 @@ export default {
//分享轨迹保存 //分享轨迹保存
saveShareTrack(data) { saveShareTrack(data) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
saveShareTrack(data).then(res => { saveShareTrack(data).then((res) => {
if (res.result == '0') { if (res.result == '0') {
resolve() resolve()
} else { } else {

File diff suppressed because it is too large Load Diff

View File

@@ -696,7 +696,9 @@ export default {
if (this.$route.query.airSign) { if (this.$route.query.airSign) {
sessionStorage.setItem('airSign', this.$route.query.airSign) sessionStorage.setItem('airSign', this.$route.query.airSign)
} }
window.localStorage.setItem('token', this.$route.query.token) if (this.$route.query.token) {
window.localStorage.setItem('token', this.$route.query.token)
}
window.localStorage.setItem('orderNo', this.$route.query.orderNo) window.localStorage.setItem('orderNo', this.$route.query.orderNo)
if (this.$route.query.changeCard == '0') { if (this.$route.query.changeCard == '0') {
localStorage.setItem('changeCard', true) localStorage.setItem('changeCard', true)

View File

@@ -315,7 +315,9 @@ export default {
this.$CacheUtils.setLocItem('saleInsuredInfo', this.$route.query.saleInsuredInfo) this.$CacheUtils.setLocItem('saleInsuredInfo', this.$route.query.saleInsuredInfo)
this.$CacheUtils.setLocItem('saleInsuredPersonInfo', this.$route.query.saleInsuredPersonInfo) this.$CacheUtils.setLocItem('saleInsuredPersonInfo', this.$route.query.saleInsuredPersonInfo)
window.localStorage.setItem('token', this.$route.query.token) if (this.$route.query.token) {
window.localStorage.setItem('token', this.$route.query.token)
}
window.localStorage.setItem('orderNo', this.$route.query.orderNo) window.localStorage.setItem('orderNo', this.$route.query.orderNo)
window.localStorage.setItem('relationToAppnt', this.$route.query.relationToAppnt) window.localStorage.setItem('relationToAppnt', this.$route.query.relationToAppnt)
if (this.$route.query.signInvalid) { if (this.$route.query.signInvalid) {

View File

@@ -15,10 +15,15 @@
<van-field maxlength="6" placeholder="请输入短信验证码" v-model="authCode" clearable label-width="0" /> <van-field maxlength="6" placeholder="请输入短信验证码" v-model="authCode" clearable label-width="0" />
<van-button type="danger" plain size="small" class="w160 p0" @click="getAuthCode" :disabled="codeDisabled" v-no-more-click="2000">{{ <van-button type="danger" plain size="small" class="w160 p0" @click="getAuthCode" :disabled="codeDisabled" v-no-more-click="2000">{{
codeDisabled ? `${countDown}s后重新获取` : '获取验证码' codeDisabled ? `${countDown}s后重新获取` : '获取验证码'
}}</van-button> }}</van-button>
</van-cell-group> </van-cell-group>
</van-dialog> </van-dialog>
<UploadImageFile :typeface="idcardData.typeface && (faceAuthCount.weixin < smsAuthNum)" :realName="idcardData.idcardName" :idno="idcardData.idcardNumber" @sendimage="sendimage"> <UploadImageFile
:typeface="idcardData.typeface && faceAuthCount.weixin < smsAuthNum"
:realName="idcardData.idcardName"
:idno="idcardData.idcardNumber"
@sendimage="sendimage"
>
</UploadImageFile> </UploadImageFile>
<div class="p60"> <div class="p60">
<van-button type="danger" @click="uploadComparison" size="large">上传照片与证件照对比</van-button> <van-button type="danger" @click="uploadComparison" size="large">上传照片与证件照对比</van-button>
@@ -82,7 +87,9 @@ export default {
created() { created() {
if (this.isWeixin) { if (this.isWeixin) {
this.$CacheUtils.setLocItem('saleInsuredInfo', this.$route.query.saleInsuredInfo) this.$CacheUtils.setLocItem('saleInsuredInfo', this.$route.query.saleInsuredInfo)
window.localStorage.setItem('token', this.$route.query.token) if (this.$route.query.token) {
window.localStorage.setItem('token', this.$route.query.token)
}
window.localStorage.setItem('policyNo', this.$route.query.policyNo) window.localStorage.setItem('policyNo', this.$route.query.policyNo)
this.idcardData.idcardName = JSON.parse(this.$route.query.saleInsuredInfo).name this.idcardData.idcardName = JSON.parse(this.$route.query.saleInsuredInfo).name
this.idcardData.idcardNumber = JSON.parse(this.$route.query.saleInsuredInfo).idNo this.idcardData.idcardNumber = JSON.parse(this.$route.query.saleInsuredInfo).idNo
@@ -120,7 +127,7 @@ export default {
operateCode: this.customerMobile, operateCode: this.customerMobile,
system: 'agentApp', system: 'agentApp',
operateCodeType: '0' operateCodeType: '0'
}).then(res => { }).then((res) => {
console.log(res) console.log(res)
if (res.result == 0) { if (res.result == 0) {
this.sid = res.sessionId this.sid = res.sessionId
@@ -178,7 +185,7 @@ export default {
this.authCode = null this.authCode = null
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
checkPhone(data).then(res => { checkPhone(data).then((res) => {
if (res.result == '0') { if (res.result == '0') {
console.log(res) console.log(res)
this.show = true this.show = true
@@ -203,7 +210,7 @@ export default {
if (e) { if (e) {
that.disabled = false that.disabled = false
} else { } else {
this.faceAuthCount.weixin++; this.faceAuthCount.weixin++
if (this.faceAuthCount.weixin >= this.smsAuthNum) { if (this.faceAuthCount.weixin >= this.smsAuthNum) {
this.realPeopelCheck() this.realPeopelCheck()
} }
@@ -219,7 +226,7 @@ export default {
}, },
//根据数据字典 将后端返回的数据渲染到页面中 //根据数据字典 将后端返回的数据渲染到页面中
filterData(dictionary, key, pageData) { filterData(dictionary, key, pageData) {
dictionary.forEach(item => { dictionary.forEach((item) => {
if (pageData[key] == item.id) { if (pageData[key] == item.id) {
pageData[key + 'Text'] = item.text //渲染页面使用的字段 pageData[key + 'Text'] = item.text //渲染页面使用的字段
} }
@@ -231,7 +238,7 @@ export default {
let data = { let data = {
policyNo: this.$route.query.policyNo policyNo: this.$route.query.policyNo
} }
getPolicyDetail(data).then(res => { getPolicyDetail(data).then((res) => {
if (res.result == '0') { if (res.result == '0') {
let appntDTO = res.content.appntDTO let appntDTO = res.content.appntDTO
let orderInfoDTO = res.content.orderInfoDTO let orderInfoDTO = res.content.orderInfoDTO
@@ -249,8 +256,8 @@ export default {
this.filterData(dataDictionary.idType, 'idType', appntDTO) this.filterData(dataDictionary.idType, 'idType', appntDTO)
that.appntDTO = appntDTO that.appntDTO = appntDTO
// 被保险人信息 // 被保险人信息
res.content.insuredDTOs.map(insured => { res.content.insuredDTOs.map((insured) => {
insured.riskDTOLst.map(risk => { insured.riskDTOLst.map((risk) => {
Number(risk.payIntv) Number(risk.payIntv)
switch (risk.payIntv) { switch (risk.payIntv) {
case -1: case -1:
@@ -287,7 +294,7 @@ export default {
this.filterData(dataDictionary.sex, 'sex', insured) this.filterData(dataDictionary.sex, 'sex', insured)
this.filterData(dataDictionary.idType, 'idType', insured) this.filterData(dataDictionary.idType, 'idType', insured)
this.filterData(dataDictionary.relationToAppnt, 'relation', insured) this.filterData(dataDictionary.relationToAppnt, 'relation', insured)
insured.bnfDTOs.map(bnf => { insured.bnfDTOs.map((bnf) => {
this.filterData(dataDictionary.bnfType, 'bnfType', bnf) this.filterData(dataDictionary.bnfType, 'bnfType', bnf)
this.filterData(dataDictionary.sex, 'sex', bnf) this.filterData(dataDictionary.sex, 'sex', bnf)
this.filterData(dataDictionary.idType, 'idType', bnf) this.filterData(dataDictionary.idType, 'idType', bnf)
@@ -307,7 +314,7 @@ export default {
let params = { let params = {
contNo: this.$route.query.policyNo contNo: this.$route.query.policyNo
} }
getReceiptSign(params).then(res => { getReceiptSign(params).then((res) => {
if (res.result == '0') { if (res.result == '0') {
console.log('res', res) console.log('res', res)
this.$toast.clear() this.$toast.clear()