From f7c6041a3260fd6cbe10d1f93f69b02a9dd69407 Mon Sep 17 00:00:00 2001 From: mengxiaolong Date: Fri, 5 Mar 2021 21:03:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E4=BA=AB=E5=BB=BA=E8=AE=AE=E4=B9=A6to?= =?UTF-8?q?ken=E5=A4=B1=E6=95=88=E9=97=AE=E9=A2=98=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/ebiz/proposal/proposal.js | 17 ++++++++++++ src/views/ebiz/proposal/ProposalInfo.vue | 34 +++++++++++++----------- 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/src/api/ebiz/proposal/proposal.js b/src/api/ebiz/proposal/proposal.js index 81cdde999..1ca15411c 100644 --- a/src/api/ebiz/proposal/proposal.js +++ b/src/api/ebiz/proposal/proposal.js @@ -74,3 +74,20 @@ export function deleteProposal(data) { data }) } +// e活动建议书分享统计 +export function share(data = {}) { + return request({ + url: getUrl('/proposal/proposal/share', 1), + method: 'post', + data + }) +} + +// e活动建议书分享统计 +export function getSharingToken(data = {}) { + return request({ + url: getUrl('/customer/account/getShareParam', 1), + method: 'post', + data + }) +} diff --git a/src/views/ebiz/proposal/ProposalInfo.vue b/src/views/ebiz/proposal/ProposalInfo.vue index 79c1ea9dc..e6acb3dff 100644 --- a/src/views/ebiz/proposal/ProposalInfo.vue +++ b/src/views/ebiz/proposal/ProposalInfo.vue @@ -291,15 +291,13 @@ import { Button } from 'vant' import SelectRadio from '@/components/ebiz/SelectRadio' -import { getDemo, toInsurance, getDemoByProposalNo } 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() { @@ -500,19 +498,24 @@ export default { } }, //app回调 - appCallBack(data) { + async appCallBack(data) { if (data.trigger == 'right_button_click') { - // 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, - img: this.$assetsUrl + 'images/logo.png' - } - }) + 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(res.content), + img: this.$assetsUrl + 'images/logo.png' + } + }) + share() + } else { + return this.$toast(res.resultMessage) + } } if (data.trigger == 'left_button_click') { this.$jump({ @@ -787,7 +790,6 @@ export default { } }, components: { - Layout, [Field.name]: Field, [Popup.name]: Popup, [Picker.name]: Picker,