|
@@ -7,6 +7,7 @@ import logo from '@/assets/icons/comm/logo_small.png'
|
7
|
7
|
import { getHotelDetail } from '@/services/landlord'
|
8
|
8
|
import { getTaRoom } from '@/services/taRoom'
|
9
|
9
|
import withLayout from '@/layouts'
|
|
10
|
+import { trackClick } from '@/services/track'
|
10
|
11
|
import { useModel } from "@/store";
|
11
|
12
|
import { withSubscribeMessage } from '@/utils/subscribeMessage'
|
12
|
13
|
import { TPL_MESSAGE_HOTEL_CHECK_OUT } from '@/utils/constants'
|
|
@@ -43,10 +44,28 @@ export default withLayout((props) => {
|
43
|
44
|
useDidShow(() => {
|
44
|
45
|
setIsDidShow(isDidShow + 1)
|
45
|
46
|
})
|
|
47
|
+
|
|
48
|
+
|
46
|
49
|
const handleTabChange = (e) => {
|
47
|
50
|
const { index } = e.detail
|
48
|
51
|
setCurrentTab(index)
|
49
|
52
|
|
|
53
|
+ if (roomId && hotelId) {
|
|
54
|
+
|
|
55
|
+ trackClick({
|
|
56
|
+ eventParams: `tab=${index}&hotelId=${hotelId}&roomId=${roomId}`,
|
|
57
|
+ //如果首页增加新页面,这个判断一定要改;
|
|
58
|
+ onVarified: `${index === 0 ? 'index_recommend' : index === 1 ? 'hotel_guide' : 'user_center'}`,
|
|
59
|
+ page: `/pages/index/index`
|
|
60
|
+ }).then((val) => {
|
|
61
|
+
|
|
62
|
+ })
|
|
63
|
+
|
|
64
|
+ } else {
|
|
65
|
+ trackClick({ eventParams: `tab=${index}`, page: `/pages/index/index` }).then((res) => {
|
|
66
|
+ })
|
|
67
|
+ }
|
|
68
|
+
|
50
|
69
|
if (index === 1) {
|
51
|
70
|
// 民宿离店消息
|
52
|
71
|
withSubscribeMessage([TPL_MESSAGE_HOTEL_CHECK_OUT])
|