[baozhangchao] 3 years ago
parent
commit
d7bfd13643

BIN
src/assets/homesImgaes/carsListImga.png View File


+ 0
- 2
src/pages/index/index.jsx View File

@@ -2,7 +2,6 @@ import React, { useState, useEffect } from 'react'
2 2
 import Taro, { useDidShow } from '@tarojs/taro'
3 3
 import withLayout from '@/layouts'
4 4
 
5
-import ButtontWX from '../../components/ButtontWX'
6 5
 import tabList from './tabbar'
7 6
 import Homes from './tabs/Homes'
8 7
 import Orders from './tabs/Orders'
@@ -41,7 +40,6 @@ export default withLayout((props) => {
41 40
 
42 41
   return (
43 42
     <view className='page-index'>
44
-      {/* <ButtontWX butText='确认登陆' butWidth={100} butHeight={30} butFontSize={10} butBorderRadius={20} /> */}
45 43
       <view className='index-navbar'>
46 44
       </view>
47 45
       <view className='index-container'>

+ 49
- 4
src/pages/index/tabs/Homes.jsx View File

@@ -1,8 +1,10 @@
1 1
 
2 2
 import { View, Swiper, Image, SwiperItem, Text, Input } from "@tarojs/components"
3
-import addresss from '@/assets/mineImgaes/addresss.png'//地址
4
-import searchs from '@/assets/homesImgaes/searchs.png'//地址
3
+import ButtontWX from '@/components/ButtontWX'
5 4
 
5
+import addresss from '@/assets/mineImgaes/addresss.png'//地址
6
+import searchs from '@/assets/homesImgaes/searchs.png'//搜索图片
7
+import carsListImga from '@/assets/homesImgaes/carsListImga.png'//农机列表图片
6 8
 
7 9
 
8 10
 import './HomesCss/style.less'
@@ -10,6 +12,14 @@ import './HomesCss/style.less'
10 12
 export default (props) => {
11 13
   // const { SwiperItem } = Swiper
12 14
 
15
+  const carsList = [
16
+    { carsName: '联合收割机', carsUrl: 'http://img3.jc001.cn/img/001/1/1512/15566fd0311736f.jpg', jiage: '300', carsLocation: '3.9' },
17
+    { carsName: '水稻播种机', carsUrl: 'http://img3.jc001.cn/img/001/1/1512/15566fd031719b1.jpg', jiage: '300', carsLocation: '3.9' },
18
+    { carsName: '秸秆统一处理 型号:GB2312', carsUrl: 'http://img3.jc001.cn/img/001/1/1512/15566fd03201503.jpg', jiage: '免费', carsLocation: '3.9' },
19
+    { carsName: '花生稻子小麦收割一体机', carsUrl: 'http://img3.jc001.cn/img/001/1/1512/15566fd0324f649.jpg', jiage: '550', carsLocation: '3.9' },
20
+    { carsName: '拖拉机', carsUrl: 'https://image.cnhnb.com/image/jpg/miniapp/2020/03/26/ef945970d2cc4948b61d45ce57ac1179.jpg', jiage: '180', carsLocation: '3.9' },
21
+    { carsName: '自行车', carsUrl: 'https://image.cnhnb.com/image/jpg/miniapp/2020/03/26/e8745759793d48398f82e6658186686a.jpg', jiage: '20', carsLocation: '3.9' },
22
+  ]
13 23
 
14 24
   const imglist = [
15 25
     { url: 'https://profile.csdnimg.cn/3/1/5/0_qq_42551866' },
@@ -25,7 +35,9 @@ export default (props) => {
25 35
   }
26 36
 
27 37
   return (
28
-    <View>
38
+
39
+
40
+    <scroll-view className='scrollView' scrollY style='height: 100%;' >
29 41
       <View className='heads-top-box'>
30 42
         <View className='heads-top-box-left'>
31 43
           <Image src={addresss} className='heads-top-box-left-addresssImg' />
@@ -48,7 +60,40 @@ export default (props) => {
48 60
           </SwiperItem>
49 61
         ))}
50 62
       </Swiper>
63
+      <View className='content-header-box'>
64
+        <View className='content-header-box-liftCentent'>
65
+          <Image src={carsListImga} />
66
+          <View>农机列表</View>
67
+        </View>
68
+        <View className='content-header-box-rightCentent'>更多&gt;&gt;</View>
69
+      </View>
70
+
71
+      {
72
+        carsList.map((item, index) => {
73
+          return (
74
+            <View key={index} className='carsListImga-bottom-box'>
75
+              <Image src={item.carsUrl} />
76
+              <View className='carsListImga-bottom-box-flaxBox'>
77
+                <View className='carsListImga-bottom-box-flaxBox-liftText'>
78
+                  <View className='carsListImga-bottom-box-flaxBox-liftText-Titles'>{item.carsName}</View>
79
+                  <View className='carsListImga-bottom-box-flaxBox-liftText-price'>{item.jiage}/<Text>公顷</Text></View>
80
+                </View>
81
+                <View className='carsListImga-bottom-box-flaxBox-rightBut'>
82
+                  <ButtontWX butText='预约' butWidth={80} butHeight={34} butFontSize={19} butBorderRadius={0} />
83
+                </View>
84
+              </View>
85
+              <View className='content-header-box-map'>
86
+                <View className='content-header-box-map-liftCentent'>
87
+                  <Image src={addresss} />
88
+                  <View>距离当前位置{item.carsLocation}公里</View>
89
+                </View>
90
+                <View className='content-header-box-map-rightCentent'>进入地图&gt;&gt;</View>
91
+              </View>
92
+            </View>
93
+          )
94
+        })
95
+      }
51 96
 
52
-    </View>
97
+    </scroll-view>
53 98
   )
54 99
 }

+ 104
- 1
src/pages/index/tabs/HomesCss/style.less View File

@@ -19,7 +19,6 @@
19 19
       border-top: 8px solid #000;
20 20
       border-left: 8px solid transparent;
21 21
       border-right: 8px solid transparent;
22
-
23 22
       margin-left: 10px;
24 23
     }
25 24
   }
@@ -54,3 +53,107 @@
54 53
     height: 100%;
55 54
   }
56 55
 }
56
+
57
+//农机劣效----------------
58
+.content-header-box {
59
+  width: 93vw;
60
+  margin: 0 auto;
61
+  display: flex;
62
+  align-items: center;
63
+  justify-content: space-between;
64
+  &-liftCentent {
65
+    display: flex;
66
+    align-items: center;
67
+    > Image {
68
+      width: 44px;
69
+      height: 40px;
70
+    }
71
+    > View {
72
+      padding-left: 15px;
73
+      font-size: 40px;
74
+      font-weight: 800;
75
+      color: #222222;
76
+    }
77
+  }
78
+  &-rightCentent {
79
+    font-size: 32px;
80
+    font-weight: 500;
81
+    color: #666666;
82
+  }
83
+}
84
+
85
+.carsListImga-bottom-box {
86
+  margin: 30px auto 0 auto;
87
+  background: #f2f2f2;
88
+  width: 93vw;
89
+  > Image {
90
+    width: 100%;
91
+    margin: 0 auto;
92
+  }
93
+  &-flaxBox {
94
+    width: 94%;
95
+    display: flex;
96
+    align-items: center;
97
+    margin: 0 auto;
98
+    margin-top: 40px;
99
+    margin-bottom: 38px;
100
+    &-liftText {
101
+      width: 95%;
102
+
103
+      &-Titles {
104
+        width: 95%;
105
+
106
+        text-overflow: ellipsis; //显示...
107
+        white-space: nowrap; //不换行
108
+        overflow: hidden;
109
+        font-size: 36px;
110
+        font-weight: bold;
111
+        color: #222222;
112
+      }
113
+      &-price {
114
+        margin-top: 44px;
115
+        font-size: 44px;
116
+        font-weight: 800;
117
+        color: #666666;
118
+        background: linear-gradient(180deg, #fa7878 0%, #b61515 100%);
119
+        -webkit-background-clip: text;
120
+        -webkit-text-fill-color: transparent;
121
+        > Text {
122
+          font-size: 25px;
123
+        }
124
+      }
125
+    }
126
+    &-rightBut {
127
+      align-items: center;
128
+      margin: 0 auto;
129
+    }
130
+  }
131
+  .content-header-box-map {
132
+    width: 94%;
133
+
134
+    margin: 0 auto;
135
+    display: flex;
136
+    align-items: center;
137
+    justify-content: space-between;
138
+    padding-bottom: 60px;
139
+    &-liftCentent {
140
+      display: flex;
141
+      align-items: center;
142
+      > Image {
143
+        width: 22px;
144
+        height: 27px;
145
+      }
146
+      > View {
147
+        padding-left: 15px;
148
+        font-size: 30px;
149
+        font-weight: 800;
150
+        color: #222222;
151
+      }
152
+    }
153
+    &-rightCentent {
154
+      font-size: 30px;
155
+      font-weight: 500;
156
+      color: #666666;
157
+    }
158
+  }
159
+}

+ 3
- 1
src/pages/index/tabs/Orders.jsx View File

@@ -5,6 +5,8 @@ import { View } from "@tarojs/components"
5 5
 export default (props) => {
6 6
 
7 7
   return (
8
-    <View>Orders</View>
8
+    <View>
9
+
10
+    </View>
9 11
   )
10 12
 }