Merge branch 'hotfix/【20210305】分享建议书token失效问题优化' into dev

# Conflicts:
#	src/api/ebiz/proposal/proposal.js
#	src/views/ebiz/proposal/ProposalInfo.vue
This commit is contained in:
mengxiaolong
2021-03-05 21:05:13 +08:00
2 changed files with 27 additions and 17 deletions

View File

@@ -82,3 +82,12 @@ export function share(data = {}) {
data
})
}
// 分享建议书获取token
export function getSharingToken(data = {}) {
return request({
url: getUrl('/customer/account/getShareParam', 1),
method: 'post',
data
})
}

View File

@@ -291,15 +291,13 @@ import {
Button
} from 'vant'
import SelectRadio from '@/components/ebiz/SelectRadio'
import { getDemo, toInsurance, getDemoByProposalNo, share } from '@/api/ebiz/proposal/proposal.js'
import { getDemo, toInsurance, getDemoByProposalNo, share, getSharingToken } from '@/api/ebiz/proposal/proposal.js'
import { haveTap, getTapIndex, relevanceByInsure } from './js/exhibitionMethod.js'
import { formatRiskList } from '@/assets/js/utils/formatRiskList.js'
import { weixinShare } from '@/assets/js/utils/wxShare.js'
import { getAgentInfo } from '@/api/ebiz/my/my.js'
import getAge from '@/assets/js/utils/age.js'
import filters from '@/filters'
import dataDictionary from '@/assets/js/utils/data-dictionary'
import Layout from '../../app/layout/Layout' //使用数据字典中的险种类型
import riskRules from '../common/risk-rules.js'
export default {
data() {
@@ -507,20 +505,24 @@ export default {
}
},
//app回调
appCallBack(data) {
async appCallBack(data) {
if (data.trigger == 'right_button_click') {
let res = await getSharingToken({})
if (res.result == '0') {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('bridge', {
flag: 'share',
extra: {
title: this.wxTitle,
content: '国富为您量身定制的保险产品,请查收',
url: location.origin + '/#/proposal/proposalInfo?proposalNo=' + encodeURI(localStorage.orderNo) + '&token=' + encodeURI(localStorage.token),
// url: 'http://47.96.143.111/#/proposal/proposalInfo?proposalNo=' + localStorage.orderNo + '&token=' + localStorage.token,
url: location.origin + '/#/proposal/proposalInfo?proposalNo=' + encodeURI(localStorage.orderNo) + '&token=' + encodeURI(res.content),
img: this.$assetsUrl + 'images/logo.png'
}
})
share()
} else {
return this.$toast(res.resultMessage)
}
}
if (data.trigger == 'left_button_click') {
this.$jump({
@@ -797,7 +799,6 @@ export default {
}
},
components: {
Layout,
[Field.name]: Field,
[Popup.name]: Popup,
[Picker.name]: Picker,