|
@@ -10,7 +10,6 @@ import withLayout from '@/layouts'
|
10
|
10
|
import SpinBox from "@/components/Spin/SpinBox";
|
11
|
11
|
import { getNoteID } from '@/services/note'
|
12
|
12
|
import { getTravelMine } from '@/services/travel'
|
13
|
|
-
|
14
|
13
|
import TabIcon from '@/components/HorTabbar/TabIcon'
|
15
|
14
|
import { useState, useEffect } from 'react'
|
16
|
15
|
import { getExtendContent } from '@/services/home'
|
|
@@ -22,7 +21,6 @@ import ShopNoteCard from '@/components/foodCards/ShopNoteCard/index'
|
22
|
21
|
import Taro, { useShareAppMessage } from '@tarojs/taro'
|
23
|
22
|
import Extend from '../components/Extend/extend'
|
24
|
23
|
import ImageList from "../components/ImageList";
|
25
|
|
-
|
26
|
24
|
import './index.less'
|
27
|
25
|
|
28
|
26
|
|
|
@@ -37,10 +35,6 @@ export default withLayout((props) => {
|
37
|
35
|
const [travelMine, setTravelMine] = useState()
|
38
|
36
|
//banner图集数组
|
39
|
37
|
const [imglist, setimglist] = useState([])
|
40
|
|
- const [index, setIndex] = useState(0)
|
41
|
|
- const handchange = (e) => {
|
42
|
|
- setIndex(e.detail.current)
|
43
|
|
- }
|
44
|
38
|
|
45
|
39
|
//本店指南
|
46
|
40
|
const [extend, setExtend] = useState([])
|
|
@@ -62,17 +56,13 @@ export default withLayout((props) => {
|
62
|
56
|
Taro.createSelectorQuery().selectAll('.get-Video-Width').boundingClientRect(function (rects) {
|
63
|
57
|
rects.forEach(function (rect) {
|
64
|
58
|
setGetVideoWidth(rect.width)
|
65
|
|
-
|
66
|
59
|
})
|
67
|
60
|
}).exec()
|
68
|
|
-
|
69
|
61
|
})
|
70
|
62
|
}, [])
|
71
|
63
|
|
72
|
64
|
|
73
|
65
|
useEffect(() => {
|
74
|
|
-
|
75
|
|
-
|
76
|
66
|
if (router.params.enterType === "share") {
|
77
|
67
|
setGuidance('shareOn')
|
78
|
68
|
}
|
|
@@ -84,21 +74,15 @@ export default withLayout((props) => {
|
84
|
74
|
setDetail(res)
|
85
|
75
|
setimglist(res.imageList || [])
|
86
|
76
|
setRecommend(res.wxResourceList || [])
|
87
|
|
-
|
88
|
|
-
|
89
|
77
|
}).catch(e => {
|
90
|
78
|
console.error("getNoteID错误", e)
|
91
|
79
|
setLoading(false)
|
92
|
|
-
|
93
|
80
|
})
|
94
|
|
-
|
95
|
81
|
}
|
96
|
82
|
const handelNoteList = () => {
|
97
|
83
|
getTravelMine({ pageNum: 1, pageSize: 99, simple: true }).then(e => {
|
98
|
84
|
setTravelMine(e)
|
99
|
|
-
|
100
|
85
|
})
|
101
|
|
-
|
102
|
86
|
}
|
103
|
87
|
|
104
|
88
|
useEffect(() => {
|
|
@@ -112,7 +96,6 @@ export default withLayout((props) => {
|
112
|
96
|
}, [getVideoWidth, proportion])
|
113
|
97
|
|
114
|
98
|
const hanleLoade = (e) => {
|
115
|
|
-
|
116
|
99
|
//视频的高
|
117
|
100
|
const height = e.detail.height;
|
118
|
101
|
//视频的宽
|
|
@@ -121,21 +104,11 @@ export default withLayout((props) => {
|
121
|
104
|
setProportion(height / width)
|
122
|
105
|
//res.windowWidth为手机屏幕的宽。
|
123
|
106
|
// const windowWidth = res.windowWidth;
|
124
|
|
-
|
125
|
|
-
|
126
|
|
-
|
127
|
|
-
|
128
|
|
-
|
129
|
107
|
}
|
130
|
108
|
|
131
|
109
|
useEffect(() => {
|
132
|
110
|
//获取我的行程。
|
133
|
111
|
handelNoteList()
|
134
|
|
- // getTravelMine({ pageNum: 1, pageSize: 99, simple: true }).then(e => {
|
135
|
|
- // setTravelMine(e)
|
136
|
|
-
|
137
|
|
- // })
|
138
|
|
-
|
139
|
112
|
if (id) {
|
140
|
113
|
setLoading(true)
|
141
|
114
|
getNoteID(id).then((res) => {
|