鲍张超 3 лет назад
Родитель
Сommit
a9aa3fd4b4

+ 53
- 5
src/pages/CheckDetails/index.jsx Просмотреть файл

@@ -1,25 +1,73 @@
1 1
 import { useState } from "react"
2
-import { Textarea, View } from "@tarojs/components"
2
+import { Image, View, Text } from "@tarojs/components"
3
+import Taro from "@tarojs/taro"
3 4
 import CustomNav from "@/components/CustomNav"
5
+
4 6
 import ButtontWX from "@/components/ButtontWX"
7
+import decorate from "@/assets/icons/comm/decorate.png"
8
+import addresss from '@/assets/mineImgaes/addresss.png'//地址
9
+
5 10
 import './style.less'
6 11
 
7 12
 
8 13
 
9 14
 export default (props) => {
10 15
 
11
-  const [textAreaValue, setTextAreaValue] = useState('')
12 16
 
17
+  const startReserve = () => {
18
+    console.log('预约 startReserve',);
19
+  }
20
+
21
+  const goMapInfo = (res) => {
22
+    Taro.navigateTo({ url: `/pages/CheckMap/index?mapId=${res + 111}` })
13 23
 
24
+  }
14 25
 
15 26
   return (
16 27
     <View className='page-index'>
28
+
17 29
       <View className='index-navbar'>
18 30
         <CustomNav title='查看详情' />
19 31
       </View>
20
-      <View>
32
+      <scroll-view scrollY style='height: 100%;' >
21 33
 
22
-      </View>
23
-    </View>
34
+        <View >
35
+
36
+          <Image style={{ width: '100%' }} src='http://img3.jc001.cn/img/001/1/1512/15566fd0311736f.jpg' />
37
+
38
+          <View className='CarsContent-TextBox'>
39
+            <View className='CheckDetails-bottom-box-flaxBox-liftText'>
40
+              <View className='CheckDetails-bottom-box-flaxBox-liftText-Titles'>不知家收割机</View>
41
+              <View className='CheckDetails-bottom-box-flaxBox-liftText-price'>2188/<Text>公顷</Text></View>
42
+            </View>
43
+            <View className='content-header-box-map-Info' onClick={() => goMapInfo('222888')}>
44
+              <View className='content-header-box-map-Info-liftCentent'>
45
+                <Image src={addresss} />
46
+                <View>距离当前位置8.8公里&gt;&gt;</View>
47
+              </View>
48
+            </View>
49
+            <View className='content-header-box-map-Info-carsName'>农机手小李的收割机</View>
50
+            <View className='startReserve-centent'>
51
+              <View className='articleTitle-box-Details'>
52
+                <Image src={decorate} />
53
+                <View>作业详情</View>
54
+                <Image src={decorate} />
55
+              </View>
56
+              <Image style={{ width: '100%' }} src='http://img3.jc001.cn/img/001/1/1512/15566fd0311736f.jpg' />
57
+              <Image style={{ width: '100%' }} src='http://img3.jc001.cn/img/001/1/1512/15566fd0311736f.jpg' />
58
+              <Image style={{ width: '100%' }} src='http://img3.jc001.cn/img/001/1/1512/15566fd0311736f.jpg' />
59
+
60
+              <View className='startReserve-Bottom'>
61
+                <ButtontWX butText='预约' onClick={startReserve} butWidth={300} butHeight={49} butFontSize={16} butBorderRadius={49} />
62
+
63
+              </View>
64
+            </View>
65
+
66
+
67
+          </View>
68
+        </View>
69
+      </scroll-view>
70
+
71
+    </View >
24 72
   )
25 73
 }

+ 83
- 15
src/pages/CheckDetails/style.less Просмотреть файл

@@ -1,18 +1,86 @@
1
-.components-page {
2
-  &-TextareaCentent {
3
-    width: 85%;
4
-    background: #fefefe;
5
-    border: 2px solid rgba(0, 0, 0, 0.2);
6
-    border-radius: 20px;
7
-    min-height: 25vh;
8
-    margin: 1em auto;
9
-    padding: 10px 37px;
1
+.CarsContent-TextBox {
2
+  padding: 40px 30px;
3
+  position: relative;
4
+  top: -13vh;
5
+  background-color: #fff;
6
+  border-radius: 40px 40px 0px 0px;
7
+  .CheckDetails-bottom-box-flaxBox-liftText {
8
+    width: 95%;
9
+
10
+    display: flex;
11
+    justify-content: space-between;
12
+
13
+    &-Titles {
14
+      text-overflow: ellipsis; //显示...
15
+      white-space: nowrap; //不换行
16
+      overflow: hidden;
17
+      font-size: 36px;
18
+      font-weight: bold;
19
+      color: #222222;
20
+    }
21
+    &-price {
22
+      font-size: 44px;
23
+      font-weight: 800;
24
+      color: #666666;
25
+      background: linear-gradient(180deg, #fa7878 0%, #b61515 100%);
26
+      -webkit-background-clip: text;
27
+      -webkit-text-fill-color: transparent;
28
+      > Text {
29
+        font-size: 25px;
30
+      }
31
+    }
32
+  }
33
+
34
+  .content-header-box-map-Info {
35
+    margin: 0 auto;
36
+    display: flex;
37
+    align-items: center;
38
+    // justify-content: space-between;
39
+    padding: 30px 0 30px 0;
40
+    &-liftCentent {
41
+      display: flex;
42
+      align-items: center;
43
+      > Image {
44
+        width: 22px;
45
+        height: 27px;
46
+      }
47
+      > View {
48
+        padding-left: 15px;
49
+        font-size: 30px;
50
+        font-weight: 800;
51
+        color: #222222;
52
+      }
53
+    }
54
+    &-rightCententInfo {
55
+      font-size: 30px;
56
+      font-weight: 500;
57
+      color: #666666;
58
+    }
59
+    &-carsName {
60
+      font-size: 30px;
61
+      font-weight: bold;
62
+      color: #222222;
63
+    }
64
+  }
65
+
66
+  .articleTitle-box-Details {
67
+    display: flex;
68
+    font-size: 30px;
69
+    font-weight: bold;
70
+    color: #222222;
71
+    align-items: center;
72
+    justify-content: center;
73
+    margin-top: 32px;
74
+    > Image {
75
+      width: 33px;
76
+      height: 33px;
77
+      margin: auto 31px;
78
+    }
10 79
   }
11
-}
12 80
 
13
-.buton-bottom-Feedback {
14
-  width: 100%;
15
-  margin: 0 auto;
16
-  position: fixed;
17
-  bottom: 6vh;
81
+  .startReserve-Bottom {
82
+    position: absolute;
83
+    bottom: -3vh;
84
+    width: 92vw;
85
+  }
18 86
 }

+ 70
- 5
src/pages/CheckMap/index.jsx Просмотреть файл

@@ -1,22 +1,87 @@
1
-import { useState } from "react"
2
-import { Textarea, View } from "@tarojs/components"
1
+import { useEffect } from "react"
2
+import { Map, View, Image, Text } from "@tarojs/components"
3 3
 import CustomNav from "@/components/CustomNav"
4 4
 import ButtontWX from "@/components/ButtontWX"
5
+import Taro from "@tarojs/taro"
6
+import decorate from "@/assets/icons/comm/decorate.png"
7
+import addresss from '@/assets/mineImgaes/addresss.png'//地址
5 8
 import './style.less'
6 9
 
7 10
 
8
-
9 11
 export default (props) => {
10 12
 
13
+  const $instance = Taro.getCurrentInstance()
14
+
15
+
16
+  useEffect(() => {
17
+    console.log($instance.router.params)
18
+
19
+  }, [])
20
+
21
+  const startReserve = () => {
22
+    console.log('预约 startReserve',);
23
+  }
24
+
25
+
26
+  const markers = [{ // 绘制浮标,传入JSON支持多个
27
+    // iconPath: "/images/location.png", 
28
+    id: 0,
29
+    latitude: 112.092169,// 经度
30
+    longitude: 32.694883,//纬度
31
+    width: 50, // 浮标宽度
32
+    height: 50 // 浮标高度
33
+  }]
11 34
 
12 35
   return (
13 36
     <View className='page-index'>
14 37
       <View className='index-navbar'>
15 38
         <CustomNav title='查看地图' />
16 39
       </View>
17
-      <View>
40
+      <scroll-view scrollY style='height: 100%;' >
18 41
 
19
-      </View>
42
+        <View className='MapBox-centent'>
43
+          <Map
44
+            id='map'
45
+            longitude='112.092169'
46
+            latitude='32.694883'
47
+            scale='12'
48
+            markers={markers}
49
+            bindmarkertap='markertap'
50
+            style='width:100%;height:35vh;'
51
+          >
52
+          </Map>
53
+          <View className='MapBox-centent-BodyArticle'>
54
+            <Image style={{ width: '100%', borderRadius: '20px 20px 0px 0px' }} src='http://img3.jc001.cn/img/001/1/1512/15566fd0311736f.jpg' />
55
+            <View className='CarsContent-TextBox'>
56
+              <View className='CheckDetails-bottom-box-flaxBox-liftText'>
57
+                <View className='CheckDetails-bottom-box-flaxBox-liftText-Titles'>不知家收割机</View>
58
+                <View className='CheckDetails-bottom-box-flaxBox-liftText-price'>2188/<Text>公顷</Text></View>
59
+              </View>
60
+              <View className='content-header-box-map-Info'>
61
+                <View className='content-header-box-map-Info-liftCentent'>
62
+                  <Image src={addresss} />
63
+                  <View>距离当前位置8.8公里&gt;&gt;</View>
64
+                </View>
65
+              </View>
66
+              <View className='content-header-box-map-Info-carsName'>农机手小李的收割机</View>
67
+              <View className='startReserve-centent'>
68
+                {/* <View className='articleTitle-box-Details'>
69
+                  <Image src={decorate} />
70
+                  <View>作业详情</View>
71
+                  <Image src={decorate} />
72
+                </View> */}
73
+
74
+                <View className='startReserve-Bottom'>
75
+                  <ButtontWX butText='预约' onClick={startReserve} butWidth={300} butHeight={49} butFontSize={16} butBorderRadius={49} />
76
+
77
+                </View>
78
+              </View>
79
+
80
+
81
+            </View>
82
+          </View>
83
+        </View>
84
+      </scroll-view>
20 85
     </View>
21 86
   )
22 87
 }

+ 93
- 16
src/pages/CheckMap/style.less Просмотреть файл

@@ -1,18 +1,95 @@
1
-.components-page {
2
-  &-TextareaCentent {
3
-    width: 85%;
4
-    background: #fefefe;
5
-    border: 2px solid rgba(0, 0, 0, 0.2);
6
-    border-radius: 20px;
7
-    min-height: 25vh;
8
-    margin: 1em auto;
9
-    padding: 10px 37px;
10
-  }
11
-}
1
+.MapBox-centent {
2
+  width: 100vw;
3
+  &-BodyArticle {
4
+    background: #fff;
5
+    position: relative;
6
+    top: -7vh;
7
+    .CarsContent-TextBox {
8
+      padding: 40px 30px;
9
+      position: relative;
10
+      top: -8vh;
11
+      background-color: #fff;
12
+      border-radius: 40px 40px 0px 0px;
13
+      .CheckDetails-bottom-box-flaxBox-liftText {
14
+        width: 95%;
15
+
16
+        display: flex;
17
+        justify-content: space-between;
18
+
19
+        &-Titles {
20
+          text-overflow: ellipsis; //显示...
21
+          white-space: nowrap; //不换行
22
+          overflow: hidden;
23
+          font-size: 36px;
24
+          font-weight: bold;
25
+          color: #222222;
26
+        }
27
+        &-price {
28
+          font-size: 44px;
29
+          font-weight: 800;
30
+          color: #666666;
31
+          background: linear-gradient(180deg, #fa7878 0%, #b61515 100%);
32
+          -webkit-background-clip: text;
33
+          -webkit-text-fill-color: transparent;
34
+          > Text {
35
+            font-size: 25px;
36
+          }
37
+        }
38
+      }
12 39
 
13
-.buton-bottom-Feedback {
14
-  width: 100%;
15
-  margin: 0 auto;
16
-  position: fixed;
17
-  bottom: 6vh;
40
+      .content-header-box-map-Info {
41
+        margin: 0 auto;
42
+        display: flex;
43
+        align-items: center;
44
+        // justify-content: space-between;
45
+        padding: 30px 0 30px 0;
46
+        &-liftCentent {
47
+          display: flex;
48
+          align-items: center;
49
+          > Image {
50
+            width: 22px;
51
+            height: 27px;
52
+          }
53
+          > View {
54
+            padding-left: 15px;
55
+            font-size: 30px;
56
+            font-weight: 800;
57
+            color: #222222;
58
+          }
59
+        }
60
+        &-rightCententInfo {
61
+          font-size: 30px;
62
+          font-weight: 500;
63
+          color: #666666;
64
+        }
65
+        &-carsName {
66
+          font-size: 30px;
67
+          font-weight: bold;
68
+          color: #222222;
69
+        }
70
+      }
71
+
72
+      .articleTitle-box-Details {
73
+        display: flex;
74
+        font-size: 30px;
75
+        font-weight: bold;
76
+        color: #222222;
77
+        align-items: center;
78
+        justify-content: center;
79
+        margin-top: 32px;
80
+        > Image {
81
+          width: 33px;
82
+          height: 33px;
83
+          margin: auto 31px;
84
+        }
85
+      }
86
+
87
+      .startReserve-Bottom {
88
+        margin-top: 87px;
89
+        position: relative;
90
+        bottom: -3vh;
91
+        width: 92vw;
92
+      }
93
+    }
94
+  }
18 95
 }

+ 13
- 3
src/pages/index/tabs/Homes.jsx Просмотреть файл

@@ -34,10 +34,20 @@ export default (props) => {
34 34
     console.log(e.detail.value)
35 35
   }
36 36
 
37
-  const goToCarsList = () => {
37
+  const goToCarsList = () => {//更多
38 38
     Taro.navigateTo({ url: '/pages/MoreCars/index' })
39 39
   }
40 40
 
41
+  const goCarsInfo = (res) => {
42
+    Taro.navigateTo({ url: `/pages/CheckDetails/index?id=${res}` })
43
+
44
+  }
45
+  const goMapInfo = (res) => {
46
+    Taro.navigateTo({ url: `/pages/CheckMap/index?mapId=${res + 111}` })
47
+
48
+  }
49
+
50
+
41 51
   return (
42 52
 
43 53
 
@@ -83,10 +93,10 @@ export default (props) => {
83 93
                   <View className='carsListImga-bottom-box-flaxBox-liftText-price'>{item.jiage}/<Text>公顷</Text></View>
84 94
                 </View>
85 95
                 <View className='carsListImga-bottom-box-flaxBox-rightBut'>
86
-                  <ButtontWX butText='预约' butWidth={80} butHeight={34} butFontSize={19} butBorderRadius={0} />
96
+                  <ButtontWX onClick={() => goCarsInfo(item.id)} butText='预约' butWidth={80} butHeight={34} butFontSize={19} butBorderRadius={0} />
87 97
                 </View>
88 98
               </View>
89
-              <View className='content-header-box-map'>
99
+              <View className='content-header-box-map' onClick={() => goMapInfo(item.mapId)}>
90 100
                 <View className='content-header-box-map-liftCentent'>
91 101
                   <Image src={addresss} />
92 102
                   <View>距离当前位置{item.carsLocation}公里</View>

+ 32
- 6
src/pages/index/tabs/Mine.jsx Просмотреть файл

@@ -1,6 +1,6 @@
1 1
 
2 2
 import { View, Image } from "@tarojs/components"
3
-import { useDidShow } from "@tarojs/taro"
3
+import Taro from "@tarojs/taro"
4 4
 import { useState } from "react"
5 5
 import UserCellBox from '@/components/UserCellBox'
6 6
 import addresss from '@/assets/mineImgaes/addresss.png'//地址
@@ -15,12 +15,38 @@ import './MineCss/style.less'
15 15
 export default (props) => {
16 16
   const [isLoginBox, setIsLoginBox] = useState(false)
17 17
   const userList = [
18
-    { userTitle: '关于我们', userImg: aboutUs },
19
-    { userTitle: '版本更新', userImg: versionUpdate },
20
-    { userTitle: '帮助中心', userImg: helpCenter },
21
-    { userTitle: '意见反馈', userImg: feedbacks },
18
+    { userTitle: '关于我们', userImg: aboutUs, pageType: 0 },
19
+    { userTitle: '版本更新', userImg: versionUpdate, pageType: 1 },
20
+    { userTitle: '帮助中心', userImg: helpCenter, pageType: 2 },
21
+    { userTitle: '意见反馈', userImg: feedbacks, pageType: 3 },
22 22
   ]
23 23
 
24
+
25
+  const goToPages = (res) => {
26
+    switch (res) {
27
+      case 0:
28
+        Taro.navigateTo({ url: '/pages/AboutUsPage/index' })
29
+
30
+        break;
31
+      case 1:
32
+        Taro.navigateTo({ url: '/pages/NewVersionUpdatePage/index' })
33
+
34
+        break;
35
+      case 2:
36
+        Taro.navigateTo({ url: '/pages/HelpCenterInfo/index' })
37
+
38
+        break;
39
+      case 3:
40
+        Taro.navigateTo({ url: '/pages/FeedbackText/index' })
41
+
42
+        break;
43
+
44
+      default:
45
+        break;
46
+    }
47
+  }
48
+
49
+
24 50
   return (
25 51
 
26 52
     <scroll-view scrollY style='height: 100%;' >
@@ -61,7 +87,7 @@ export default (props) => {
61 87
           {
62 88
             userList.map((item, index) => {
63 89
               return (
64
-                <View key={index} className='User-Setup-background-wxInfo-InfoCell'>
90
+                <View key={index} className='User-Setup-background-wxInfo-InfoCell' onClick={() => goToPages(item.pageType)}>
65 91
                   <Image className='User-Setup-background-wxInfo-InfoCell-imgae' src={item.userImg} />
66 92
                   <View className='box-flex'>
67 93
                     <View className='User-Setup-background-wxInfo-InfoCell-text'>{item.userTitle}</View>