|
@@ -14,95 +14,51 @@ import SeeDetails from '@/assets/icons/GuideCheck/SeeDetails.png'
|
14
|
14
|
import './style.less'
|
15
|
15
|
|
16
|
16
|
|
17
|
|
-const CouponMedia = CouponCard.Media
|
18
|
17
|
const Action = CouponCard.Action
|
19
|
18
|
|
20
|
19
|
//套餐卡片
|
21
|
20
|
export default (props) => {
|
22
|
|
- const { item, st, editable, setScroll, goshop, det, onDay, onDelete } = props
|
23
|
|
- // const travelId = travelMineContent?.records[0]?.travelId
|
|
21
|
+ const { item, st, editable, det } = props
|
24
|
22
|
const { targetId, itemId } = props.item
|
|
23
|
+ //进入详情页面
|
25
|
24
|
const goDetail = () => {
|
26
|
|
- Taro.navigateTo({ url: `/pages/details/mjDetails/sceneryDetails?id=${targetId}` })
|
27
|
|
-
|
28
|
|
- }
|
29
|
|
- const goFood = () => {
|
|
25
|
+ item.targetType === 'tourist' ?
|
|
26
|
+ Taro.navigateTo({ url: `/pages/details/mjDetails/sceneryDetails?id=${targetId}` }):
|
30
|
27
|
Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${targetId}` })
|
31
|
|
-
|
32
|
|
- }
|
33
|
|
- const [showCutover, setShowCutover] = useState(false)
|
34
|
|
- const [valueList, setValueList] = useState([])
|
35
|
|
-
|
36
|
|
-
|
37
|
|
-
|
38
|
|
-
|
39
|
|
-
|
40
|
|
-
|
41
|
|
-
|
42
|
|
-
|
43
|
|
-
|
44
|
|
- // useEffect(() => {
|
45
|
|
-
|
46
|
|
- // }, [item])
|
47
|
|
-
|
48
|
|
- const onClose = () => {
|
49
|
|
- //关闭当前套餐详情弹窗
|
50
|
|
- setShowCutover(false)
|
51
|
|
- //使父组件恢复滚动
|
52
|
|
- setScroll(true)
|
53
|
28
|
}
|
54
|
|
-
|
55
|
|
-
|
56
|
|
-
|
57
|
|
-
|
58
|
|
- const handlePayClick = (e) => {
|
59
|
|
-
|
60
|
|
- onDelete(itemId)
|
61
|
|
-
|
62
|
|
- // Taro.navigateTo({ url: `/pages/PayOrder/index?packageId=${item.packageId}&scene=${scene || ''}&subOrderId=${subOrderId}&id=${id}` })
|
63
|
|
-
|
|
29
|
+ const backStyle = {
|
|
30
|
+ background: `url('${compressImage(item.poster)}') no-repeat`,
|
|
31
|
+ backgroundSize: '100% 100%',
|
64
|
32
|
}
|
65
|
|
- const PayAction = <Action.Icon icon={SeeDetails} text='查看详情' onClick={item.targetType === 'tourist' ? goDetail : goFood} />
|
66
|
|
-
|
67
|
|
-
|
68
|
|
-
|
69
|
|
-
|
70
|
33
|
return (
|
71
|
|
- <View style={{ margin: '15px 5px' }} >
|
72
|
|
- {/* <View className='packageDetail' style={{ display: goshop ? '' : 'none' }}>
|
73
|
|
- <Popup show={showCutover} maskClosable={showCutover} onClose={onClose}>
|
74
|
|
- <ScrollView
|
75
|
|
- scrollY
|
76
|
|
- style={{ maxHeight: '60vh' }}
|
77
|
|
- >
|
78
|
|
- <Image mode='widthFix' src={item.details ? item.details : item.poster} />
|
79
|
|
- </ScrollView>
|
80
|
|
- </Popup >
|
81
|
|
- </View> */}
|
82
|
|
- <CouponCard action={PayAction} >
|
83
|
|
- <CouponMedia >
|
84
|
|
- <CouponMedia.Header
|
85
|
|
- cashback={item.cashback}
|
86
|
|
- image={compressImage(item.poster)}
|
87
|
|
- // badge='food'
|
88
|
|
- />
|
89
|
|
- <CouponMedia.Body star={st}>
|
90
|
|
- <View className='foodCard'>
|
91
|
|
- <View className='cpn-card-text'>
|
92
|
|
- {(item.title).toString().length > 25 ? (item.title).substring(0, 25) + '...' : (item.title)}
|
93
|
|
- </View>
|
94
|
|
- <View className='cpn-card-text' style={{ marginTop: '10rpx' }}>
|
95
|
|
- <Text className='cpn-card-text_mn'>¥{`${(item.averagePrice == '' ? '0.00' : item.averagePrice / 100)?.toFixed(2)}元`}</Text>
|
96
|
|
- {/* <Text className='cpn-card-text_rm'>{`门市价${(item.standardPrice / 100)?.toFixed(2)}元`}</Text> */}
|
|
34
|
+ <View style={{ margin: '15px 15px' }} >
|
|
35
|
+ <View className='coupon-card' onClick={goDetail}>
|
|
36
|
+ <View className='coupon-card_body' style='background: #fff;border-radius: 12px;'>
|
|
37
|
+ <View className='coupun-media'>
|
|
38
|
+ <View className='coupun-media_header'>
|
|
39
|
+ <View className='coupun-media_thumb' style="margin-top: 20px;">
|
|
40
|
+ <View className='image' style={backStyle}></View>
|
97
|
41
|
</View>
|
98
|
|
- <View className='cpn-md-act'>
|
99
|
|
- <Location {...det} />
|
100
|
|
- <SaveIcon saved={item.isSaved > 0} targetType='shop_package' editable={editable} targetId={item.targetId} />
|
|
42
|
+ </View>
|
|
43
|
+ <View className='coupun-media_body'>
|
|
44
|
+ <View class="coupun-media_body_ctt" style={{ marginTop: '20px' }}>
|
|
45
|
+ <View className='foodCard'>
|
|
46
|
+ <View className='cpn-card-text'>
|
|
47
|
+ {(item.title).toString().length > 25 ? (item.title).substring(0, 25) + '...' : (item.title)}
|
|
48
|
+ </View>
|
|
49
|
+ <View className='cpn-card-text' style={{ marginTop: '5px' }}>
|
|
50
|
+ <Text className='cpn-card-text_mn'>¥{`${(item.averagePrice == '' ? '0.00' : item.averagePrice / 100)?.toFixed(2)}元`}</Text>
|
|
51
|
+ </View>
|
|
52
|
+ <View className='cpn-md-act'>
|
|
53
|
+ <Location {...det} />
|
|
54
|
+ <SaveIcon saved={item.isSaved > 0} targetType={item.targetType} editable={editable} targetId={item.targetId} />
|
|
55
|
+ </View>
|
|
56
|
+ </View>
|
101
|
57
|
</View>
|
102
|
58
|
</View>
|
103
|
|
- </CouponMedia.Body>
|
104
|
|
- </CouponMedia>
|
105
|
|
- </CouponCard>
|
|
59
|
+ </View>
|
|
60
|
+ </View>
|
|
61
|
+ </View>
|
106
|
62
|
</View>
|
107
|
63
|
)
|
108
|
64
|
}
|