|
@@ -14,11 +14,11 @@ import './style.less'
|
14
|
14
|
|
15
|
15
|
//套餐卡片
|
16
|
16
|
export default (props) => {
|
17
|
|
- const { item,star } = props
|
|
17
|
+ const { item } = props
|
18
|
18
|
const { shopId } = props.item
|
19
|
19
|
const [isSaved, toggleSave] = useSave(item.isSaved, 'shop_package', item.packageId)
|
20
|
20
|
const [city, setCity] = useState({})
|
21
|
|
- // const [detail, setDetail] = useState({})
|
|
21
|
+ const [detail, setDetail] = useState({})
|
22
|
22
|
|
23
|
23
|
|
24
|
24
|
|
|
@@ -39,11 +39,13 @@ export default (props) => {
|
39
|
39
|
|
40
|
40
|
useEffect(() => {
|
41
|
41
|
getShopDetail(item.shopId).then((res) => {
|
|
42
|
+ setDetail(res)
|
42
|
43
|
getShopcity(res.cityId).then((res2) => {
|
43
|
44
|
setCity(res2)
|
44
|
45
|
})
|
45
|
46
|
})
|
46
|
47
|
}, [])
|
|
48
|
+ const star = parseFloat(((detail.sweetScore + detail.environmentScore + detail.serviceScore) / 3).toFixed(1));
|
47
|
49
|
|
48
|
50
|
return (
|
49
|
51
|
<view className='foodCard'>
|