李志伟 3 years ago
parent
commit
76203049f7

+ 0
- 20
src/components/foodCards/foodCards.jsx View File

@@ -1,6 +1,4 @@
1 1
 import useSave from "@/utils/hooks/useSave"
2
-import { getShopDetail, getShopcity } from '@/services/home'
3
-import { useState, useEffect } from 'react'
4 2
 import Taro from '@tarojs/taro'
5 3
 import Star from '@/components/Star/Star.jsx'
6 4
 import pay from '@/assets/icons/housemantj/pay.png'
@@ -17,11 +15,6 @@ export default (props) => {
17 15
   const { item,st,det } = props
18 16
   const { shopId } = props.item
19 17
   const [isSaved, toggleSave] = useSave(item.isSaved, 'shop_package', item.packageId)
20
-  // const [city, setCity] = useState({})
21
-  // const [detail, setDetail] = useState({})
22
-
23
-
24
-
25 18
 
26 19
   const goFood = () => {
27 20
     const page = Taro.getCurrentPages()
@@ -34,19 +27,6 @@ export default (props) => {
34 27
 
35 28
     }
36 29
   }
37
-
38
-
39
-
40
-  // useEffect(() => {
41
-  //   getShopDetail(item.shopId).then((res) => {
42
-  //     setDetail(res)
43
-  //     getShopcity(res.cityId).then((res2) => {
44
-  //       setCity(res2)
45
-  //     })
46
-  //   })
47
-  // }, [])
48
-  // const star = parseFloat(((detail.sweetScore + detail.environmentScore + detail.serviceScore) / 3).toFixed(1));
49
-
50 30
   return (
51 31
     <view className='foodCard'>
52 32
       <view className='fCleft'>

+ 2
- 1
src/pages/details/mjDetails/sceneryDetails.jsx View File

@@ -156,7 +156,8 @@ export default withLayout((props) => {
156 156
             <view className='title'>
157 157
               <image src={titlems} />老板推荐好吃的
158 158
             </view>
159
-            {(recommend || []).map((item) => <Cards item={item} />)}
159
+            
160
+            {(recommend || []).map((item) => <Cards item={item} det={item} st={parseFloat(item.score.toFixed(1))}/>)}
160 161
           </view>
161 162
           <view className='bottom'>已经到底了~</view>
162 163
         </scroll-view>