|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <web-view :src="url" />
|
|
|
+ <web-view :src="url" @message="handleGetMessage"/>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -7,7 +7,8 @@ import {h5BaseUrl} from '@/utils/config'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- url:''
|
|
|
+ url:'',
|
|
|
+ msgObj:{}
|
|
|
};
|
|
|
},
|
|
|
onLoad(options) {
|
|
@@ -17,6 +18,19 @@ export default {
|
|
|
const token=this.$store.state.user.token
|
|
|
this.url=`${h5BaseUrl}/hzyb/report/chapterdetail?chapterId=${chapterId}&fromPage=${fromPage}&token=${token}×tamp=${timestamp}#wechat_redirect`
|
|
|
},
|
|
|
+ onShareAppMessage() {
|
|
|
+ return {
|
|
|
+ title:msgObj.title,
|
|
|
+ path:`/pages-report/chapterDetail?chapterId=${msgObj.chapterId}`
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ handleGetMessage(e){
|
|
|
+ const data=e.detail.data[e.detail.data.length-1]
|
|
|
+ console.log('h5传来的数据',data);
|
|
|
+ this.msgObj=data
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|