|
@@ -1,8 +1,9 @@
|
1
|
1
|
import Taro from '@tarojs/taro'
|
|
2
|
+import { View, Image } from '@tarojs/components'
|
2
|
3
|
import useSave from "@/utils/hooks/useSave"
|
3
|
4
|
import { getShopDetail, getShopcity } from '@/services/home'
|
4
|
5
|
import { useState, useEffect } from 'react'
|
5
|
|
-import Star from '@/components/Star/Star.jsx'
|
|
6
|
+// import Star from '@/components/Star/Star.jsx'
|
6
|
7
|
import position from '@/assets/icons/GuideCheck/position_logo.png'
|
7
|
8
|
import Pay from '@/assets/icons/GuideCheck/Pay_logo.png'
|
8
|
9
|
|
|
@@ -12,9 +13,11 @@ import food from '@/assets/icons/ProCard/food.png'
|
12
|
13
|
import ProCard_hot from '@/assets/icons/ProCard/ProCard_hot.png'
|
13
|
14
|
|
14
|
15
|
import { getQueryString } from '@/utils/index'
|
15
|
|
-//入住指引--老板推荐
|
16
|
|
-
|
17
|
|
-
|
|
16
|
+import CouponCard from '@/components/CouponCard'
|
|
17
|
+import IconAction from '@/components/CouponCard/components/IconAction'
|
|
18
|
+import Cashback from '@/components/CouponCard/components/Cashback'
|
|
19
|
+import Star from '@/components/Star'
|
|
20
|
+import BadgeTag from '@/components/BadgeTag'
|
18
|
21
|
|
19
|
22
|
import './style.less'
|
20
|
23
|
|
|
@@ -32,50 +35,73 @@ export default (props) => {
|
32
|
35
|
Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${shopId}` })
|
33
|
36
|
}
|
34
|
37
|
|
|
38
|
+ const handlePayClick = () => {
|
|
39
|
+ Taro.navigateTo({ url: `/pages/PayOrder/index?packageId=${item.packageId}` })
|
|
40
|
+ }
|
|
41
|
+
|
|
42
|
+ const PayAction = <IconAction icon={Pay} text='支付' onClick={handlePayClick} />
|
35
|
43
|
|
36
|
44
|
return (
|
37
|
|
- <view class='container'>
|
38
|
|
- <view class='wrapper'>
|
39
|
|
- <view class='left-complete-one' onClick={() => { goFood() }} >
|
40
|
|
- {/* <image className='left-image-1' src={ProCard_hot}></image> */}
|
41
|
|
- <view className='left-viewText'>
|
42
|
|
- 返现¥{(item.cashback / 100)?.toFixed(2)}
|
43
|
|
- </view>
|
44
|
|
- {/* 评分 */}
|
45
|
|
- <view className='card-box-star'>
|
46
|
|
- <Star star={st} />
|
47
|
|
- <text className='card-star-text' >{st}</text>
|
48
|
|
- </view>
|
49
|
|
- <view className='title-image' >
|
50
|
|
- <image className='image-1' mode='scaleToFill' src={item.poster}></image>
|
51
|
|
- <image className='image-2' src={food}></image>
|
52
|
|
- </view>
|
53
|
|
- <view className='title-content'>
|
54
|
|
- <view className='Pro-title' >
|
55
|
|
- <view className='title-text'>{(item.description).toString().length > 25 ? (item.description).substring(0, 25) + '...' : (item.description)}</view>
|
56
|
|
- </view>
|
57
|
|
- <text className='title-money' >¥{(item.actualPrice / 100)?.toFixed(2)}元<text className='title-money-2'>门市价{(item.standardPrice / 100)?.toFixed(2)}元</text></text>
|
58
|
|
- <view className='title-position-on'>
|
59
|
|
- <image className='title-position' src={position} />
|
60
|
|
- <text className='title-position-image'>{det.areaName == '南京市' ? det.areaName : det.areaPName + '/' + det.areaName}</text>
|
61
|
|
- {/* <view style={{ display: 'inline-block' }} onClick={toggleSave}>
|
62
|
|
-
|
63
|
|
- <image className='title-on' src={isSaved > 0 ? starOn : starOff} />
|
64
|
|
- <text className='title-on-text'>{isSaved > 0 ? '已收藏' : '加入收藏'}</text>
|
65
|
|
- </view> */}
|
66
|
|
- </view>
|
67
|
|
- </view>
|
68
|
|
- </view>
|
69
|
|
- <view class='right-complete-two'>
|
70
|
|
- <view className='right-content' onClick={() => { Taro.navigateTo({ url: `/pages/PayOrder/index?packageId=${item.packageId}` }); }}>
|
71
|
|
- {/* <view className='right-number'>×1</view> */}
|
72
|
|
- <image className='right-image' src={Pay} />
|
73
|
|
- <view className='right-title'>支付</view>
|
74
|
|
- </view>
|
75
|
|
- </view>
|
76
|
|
- </view>
|
77
|
|
- </view>
|
|
45
|
+ <CouponCard action={PayAction}>
|
|
46
|
+ <View className='coupun-content'>
|
|
47
|
+ <View className='coupun-content_header'>
|
|
48
|
+ <Cashback money={item.cashback} style={{ position: 'absolute', top: '20rpx', left: 0 }} />
|
|
49
|
+ <View className='coupun-content_thumb'>
|
|
50
|
+ <BadgeTag type='food' style={{ position: 'absolute', top: 0, left: 0 }} />
|
|
51
|
+ <Image src={item.poster} />
|
|
52
|
+ </View>
|
|
53
|
+ </View>
|
|
54
|
+ <View className='coupun-content_body'>
|
|
55
|
+ <Star score={st} style={{ position: 'absolute', top: '26rpx', left: 0 }} />
|
|
56
|
+ </View>
|
|
57
|
+ </View>
|
|
58
|
+ </CouponCard>
|
|
59
|
+ )
|
78
|
60
|
|
79
|
61
|
|
80
|
|
- )
|
|
62
|
+ // return (
|
|
63
|
+ // <view class='container'>
|
|
64
|
+ // <view class='wrapper'>
|
|
65
|
+ // <view class='left-complete-one' onClick={() => { goFood() }} >
|
|
66
|
+ // {/* <image className='left-image-1' src={ProCard_hot}></image> */}
|
|
67
|
+ // <view className='left-viewText'>
|
|
68
|
+ // 返现¥{(item.cashback / 100)?.toFixed(2)}
|
|
69
|
+ // </view>
|
|
70
|
+ // {/* 评分 */}
|
|
71
|
+ // <view className='card-box-star'>
|
|
72
|
+ // <Star star={st} />
|
|
73
|
+ // <text className='card-star-text' >{st}</text>
|
|
74
|
+ // </view>
|
|
75
|
+ // <view className='title-image' >
|
|
76
|
+ // <image className='image-1' mode='scaleToFill' src={item.poster}></image>
|
|
77
|
+ // <image className='image-2' src={food}></image>
|
|
78
|
+ // </view>
|
|
79
|
+ // <view className='title-content'>
|
|
80
|
+ // <view className='Pro-title' >
|
|
81
|
+ // <view className='title-text'>{(item.description).toString().length > 25 ? (item.description).substring(0, 25) + '...' : (item.description)}</view>
|
|
82
|
+ // </view>
|
|
83
|
+ // <text className='title-money' >¥{(item.actualPrice / 100)?.toFixed(2)}元<text className='title-money-2'>门市价{(item.standardPrice / 100)?.toFixed(2)}元</text></text>
|
|
84
|
+ // <view className='title-position-on'>
|
|
85
|
+ // <image className='title-position' src={position} />
|
|
86
|
+ // <text className='title-position-image'>{det.areaName == '南京市' ? det.areaName : det.areaPName + '/' + det.areaName}</text>
|
|
87
|
+ // {/* <view style={{ display: 'inline-block' }} onClick={toggleSave}>
|
|
88
|
+
|
|
89
|
+ // <image className='title-on' src={isSaved > 0 ? starOn : starOff} />
|
|
90
|
+ // <text className='title-on-text'>{isSaved > 0 ? '已收藏' : '加入收藏'}</text>
|
|
91
|
+ // </view> */}
|
|
92
|
+ // </view>
|
|
93
|
+ // </view>
|
|
94
|
+ // </view>
|
|
95
|
+ // <view class='right-complete-two'>
|
|
96
|
+ // <view className='right-content' onClick={() => { Taro.navigateTo({ url: `/pages/PayOrder/index?packageId=${item.packageId}` }); }}>
|
|
97
|
+ // {/* <view className='right-number'>×1</view> */}
|
|
98
|
+ // <image className='right-image' src={Pay} />
|
|
99
|
+ // <view className='right-title'>支付</view>
|
|
100
|
+ // </view>
|
|
101
|
+ // </view>
|
|
102
|
+ // </view>
|
|
103
|
+ // </view>
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+ // )
|
81
|
107
|
}
|