|
@@ -0,0 +1,32 @@
|
|
1
|
+import React, { useState } from 'react'
|
|
2
|
+import Taro, { useShareAppMessage } from '@tarojs/taro'
|
|
3
|
+
|
|
4
|
+export default function useShare(shareRef) {
|
|
5
|
+ useShareAppMessage((res) => {
|
|
6
|
+ const {
|
|
7
|
+ title = '',
|
|
8
|
+ path = '',
|
|
9
|
+ imageUrl = '',
|
|
10
|
+ eventType = '',
|
|
11
|
+ propertyName = '',
|
|
12
|
+ consultantId = '',
|
|
13
|
+ sharePersonId = '',
|
|
14
|
+ targetId = '',
|
|
15
|
+ buildingId = '',
|
|
16
|
+ } = shareRef.current || {}
|
|
17
|
+
|
|
18
|
+ // // 分享埋点
|
|
19
|
+ // shareSavePoint({
|
|
20
|
+ // event: 'share',
|
|
21
|
+ // eventType: 'building',
|
|
22
|
+ // propertyName: '项目详情分享',
|
|
23
|
+ // consultantId: consultantId,
|
|
24
|
+ // sharePersonId: personId,
|
|
25
|
+ // targetId: buildingId,
|
|
26
|
+ // buildingId: buildingId || '',
|
|
27
|
+ // data: '{}'
|
|
28
|
+ // }, 'project')
|
|
29
|
+
|
|
30
|
+ return shareObject
|
|
31
|
+ })
|
|
32
|
+}
|