|
@@ -8,8 +8,7 @@ import {
|
8
|
8
|
} from "@/services/home";
|
9
|
9
|
import { getVerifyTargetList } from "@/services/payOrder";
|
10
|
10
|
import { useState, useEffect, useRef } from "react";
|
11
|
|
-import { Button, Swiper, SwiperItem, View, Ad } from "@tarojs/components";
|
12
|
|
-import { compressImage } from '@/utils'
|
|
11
|
+import { Button,View, Ad } from "@tarojs/components";
|
13
|
12
|
import Star from "@/components/Star/Star.jsx";
|
14
|
13
|
import NoData from '@/components/NoData'
|
15
|
14
|
import Cards from "@/components/foodCards/foodCards.jsx";
|
|
@@ -28,15 +27,14 @@ import weibaozan from "@/assets/icons/housemantj/unLike.png";
|
28
|
27
|
import useSave from "@/utils/hooks/useSave";
|
29
|
28
|
import useLike from "@/utils/hooks/useLike";
|
30
|
29
|
import Extend from "../components/Extend/extend";
|
|
30
|
+import ImageList from "../components/ImageList";
|
31
|
31
|
import logo from "./laba.png";
|
32
|
|
-
|
33
|
32
|
import "./foodDetails.less";
|
34
|
33
|
|
35
|
34
|
export default withLayout((props) => {
|
36
|
35
|
const { router, person, location } = props;
|
37
|
36
|
const { id, subOrderId, scene } = props.router.params;
|
38
|
37
|
|
39
|
|
-
|
40
|
38
|
useEffect(() => {
|
41
|
39
|
if (id && (scene || subOrderId)) {
|
42
|
40
|
getVerifyTargetList({
|
|
@@ -60,10 +58,6 @@ export default withLayout((props) => {
|
60
|
58
|
const [spackage, setPackage] = useState([]);
|
61
|
59
|
//banner图集数组
|
62
|
60
|
const [imglist, setimglist] = useState([]);
|
63
|
|
- const [index, setIndex] = useState(0);
|
64
|
|
- const handchange = (e) => {
|
65
|
|
- setIndex(e.detail.current);
|
66
|
|
- };
|
67
|
61
|
|
68
|
62
|
const [isSaved, toggleSave] = useSave(detail.isSaved, "shop", id);
|
69
|
63
|
const [isLike, toggleLike] = useLike(detail.isLike, "shop", id);
|
|
@@ -143,7 +137,6 @@ export default withLayout((props) => {
|
143
|
137
|
const [isScroll, setScroll] = useState(true)
|
144
|
138
|
return (
|
145
|
139
|
<view className='page-index'>
|
146
|
|
-
|
147
|
140
|
{
|
148
|
141
|
guidance === 'shareOn' ? <view className='index-navbar'>
|
149
|
142
|
<add-tipsFood logo={logo} custom duration={-1} />
|
|
@@ -153,31 +146,13 @@ export default withLayout((props) => {
|
153
|
146
|
<CustomNav title='十公里' />
|
154
|
147
|
</view>
|
155
|
148
|
}
|
156
|
|
-
|
157
|
149
|
<SpinBox loading={loading} className='index-container' style={{ padding: '0 30rpx', background: '#F8F8F8' }}>
|
158
|
150
|
<scroll-view
|
159
|
151
|
scrollY={isScroll}
|
160
|
152
|
style={{ height: '100%' }}
|
161
|
153
|
>
|
162
|
154
|
<view className='storeDetails'>
|
163
|
|
- <View className='huadong'>
|
164
|
|
- <Swiper
|
165
|
|
- circular
|
166
|
|
- className='swiper'
|
167
|
|
- onChange={handchange}
|
168
|
|
- >
|
169
|
|
- {imglist.map((item, inx) => (
|
170
|
|
- <SwiperItem key={inx}>
|
171
|
|
- <image src={compressImage(item.url)} mode='aspectFit' className='storeImage' />
|
172
|
|
- </SwiperItem>
|
173
|
|
- ))}
|
174
|
|
- </Swiper>
|
175
|
|
- <view className='tpPage'>
|
176
|
|
- <text>
|
177
|
|
- {index + 1}/{imglist.length}
|
178
|
|
- </text>
|
179
|
|
- </view>
|
180
|
|
- </View>
|
|
155
|
+ <ImageList imglist={imglist} />
|
181
|
156
|
<view className='storeJs'>
|
182
|
157
|
<view style={{ overflow: "hidden" }}>
|
183
|
158
|
<view className='storeName'>{detail.shopName}</view>
|
|
@@ -254,10 +229,10 @@ export default withLayout((props) => {
|
254
|
229
|
<image src={titlezs} />
|
255
|
230
|
<text>本店指南</text>
|
256
|
231
|
</view>
|
257
|
|
- <View style={{background:'#FFF'}}>
|
258
|
|
- {(extend || []).map((item) => (
|
259
|
|
- <Extend key={item.extId} item={item} />
|
260
|
|
- ))}
|
|
232
|
+ <View style={{ background: '#FFF' }}>
|
|
233
|
+ {(extend || []).map((item) => (
|
|
234
|
+ <Extend key={item.extId} item={item} />
|
|
235
|
+ ))}
|
261
|
236
|
</View>
|
262
|
237
|
</view>
|
263
|
238
|
<view
|