添加签名回调参数

This commit is contained in:
mengxiaolong
2020-08-09 17:27:57 +08:00
parent 6ef44616a0
commit b2aa914b86

View File

@@ -89,11 +89,11 @@
<div class="autograph"> <div class="autograph">
<div class="list"> <div class="list">
<span>投保人/监护人亲笔签名</span> <span>投保人/监护人亲笔签名</span>
<van-button type="danger" size="small" @click="autograph(0)">{{ policyholderSigned ? '已签名' : '签名' }}</van-button> <van-button type="danger" size="small" @click="autograph(0)">{{ policyholderSigned ? '已签名' : '签名' }}</van-button>
</div> </div>
<div class="list" v-if="$route.query.receiveType === '1'"> <div class="list" v-if="$route.query.receiveType === '1'">
<span>被投保人亲笔签名</span> <span>被投保人亲笔签名</span>
<van-button type="danger" size="small" @click="autograph(1)">{{ insurantSigned ? '已签名' : '签名' }}</van-button> <van-button type="danger" size="small" @click="autograph(1)">{{ insurantSigned ? '已签名' : '签名' }}</van-button>
</div> </div>
</div> </div>
<div class="bg-white bottom-btn"> <div class="bg-white bottom-btn">
@@ -405,8 +405,8 @@ export default {
async getMessage({ data }) { async getMessage({ data }) {
// 获取dialog信息type为confirm时为短信框alert时是确定框 // 获取dialog信息type为confirm时为短信框alert时是确定框
let problemData = { let problemData = {
id: this.currentProblem.id, id: this.$route.params.id,
businessType: this.currentProblem.businessType, businessType: this.$route.params.type,
content: '', content: '',
disposeStatus: '', disposeStatus: '',
bankType: '', bankType: '',
@@ -481,9 +481,8 @@ export default {
this.problemDetail.receiveType = this.$route.query.receiveType this.problemDetail.receiveType = this.$route.query.receiveType
this.supplement.descriptionInsurant = this.problemDetail.content this.supplement.descriptionInsurant = this.problemDetail.content
this.supplement.descriptionPolicyholder = this.problemDetail.issueContent this.supplement.descriptionPolicyholder = this.problemDetail.issueContent
this.currentProblem = JSON.parse(localStorage.getItem('currentProblemItem'))
}, },
//微信空签 // 微信空签
toAirSign(status, keyword, offset, originStatus, personType) { toAirSign(status, keyword, offset, originStatus, personType) {
sessionStorage.removeItem('twoimgBase64Data') sessionStorage.removeItem('twoimgBase64Data')
sessionStorage.removeItem('twowxSigned') sessionStorage.removeItem('twowxSigned')
@@ -500,13 +499,14 @@ export default {
keyword: keyword, keyword: keyword,
status: status, status: status,
offset: offset, offset: offset,
originUrl: location.href originUrl: location.href + '&fromSign=true'
}) })
) )
window.location.href = this.$mainUrl + '/sign/index.html' window.location.href = this.$mainUrl + '/sign/index.html'
} }
}, },
async created() { async created() {
// 问题件类型
this.issueType = this.$route.params.type this.issueType = this.$route.params.type
if (this.isWeixin) { if (this.isWeixin) {
localStorage.setItem('token', this.$route.query.token) localStorage.setItem('token', this.$route.query.token)
@@ -518,7 +518,7 @@ export default {
console.log('wxSigned ::: ', wxSigned) console.log('wxSigned ::: ', wxSigned)
console.dir('signInfo ::: ', signInfo) console.dir('signInfo ::: ', signInfo)
if (wxSigned) { if (this.$route.query.fromSign) {
console.log('微信签名回调') console.log('微信签名回调')
// 0代表投保人签名 // 0代表投保人签名
if (Number(localStorage.getItem('signedPersonType')) === 0) { if (Number(localStorage.getItem('signedPersonType')) === 0) {
@@ -532,8 +532,7 @@ export default {
localStorage.setItem('insurantSignInfo', imgBase64Data) localStorage.setItem('insurantSignInfo', imgBase64Data)
} }
} }
} } else {
if (!signInfo) {
localStorage.removeItem('insurantSignInfo') localStorage.removeItem('insurantSignInfo')
localStorage.removeItem('policyholderSignInfo') localStorage.removeItem('policyholderSignInfo')
localStorage.removeItem('agreementChecked') localStorage.removeItem('agreementChecked')