|
@@ -1,9 +1,15 @@
|
1
|
1
|
|
2
|
2
|
|
3
|
|
-import { View, Image, Input, Button } from "@tarojs/components"
|
|
3
|
+import {
|
|
4
|
+ View, Image, Input, Picker,
|
|
5
|
+ Text
|
|
6
|
+} from "@tarojs/components"
|
|
7
|
+
|
|
8
|
+import { useState } from "react"
|
4
|
9
|
import CustomNav from "@/components/CustomNav"
|
5
|
10
|
import searchs from '@/assets/homesImgaes/searchs.png'//搜索图片
|
6
|
|
-
|
|
11
|
+import ButtontWX from '@/components/ButtontWX'
|
|
12
|
+import addresss from '@/assets/mineImgaes/addresss.png'//地址
|
7
|
13
|
|
8
|
14
|
import './style.less'
|
9
|
15
|
|
|
@@ -11,12 +17,41 @@ import './style.less'
|
11
|
17
|
|
12
|
18
|
export default (props) => {
|
13
|
19
|
|
|
20
|
+ const carsList = [
|
|
21
|
+ { carsName: '联合收割机', carsUrl: 'http://img3.jc001.cn/img/001/1/1512/15566fd0311736f.jpg', jiage: '300', carsLocation: '3.9' },
|
|
22
|
+ { carsName: '水稻播种机', carsUrl: 'http://img3.jc001.cn/img/001/1/1512/15566fd031719b1.jpg', jiage: '300', carsLocation: '3.9' },
|
|
23
|
+ { carsName: '秸秆统一处理 型号:GB2312', carsUrl: 'http://img3.jc001.cn/img/001/1/1512/15566fd03201503.jpg', jiage: '免费', carsLocation: '3.9' },
|
|
24
|
+ { carsName: '花生稻子小麦收割一体机', carsUrl: 'http://img3.jc001.cn/img/001/1/1512/15566fd0324f649.jpg', jiage: '550', carsLocation: '3.9' },
|
|
25
|
+ { carsName: '拖拉机', carsUrl: 'https://image.cnhnb.com/image/jpg/miniapp/2020/03/26/ef945970d2cc4948b61d45ce57ac1179.jpg', jiage: '180', carsLocation: '3.9' },
|
|
26
|
+ { carsName: '自行车', carsUrl: 'https://image.cnhnb.com/image/jpg/miniapp/2020/03/26/e8745759793d48398f82e6658186686a.jpg', jiage: '20', carsLocation: '3.9' },
|
|
27
|
+ ]
|
|
28
|
+
|
14
|
29
|
const handleSearch = (e) => {
|
15
|
30
|
console.log(e.detail.value)
|
16
|
31
|
}
|
17
|
32
|
|
|
33
|
+ const [distanceValue, setDistanceValue] = useState('距离')
|
|
34
|
+ const distanceValueState = {
|
|
35
|
+ selector: ['由近到远', '由远到近'],
|
|
36
|
+ selectorChecked: distanceValue,
|
|
37
|
+ }
|
|
38
|
+ const onChangeDistance = e => {
|
|
39
|
+ setDistanceValue(distanceValueState.selector[e.detail.value])
|
|
40
|
+ }
|
|
41
|
+
|
18
|
42
|
|
19
|
43
|
|
|
44
|
+ const [selectValueType, setselectValueType] = useState('类型')
|
|
45
|
+ const selectValueTypeState = {
|
|
46
|
+ selector: ['收割机', '水稻机', '清障机', '战斗机', '公鸡'],
|
|
47
|
+ selectorChecked: selectValueType,
|
|
48
|
+ }
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+ const onChangeType = e => {
|
|
52
|
+ setselectValueType(selectValueTypeState.selector[e.detail.value])
|
|
53
|
+ }
|
|
54
|
+
|
20
|
55
|
|
21
|
56
|
return (
|
22
|
57
|
<View className='page-index'>
|
|
@@ -29,9 +64,48 @@ export default (props) => {
|
29
|
64
|
<Input type='text' className='heads-content-searchClass-abcc-searchInput' onBlur={handleSearch} placeholder='搜索关键字查询订单' />
|
30
|
65
|
<Image src={searchs} className='heads-content-searchClass-abcc-searchInput-searchImg' />
|
31
|
66
|
</View>
|
32
|
|
-
|
33
|
|
-
|
34
|
|
-
|
|
67
|
+ <View className='pick-box'>
|
|
68
|
+
|
|
69
|
+ <Picker className='picker-box' mode='selector' range={distanceValueState.selector} onChange={onChangeDistance}>
|
|
70
|
+ <View className='picker-text'>
|
|
71
|
+ {distanceValueState.selectorChecked}
|
|
72
|
+ <View className='heads-top-box-left-addresssImg-DownIcon-Picker' />
|
|
73
|
+ </View>
|
|
74
|
+ </Picker>
|
|
75
|
+ <Picker className='picker-box' mode='selector' range={selectValueTypeState.selector} onChange={onChangeType}>
|
|
76
|
+ <View className='picker-text'>
|
|
77
|
+ {selectValueTypeState.selectorChecked}
|
|
78
|
+ <View className='heads-top-box-left-addresssImg-DownIcon-Picker' />
|
|
79
|
+ </View>
|
|
80
|
+ </Picker>
|
|
81
|
+ </View>
|
|
82
|
+ {/* 内容区域 */}
|
|
83
|
+
|
|
84
|
+ {
|
|
85
|
+ carsList.map((item, index) => {
|
|
86
|
+ return (
|
|
87
|
+ <View key={index} className='carsListImga-bottom-box-copyStyleless'>
|
|
88
|
+ <Image src={item.carsUrl} />
|
|
89
|
+ <View className='carsListImga-bottom-box-copyStyleless-flaxBox'>
|
|
90
|
+ <View className='carsListImga-bottom-box-copyStyleless-flaxBox-liftText'>
|
|
91
|
+ <View className='carsListImga-bottom-box-copyStyleless-flaxBox-liftText-Titles'>{item.carsName}</View>
|
|
92
|
+ <View className='carsListImga-bottom-box-copyStyleless-flaxBox-liftText-price'>{item.jiage}/<Text>公顷</Text></View>
|
|
93
|
+ </View>
|
|
94
|
+ <View className='carsListImga-bottom-box-copyStyleless-flaxBox-rightBut'>
|
|
95
|
+ <ButtontWX butText='预约' butWidth={80} butHeight={34} butFontSize={19} butBorderRadius={0} />
|
|
96
|
+ </View>
|
|
97
|
+ </View>
|
|
98
|
+ <View className='content-header-box-map-copyStyleless'>
|
|
99
|
+ <View className='content-header-box-map-copyStyleless-liftCentent'>
|
|
100
|
+ <Image src={addresss} />
|
|
101
|
+ <View>距离当前位置{item.carsLocation}公里</View>
|
|
102
|
+ </View>
|
|
103
|
+ <View className='content-header-box-map-copyStyleless-rightCentent'>进入地图>></View>
|
|
104
|
+ </View>
|
|
105
|
+ </View>
|
|
106
|
+ )
|
|
107
|
+ })
|
|
108
|
+ }
|
35
|
109
|
</scroll-view>
|
36
|
110
|
</View>
|
37
|
111
|
)
|