[baozhangchao] 3 years ago
parent
commit
7c2a2fdd5a
41 changed files with 830 additions and 37 deletions
  1. BIN
      src/assets/icons/comm/decorate.png
  2. BIN
      src/assets/icons/comm/goback.png
  3. BIN
      src/assets/icons/comm/goback_white.png
  4. BIN
      src/assets/icons/comm/home.png
  5. BIN
      src/assets/icons/comm/home_white.png
  6. BIN
      src/assets/icons/comm/logo_small.png
  7. BIN
      src/assets/lolginImages/checkedImg.png
  8. BIN
      src/assets/lolginImages/phoneCode.png
  9. BIN
      src/assets/lolginImages/unselectedImg.png
  10. 2
    2
      src/components/BottomMoadl/index.jsx
  11. 10
    6
      src/components/ButtontWX/index.jsx
  12. 107
    0
      src/components/CustomNav/index.jsx
  13. 57
    0
      src/components/CustomNav/style.less
  14. 10
    0
      src/pages/AboutUsPage/index.config.js
  15. 49
    0
      src/pages/AboutUsPage/index.jsx
  16. 15
    0
      src/pages/AboutUsPage/style.less
  17. 10
    0
      src/pages/FeedbackText/index.config.js
  18. 34
    0
      src/pages/FeedbackText/index.jsx
  19. 18
    0
      src/pages/FeedbackText/style.less
  20. 10
    0
      src/pages/HelpCenterInfo/index.config.js
  21. 56
    0
      src/pages/HelpCenterInfo/index.jsx
  22. 35
    0
      src/pages/HelpCenterInfo/style.less
  23. 10
    0
      src/pages/MoreCars/index.config.js
  24. 38
    0
      src/pages/MoreCars/index.jsx
  25. 23
    0
      src/pages/MoreCars/style.less
  26. 10
    0
      src/pages/MyAddressInfo/index.config.js
  27. 52
    0
      src/pages/MyAddressInfo/index.jsx
  28. 27
    0
      src/pages/MyAddressInfo/style.less
  29. 9
    0
      src/pages/NewVersionUpdatePage/index.config.js
  30. 32
    0
      src/pages/NewVersionUpdatePage/index.jsx
  31. 31
    0
      src/pages/NewVersionUpdatePage/style.less
  32. 0
    0
      src/pages/OrderInfo/index.config.js
  33. 6
    2
      src/pages/OrderInfo/index.jsx
  34. 1
    2
      src/pages/UserLogin/index.config.js
  35. 99
    12
      src/pages/UserLogin/index.jsx
  36. 43
    6
      src/pages/UserLogin/style.less
  37. 2
    1
      src/pages/index/index.config.js
  38. 3
    1
      src/pages/index/index.jsx
  39. 6
    2
      src/pages/index/tabs/Homes.jsx
  40. 1
    1
      src/pages/index/tabs/MineCss/style.less
  41. 24
    2
      src/routes.js

BIN
src/assets/icons/comm/decorate.png View File


BIN
src/assets/icons/comm/goback.png View File


BIN
src/assets/icons/comm/goback_white.png View File


BIN
src/assets/icons/comm/home.png View File


BIN
src/assets/icons/comm/home_white.png View File


BIN
src/assets/icons/comm/logo_small.png View File


BIN
src/assets/lolginImages/checkedImg.png View File


BIN
src/assets/lolginImages/phoneCode.png View File


BIN
src/assets/lolginImages/unselectedImg.png View File


+ 2
- 2
src/components/BottomMoadl/index.jsx View File

@@ -8,7 +8,7 @@ import './style.css'
8 8
 
9 9
 
10 10
 export default (props) => {
11
-  const { frameTitle, flag, onRecommend } = props
11
+  const { frameTitle, flag } = props
12 12
 
13 13
   let wrapAnimate = 'wrap wrapAnimate'
14 14
   let frameAnimate = 'frame-wrapper'
@@ -17,7 +17,7 @@ export default (props) => {
17 17
   // const [loading, setLoading] = useState(false)
18 18
 
19 19
   const hideFrame = () => {
20
-    onRecommend()
20
+    // onRecommend()
21 21
   }
22 22
 
23 23
 

+ 10
- 6
src/components/ButtontWX/index.jsx View File

@@ -1,21 +1,25 @@
1 1
 
2
-import { View, Text } from '@tarojs/components'
2
+import { View, Text, Button } from '@tarojs/components'
3 3
 import './style.less'
4 4
 
5 5
 export default (props) => {
6
-  const { butText, butWidth, butHeight, butFontSize, butBorderRadius } = props
6
+  const { butText, butWidth, butHeight, butFontSize, butBorderRadius, onClick, formType, disabled } = props
7 7
   let butStyle = {
8 8
     width: `${butWidth || 100}px`,
9 9
     height: `${butHeight || 40}px`,
10 10
     borderRadius: `${butBorderRadius || 0}px`,
11
-    fontSize: `${butFontSize || 20}px`
11
+    fontSize: `${butFontSize || 20}px`,
12
+
12 13
   }
13 14
   let butStyle2 = {
14 15
     lineHeight: `${butHeight || 40}px`,
15 16
   }
17
+  const onClicks = () => {
18
+    onClick()
19
+  }
16 20
   return (
17
-    <View className='buttont-box' style={butStyle}>
18
-      <View style={butStyle2}>{butText || '确定'}</View>
19
-    </View>
21
+    <Button disabled={disabled} style={butStyle} onClick={onClicks} className='buttont-box' formType={formType || ''}  >
22
+      <View style={butStyle2}>{butText || ''}</View>
23
+    </Button>
20 24
   )
21 25
 }

+ 107
- 0
src/components/CustomNav/index.jsx View File

@@ -0,0 +1,107 @@
1
+
2
+import { useState, useEffect, useMemo } from 'react'
3
+import Taro from '@tarojs/taro'
4
+import homeBlack from '@/assets/icons/comm/home.png'
5
+import homeWhite from '@/assets/icons/comm/home_white.png'
6
+import gobackBlack from '@/assets/icons/comm/goback.png'
7
+import gobackWhite from '@/assets/icons/comm/goback_white.png'
8
+
9
+import './style.less'
10
+
11
+export default (props) => {
12
+  const { bgImg, logo, title = '首页', home, noback } = props
13
+
14
+  // 菜单胶囊
15
+  const menuBound = useMemo(() => Taro.getMenuButtonBoundingClientRect(), [])
16
+  // 整体顶部导航
17
+  const navStyle = useMemo(() => {
18
+    return {
19
+      height: `${menuBound.bottom + 8}px`,
20
+      backgroundImage: bgImg ? `url(${bgImg})` : 'none',
21
+    }
22
+  }, [menuBound.bottom, bgImg])
23
+  // 导航栏
24
+  const navBarStyle = useMemo(() => {
25
+    return {
26
+      top: `${menuBound.top}px`,
27
+      height: `${menuBound.height}px`
28
+    }
29
+  }, [menuBound.top, menuBound.height])
30
+  // 导航栏按钮
31
+  const actionStyle = useMemo(() => {
32
+    return {
33
+      width: `${menuBound.width + 8}px`,
34
+      paddingLeft: '8px',
35
+      lineHeight: `${menuBound.height}px`,
36
+      height: `${menuBound.height}px`,
37
+    }
38
+  }, [menuBound.width, menuBound.height])
39
+  // 导航栏标题
40
+  const contentStyle = useMemo(() => {
41
+    const screenWidth = menuBound.right + 8;
42
+    return {
43
+      width: `${screenWidth - menuBound.width * 2 - 16}px`,
44
+      color: bgImg ? '#fff' : '#333',
45
+      lineHeight: `${menuBound.height}px`,
46
+      height: `${menuBound.height}px`,
47
+      paddingLeft: '8px',
48
+      paddingRight: '8px',
49
+    }
50
+  }, [menuBound.width, menuBound.height, menuBound.right, bgImg])
51
+  // logo
52
+  const logoStyle = useMemo(() => {
53
+    return {
54
+      width: `${menuBound.height}px`,
55
+      height: `${menuBound.height}px`,
56
+    }
57
+  }, [menuBound.height])
58
+
59
+  const handleAction = () => {
60
+    if (home || logo) return;
61
+
62
+    if (Taro.getCurrentPages().length > 1) {
63
+      Taro.navigateBack({ delta: 1 })
64
+    }
65
+  }
66
+
67
+  const goHome = () => {
68
+    Taro.reLaunch({
69
+      url: '/pages/index/index'
70
+    })
71
+  }
72
+
73
+  useEffect(() => {
74
+    if (title) {
75
+      Taro.setNavigationBarTitle({ title })
76
+    }
77
+  }, [title])
78
+
79
+  return (
80
+    <view className='custom-nav' style={navStyle}>
81
+      <view className='custom-nav-bar' style={navBarStyle}>
82
+        <view className='custom-nav-bar-action' style={actionStyle}>
83
+          {
84
+            !!logo && <image src={logo} className='custom-nav-bar-logo' mode='aspectFit' style={logoStyle} />
85
+          }
86
+          {
87
+            !logo && !home && (
88
+              <view className='custom-nav-bar-action-btns'>
89
+                {
90
+                  !noback && (
91
+                    <view className='custom-nav-bar-action-part' onClick={handleAction}>
92
+                      <image src={bgImg ? gobackWhite : gobackBlack} mode='aspectFit' />
93
+                    </view>
94
+                  )
95
+                }
96
+                <view className='custom-nav-bar-action-part' onClick={goHome}>
97
+                  <image src={bgImg ? homeWhite : homeBlack} mode='aspectFit' />
98
+                </view>
99
+              </view>
100
+            )
101
+          }
102
+        </view>
103
+        <view className='custom-nav-bar-content' style={contentStyle}>{title}</view>
104
+      </view>
105
+    </view>
106
+  )
107
+}

+ 57
- 0
src/components/CustomNav/style.less View File

@@ -0,0 +1,57 @@
1
+.custom-nav {
2
+  display: block;
3
+  position: relative;
4
+
5
+  &-bar {
6
+    display: flex;
7
+    position: fixed;
8
+    width: 100%;
9
+    z-index: 1024;
10
+    left: 0;
11
+
12
+    &-action {
13
+      flex: none;
14
+      box-sizing: border-box;
15
+
16
+      image {
17
+        display: inline-block;
18
+        border: 0;
19
+      }
20
+
21
+      &-btns {
22
+        width: 100%;
23
+        height: 100%;
24
+        display: flex;
25
+
26
+        & > view {
27
+          flex: auto;
28
+          width: 50%;
29
+          text-align: center;
30
+
31
+          image {
32
+            width: 100%;
33
+            height: 30px;
34
+          }
35
+        }
36
+      }
37
+    }
38
+
39
+    &-logo {
40
+      display: block !important;
41
+      border-radius: 50%;
42
+      margin: 0 auto;
43
+    }
44
+
45
+    &-content {
46
+      flex: none;
47
+      text-align: center;
48
+      font-size: 32px;
49
+      cursor: none;
50
+      pointer-events: none;
51
+      text-overflow: ellipsis;
52
+      white-space: nowrap;
53
+      overflow: hidden;
54
+      box-sizing: border-box;
55
+    }
56
+  }
57
+}

+ 10
- 0
src/pages/AboutUsPage/index.config.js View File

@@ -0,0 +1,10 @@
1
+
2
+export default {
3
+  navigationBarTitleText: '关于我们',
4
+  navigationStyle: 'custom',
5
+  disableScroll: true,
6
+  usingComponents: {
7
+  }
8
+
9
+
10
+}

+ 49
- 0
src/pages/AboutUsPage/index.jsx View File

@@ -0,0 +1,49 @@
1
+import { View, Image } from "@tarojs/components"
2
+import CustomNav from "@/components/CustomNav"
3
+import decorate from "@/assets/icons/comm/decorate.png"
4
+
5
+import './style.less'
6
+
7
+
8
+
9
+export default (props) => {
10
+
11
+  return (
12
+    <View className='page-index'>
13
+      <View className='index-navbar'>
14
+        <CustomNav title='关于我们' />
15
+      </View>
16
+      <scroll-view scrollY style='height: 100%;' >
17
+        <View>
18
+          <View className='articleTitle-box'>
19
+            <Image src={decorate} />
20
+            <View>智慧农机的介绍</View>
21
+            <Image src={decorate} />
22
+          </View>
23
+          <View style={{ margin: '25px auto 0 auto', padding: '1px 15px 0px 15px' }}>
24
+            <View style={{ textIndent: '2em', color: '#121212', width: '100%', fontSize: '15px', lineHeight: '28px', textAlign: 'left' }}>
25
+              智慧农机旨在通过新一代物联网,大数据,3S等信息化技术有效整合省市县各级涉农资源
26
+            </View>
27
+            <View style={{ textIndent: '2em', color: '#121212', width: '100%', fontSize: '15px', lineHeight: '28px', textAlign: 'left' }}>
28
+              以顶层设计方式建成“一个平台一个中心N个应用”汇聚农业产业。农业“两区”。
29
+            </View>
30
+            <View style={{ textIndent: '2em', color: '#121212', width: '100%', fontSize: '15px', lineHeight: '28px', textAlign: 'left' }}>
31
+              物联网、植保、农机、畜牧、农资、农经,科教等各级农业业务应用及数据,形成大农业”数据中心。
32
+            </View>
33
+            <View style={{ textIndent: '2em', color: '#121212', width: '100%', fontSize: '15px', lineHeight: '28px', textAlign: 'left' }}>
34
+              构建互联共享的“互联网+农业”信息服务体系以最终实现科学指导农业生产经营管理,政府决策监管和社会公众服务。
35
+            </View>
36
+            <View style={{ textIndent: '2em', color: '#121212', width: '100%', fontSize: '15px', lineHeight: '28px', textAlign: 'left' }}>
37
+              智慧农机旨在通过新一代物联网,大数据,3S等信息化技术有效整合省市县各级涉农资源
38
+            </View>
39
+            <View style={{ textIndent: '2em', color: '#121212', width: '100%', fontSize: '15px', lineHeight: '28px', textAlign: 'left' }}>
40
+              以顶层设计方式建成“一个平台一个中心N个应用”汇聚农业产业。农业“两区”。
41
+            </View>
42
+          </View>
43
+
44
+
45
+        </View>
46
+      </scroll-view>
47
+    </View>
48
+  )
49
+}

+ 15
- 0
src/pages/AboutUsPage/style.less View File

@@ -0,0 +1,15 @@
1
+.articleTitle-box {
2
+  width: 100%;
3
+  display: flex;
4
+  font-size: 40px;
5
+  font-weight: bold;
6
+  color: #222222;
7
+  align-items: center;
8
+  justify-content: center;
9
+  margin-top: 32px;
10
+  > Image {
11
+    width: 33px;
12
+    height: 33px;
13
+    margin: auto 31px;
14
+  }
15
+}

+ 10
- 0
src/pages/FeedbackText/index.config.js View File

@@ -0,0 +1,10 @@
1
+
2
+export default {
3
+  navigationBarTitleText: '意见反馈',
4
+  navigationStyle: 'custom',
5
+  disableScroll: true,
6
+  usingComponents: {
7
+  }
8
+
9
+
10
+}

+ 34
- 0
src/pages/FeedbackText/index.jsx View File

@@ -0,0 +1,34 @@
1
+import { useState } from "react"
2
+import { Textarea, View } from "@tarojs/components"
3
+import CustomNav from "@/components/CustomNav"
4
+import ButtontWX from "@/components/ButtontWX"
5
+import './style.less'
6
+
7
+
8
+
9
+export default (props) => {
10
+
11
+  const [textAreaValue, setTextAreaValue] = useState('')
12
+
13
+
14
+  const onSubmitClick = () => {
15
+    console.log('textAreaValue', textAreaValue);
16
+  }
17
+
18
+  return (
19
+    <View className='page-index'>
20
+      <View className='index-navbar'>
21
+        <CustomNav title='意见反馈' />
22
+      </View>
23
+      <View>
24
+        <View className='components-page'>
25
+
26
+          <Textarea placeholder='请留下您宝贵的意见和建议!' className='components-page-TextareaCentent' autoHeight onInput={(e) => { setTextAreaValue(e.detail.value) }} />
27
+        </View>
28
+        <View className='buton-bottom-Feedback'>
29
+          <ButtontWX onClick={onSubmitClick} butText='提交' butWidth={350} butHeight={49} butFontSize={16} butBorderRadius={49} />
30
+        </View>
31
+      </View>
32
+    </View>
33
+  )
34
+}

+ 18
- 0
src/pages/FeedbackText/style.less View File

@@ -0,0 +1,18 @@
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
+}
12
+
13
+.buton-bottom-Feedback {
14
+  width: 100%;
15
+  margin: 0 auto;
16
+  position: fixed;
17
+  bottom: 6vh;
18
+}

+ 10
- 0
src/pages/HelpCenterInfo/index.config.js View File

@@ -0,0 +1,10 @@
1
+
2
+export default {
3
+  navigationBarTitleText: '帮助中心',
4
+  navigationStyle: 'custom',
5
+  disableScroll: true,
6
+  usingComponents: {
7
+  }
8
+
9
+
10
+}

+ 56
- 0
src/pages/HelpCenterInfo/index.jsx View File

@@ -0,0 +1,56 @@
1
+import { View, Image } from "@tarojs/components"
2
+import CustomNav from "@/components/CustomNav"
3
+
4
+
5
+import './style.less'
6
+
7
+
8
+
9
+export default (props) => {
10
+
11
+  return (
12
+    <View className='page-index'>
13
+      <View className='index-navbar'>
14
+        <CustomNav title='帮助中心' />
15
+      </View>
16
+      <scroll-view scrollY style='height: 100%;' >
17
+
18
+        <View className='help-center-cell'>
19
+          <Image src='https://profile.csdnimg.cn/8/3/5/1_yunqiinsight' />
20
+          <View className='help-center-cell-bottom' >
21
+            <View className='help-center-cell-bottom-title'  >收割机的最新消息!!</View>
22
+            <View className='help-center-cell-bottom-content' >构建互联共享的“互联网+农业”信息服务体系以最终实现科学指导农业生产经营管理,政府决策监管和社会公众服务。</View>
23
+          </View>
24
+        </View>
25
+        <View className='help-center-cell'>
26
+          <Image src='https://profile.csdnimg.cn/8/3/5/1_yunqiinsight' />
27
+          <View className='help-center-cell-bottom' >
28
+            <View className='help-center-cell-bottom-title'  >收割机的最新消息!!</View>
29
+            <View className='help-center-cell-bottom-content' >构建互联共享的“互联网+农业”信息服务体系以最终实现科学指导农业生产经营管理,政府决策监管和社会公众服务。</View>
30
+          </View>
31
+        </View>
32
+        <View className='help-center-cell'>
33
+          <Image src='https://profile.csdnimg.cn/8/3/5/1_yunqiinsight' />
34
+          <View className='help-center-cell-bottom' >
35
+            <View className='help-center-cell-bottom-title'  >收割机的最新消息!!</View>
36
+            <View className='help-center-cell-bottom-content' >构建互联共享的“互联网+农业”信息服务体系以最终实现科学指导农业生产经营管理,政府决策监管和社会公众服务。</View>
37
+          </View>
38
+        </View>
39
+        <View className='help-center-cell'>
40
+          <Image src='https://profile.csdnimg.cn/8/3/5/1_yunqiinsight' />
41
+          <View className='help-center-cell-bottom' >
42
+            <View className='help-center-cell-bottom-title'  >收割机的最新消息!!</View>
43
+            <View className='help-center-cell-bottom-content' >构建互联共享的“互联网+农业”信息服务体系以最终实现科学指导农业生产经营管理,政府决策监管和社会公众服务。</View>
44
+          </View>
45
+        </View>
46
+        <View className='help-center-cell'>
47
+          <Image src='https://profile.csdnimg.cn/8/3/5/1_yunqiinsight' />
48
+          <View className='help-center-cell-bottom' >
49
+            <View className='help-center-cell-bottom-title'  >收割机的最新消息!!</View>
50
+            <View className='help-center-cell-bottom-content' >构建互联共享的“互联网+农业”信息服务体系以最终实现科学指导农业生产经营管理,政府决策监管和社会公众服务。</View>
51
+          </View>
52
+        </View>
53
+      </scroll-view>
54
+    </View>
55
+  )
56
+}

+ 35
- 0
src/pages/HelpCenterInfo/style.less View File

@@ -0,0 +1,35 @@
1
+.help-center-cell {
2
+  width: 95%;
3
+  display: flex;
4
+  margin: 0 auto;
5
+  padding-bottom: 64px;
6
+  padding-top: 20px;
7
+  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
8
+  align-items: center;
9
+  > Image {
10
+    width: 156px;
11
+    height: 156px;
12
+    border-radius: 10px;
13
+  }
14
+  &-bottom {
15
+    width: 70%;
16
+    margin-left: 22px;
17
+    &-title {
18
+      font-size: 34px;
19
+      font-weight: bold;
20
+      color: #222222;
21
+    }
22
+    &-content {
23
+      font-size: 28px;
24
+      font-weight: 400;
25
+      color: #121212;
26
+      overflow: hidden;
27
+      text-overflow: ellipsis;
28
+      display: -webkit-box;
29
+      -webkit-line-clamp: 2;
30
+      -webkit-box-orient: vertical;
31
+      line-height: 50px;
32
+      margin-top: 40px;
33
+    }
34
+  }
35
+}

+ 10
- 0
src/pages/MoreCars/index.config.js View File

@@ -0,0 +1,10 @@
1
+
2
+export default {
3
+  navigationBarTitleText: '更多',
4
+  navigationStyle: 'custom',
5
+  disableScroll: true,
6
+  usingComponents: {
7
+  }
8
+
9
+
10
+}

+ 38
- 0
src/pages/MoreCars/index.jsx View File

@@ -0,0 +1,38 @@
1
+
2
+
3
+import { View, Image, Input, Button } from "@tarojs/components"
4
+import CustomNav from "@/components/CustomNav"
5
+import searchs from '@/assets/homesImgaes/searchs.png'//搜索图片
6
+
7
+
8
+import './style.less'
9
+
10
+
11
+
12
+export default (props) => {
13
+
14
+  const handleSearch = (e) => {
15
+    console.log(e.detail.value)
16
+  }
17
+
18
+
19
+
20
+
21
+  return (
22
+    <View className='page-index'>
23
+      <View className='index-navbar'>
24
+        <CustomNav title='更多' />
25
+      </View>
26
+      <scroll-view scrollY style='height: 100%;' >
27
+
28
+        <View className='heads-content-searchClass-abcc'>
29
+          <Input type='text' className='heads-content-searchClass-abcc-searchInput' onBlur={handleSearch} placeholder='搜索关键字查询订单' />
30
+          <Image src={searchs} className='heads-content-searchClass-abcc-searchInput-searchImg' />
31
+        </View>
32
+
33
+
34
+
35
+      </scroll-view>
36
+    </View>
37
+  )
38
+}

+ 23
- 0
src/pages/MoreCars/style.less View File

@@ -0,0 +1,23 @@
1
+.heads-content-searchClass-abcc {
2
+  display: inline-block;
3
+  position: relative;
4
+  width: 95%;
5
+  text-align: center;
6
+  flex: 1;
7
+  &-searchInput {
8
+    background: #f8f8f8;
9
+    border-radius: 34px;
10
+    padding-left: 68px;
11
+    padding-right: 34px;
12
+    font-size: 28px;
13
+    height: 68px;
14
+    line-height: 68px;
15
+  }
16
+  &-searchInput-searchImg {
17
+    width: 30px;
18
+    height: 30px;
19
+    position: absolute;
20
+    left: 31px;
21
+    top: 19px;
22
+  }
23
+}

+ 10
- 0
src/pages/MyAddressInfo/index.config.js View File

@@ -0,0 +1,10 @@
1
+
2
+export default {
3
+  navigationBarTitleText: '我的地址',
4
+  navigationStyle: 'custom',
5
+  disableScroll: true,
6
+  usingComponents: {
7
+  }
8
+
9
+
10
+}

+ 52
- 0
src/pages/MyAddressInfo/index.jsx View File

@@ -0,0 +1,52 @@
1
+import { View, Form, Input, Button } from "@tarojs/components"
2
+import CustomNav from "@/components/CustomNav"
3
+import ButtontWX from '@/components/ButtontWX'
4
+
5
+
6
+import './style.less'
7
+
8
+
9
+
10
+
11
+export default (props) => {
12
+  const formSubmit = e => {
13
+    console.log(e.detail.value)
14
+  }
15
+
16
+  const formReset = e => {
17
+    console.log(e)
18
+  }
19
+  return (
20
+    <View className='page-index'>
21
+      <View className='index-navbar'>
22
+        <CustomNav title='我的地址' />
23
+      </View>
24
+      <scroll-view scrollY style='height: 100%;' >
25
+        <View className='form-content'>
26
+          <Form onSubmit={formSubmit} onReset={formReset} >
27
+            <View className='example-body'>
28
+              <View>姓名:</View>
29
+              <Input name='name' placeholder='请输入姓名' />
30
+            </View>
31
+            <View className='example-body'>
32
+              <View>手机号:</View>
33
+              <Input name='phone' placeholder='请输入手机号' />
34
+            </View>
35
+            <View className='example-body'>
36
+              <View>定位信息:</View>
37
+              <Input name='locast' placeholder='请输入定位信息' />
38
+            </View>
39
+            <View className='example-body'>
40
+              <View>地址信息:</View>
41
+              <Input name='locastInfo' placeholder='请输入地址信息' />
42
+            </View>
43
+            <View className='buton-bottom'>
44
+              <ButtontWX onClick={() => { }} formType='submit' butText='保存' butWidth={315} butHeight={49} butFontSize={16} butBorderRadius={49} />
45
+            </View>
46
+          </Form>
47
+
48
+        </View>
49
+      </scroll-view>
50
+    </View >
51
+  )
52
+}

+ 27
- 0
src/pages/MyAddressInfo/style.less View File

@@ -0,0 +1,27 @@
1
+.form-content {
2
+  width: 100%;
3
+  height: 100%;
4
+  margin: 40px 30px;
5
+  .example-body {
6
+    margin-top: 40px;
7
+    > View {
8
+      width: 90%;
9
+
10
+      font-size: 34px;
11
+      font-weight: bold;
12
+      color: #333333;
13
+    }
14
+    > Input {
15
+      margin-top: 58px;
16
+      width: 90%;
17
+      font-size: 34px;
18
+      color: #333333;
19
+      padding-bottom: 30px;
20
+      border-bottom: 1px solid rgba(0, 0, 0, 0.12);
21
+    }
22
+  }
23
+  .buton-bottom {
24
+    width: 100%;
25
+    margin: 85px -40px;
26
+  }
27
+}

+ 9
- 0
src/pages/NewVersionUpdatePage/index.config.js View File

@@ -0,0 +1,9 @@
1
+
2
+export default {
3
+  navigationBarTitleText: '版本更新',
4
+  navigationStyle: 'custom',
5
+  disableScroll: true,
6
+  usingComponents: {
7
+  }
8
+
9
+}

+ 32
- 0
src/pages/NewVersionUpdatePage/index.jsx View File

@@ -0,0 +1,32 @@
1
+import { View, Image } from "@tarojs/components"
2
+import CustomNav from "@/components/CustomNav"
3
+import decorate from "@/assets/icons/comm/decorate.png"
4
+
5
+import './style.less'
6
+
7
+
8
+
9
+
10
+export default (props) => {
11
+
12
+  return (
13
+    <View className='page-index'>
14
+      <View className='index-navbar'>
15
+        <CustomNav title='版本更新' />
16
+      </View>
17
+      <scroll-view scrollY style='height: 100%;' >
18
+        <View>
19
+          <View className='articleTitle-box-New'>
20
+            <Image src={decorate} />
21
+            <View>最近更新:</View>
22
+            <Image src={decorate} />
23
+          </View>
24
+          <View className='new-Content-text'>
25
+            版本更新了一次
26
+            <View>----解决了一些已知的问题-----</View>
27
+          </View>
28
+        </View>
29
+      </scroll-view>
30
+    </View>
31
+  )
32
+}

+ 31
- 0
src/pages/NewVersionUpdatePage/style.less View File

@@ -0,0 +1,31 @@
1
+.articleTitle-box-New {
2
+  width: 100%;
3
+  display: flex;
4
+  font-size: 40px;
5
+  font-weight: bold;
6
+  color: #222222;
7
+  align-items: center;
8
+  justify-content: center;
9
+  margin-top: 32px;
10
+  > Image {
11
+    width: 33px;
12
+    height: 33px;
13
+    margin: auto 31px;
14
+  }
15
+}
16
+
17
+.new-Content-text {
18
+  width: 100%;
19
+  text-align: center;
20
+  font-size: 32px;
21
+  font-weight: bold;
22
+  color: #101010;
23
+  margin: 80px auto;
24
+  > View {
25
+    width: 100%;
26
+    margin: 0 auto;
27
+    font-size: 32px;
28
+    color: #101010;
29
+    font-weight: 500;
30
+  }
31
+}

src/pages/OrderInfo/infex.config.js → src/pages/OrderInfo/index.config.js View File


+ 6
- 2
src/pages/OrderInfo/index.jsx View File

@@ -1,5 +1,6 @@
1 1
 import { View, Text } from "@tarojs/components"
2 2
 import { useState } from "react"
3
+import CustomNav from '@/components/CustomNav'
3 4
 import ButtontWX from '@/components/ButtontWX'
4 5
 // import BottomMoadl from '@/components/BottomMoadl/index'
5 6
 
@@ -19,7 +20,10 @@ export default (props) => {
19 20
 
20 21
 
21 22
   return (
22
-    <View>
23
+    <View className='page-index'>
24
+      <View className='index-navbar'>
25
+        <CustomNav title='订单详情' />
26
+      </View>
23 27
       {/* <BottomMoadl frameTitle='支付方式' flag={showFrame} onRecommend={setRecommend} /> */}
24 28
       <View className='orders-listBox-RihtboxBoxOrderViewText'>
25 29
         <View className='View-LiftTextTop'>订单编号:<Text>41242425</Text></View>
@@ -32,7 +36,7 @@ export default (props) => {
32 36
           <View>费用:<Text className='feiyongStyle'>88</Text></View>
33 37
         </View>
34 38
       </View>
35
-      <View className='BottomtBut' onClick={setRecommend}>
39
+      <View className='BottomtBut' >
36 40
         <ButtontWX butText='支付' butWidth={345} butHeight={49} butFontSize={16} butBorderRadius={49} />
37 41
       </View>
38 42
     </View>

+ 1
- 2
src/pages/UserLogin/index.config.js View File

@@ -1,9 +1,8 @@
1 1
 
2 2
 export default {
3 3
   navigationBarTitleText: '登陆',
4
-  // navigationStyle: 'custom',
4
+  navigationStyle: 'custom',
5 5
   disableScroll: true,
6
-
7 6
   usingComponents: {
8 7
   }
9 8
 

+ 99
- 12
src/pages/UserLogin/index.jsx View File

@@ -1,25 +1,112 @@
1 1
 
2
-import { View, Image, Input } from '@tarojs/components'
2
+import { useState } from 'react'
3
+import Taro from '@tarojs/taro'
4
+
5
+import { View, Image, Input, Text } from '@tarojs/components'
6
+import CustomNav from '@/components/CustomNav'
3 7
 import ButtontWX from '@/components/ButtontWX'
8
+import checkedImg from '@/assets/lolginImages/checkedImg.png'
9
+import unselectedImg from '@/assets/lolginImages/unselectedImg.png'
4 10
 
5 11
 import './style.less'
6 12
 
13
+
7 14
 export default (props) => {
8 15
 
9
-  return (
10
-    <View className='loginBackImg-box' >
11
-      <Image src={require("@/assets/lolginImages/backLogin.png")} />
16
+  const [countCenter, setCountCenter] = useState({
17
+    count: 10,
18
+    toast: false,
19
+    show_btn: false,
20
+    code_ts: '获取验证码'
21
+  })
22
+
23
+  const [checkImage, setCheckImage] = useState(false)
24
+  const [InputCodeValue, setInputCodeValue] = useState('')
25
+
26
+  const InputCode = (r) => {
27
+    setInputCodeValue(r.detail.value)
28
+  }
29
+
30
+  const getCode = (r) => {
31
+    if (InputCodeValue === '' || !(/^1[3456789]\d{9}$/.test(InputCodeValue))) {
32
+      // 这里验证一下号码格式是否正确,为空或者不正常都提示一下,然后激活提示控件true,其他的框架提示控件同理
33
+      console.log('提示')
34
+      Taro.showToast({
35
+        title: '手机号码有误',
36
+        icon: 'none',
37
+        duration: 2000
38
+      })
39
+
40
+    } else {
41
+      // 这里写一个定时器就可以去更新灰色按钮的内容而且show_btn是false时会出现灰色按钮,当倒计时结束又变成可以触发的按钮
42
+      let count = countCenter.count
43
+      const timer = setInterval(() => {
44
+        setCountCenter({
45
+          count: (count--),
46
+          show_btn: true,
47
+          code_ts: count + '秒后重发'
48
+        }, () => {
49
+          if (count == 0) {
50
+            clearInterval(timer)
51
+            setCountCenter({
52
+              show_btn: false,
53
+              count: 60,
54
+              code_ts: '获取验证码'
55
+            })
56
+          }
57
+        })
58
+      }, 1000)
59
+    }
60
+  }
12 61
 
13
-      <View className='loginhallo-text'>
14
-        <View>您好!</View>
15
-        <View>欢迎进入农户端小程序!</View>
16
-      </View>
17 62
 
18
-      <View className='loginPhone-box'>
19
-        <View>+86</View>
20
-        <Input />
21
-        <ButtontWX butText='获取验证码' butWidth={94} butHeight={34} butFontSize={15} butBorderRadius={10} />
22 63
 
64
+  const getUserLogin = () => {
65
+    if (!checkImage) {
66
+      Taro.showToast({
67
+        title: '下方协议未勾选',
68
+        icon: 'none',
69
+        duration: 2000
70
+      })
71
+    }
72
+  }
73
+
74
+
75
+
76
+  return (
77
+    <View className='page-index'>
78
+      <View className='index-navbar'>
79
+        <CustomNav title='登陆' />
80
+      </View>
81
+      <View className='loginBackImg-box' >
82
+        <Image src={require("@/assets/lolginImages/backLogin.png")} />
83
+
84
+        <View className='loginhallo-text'>
85
+          <View>您好!</View>
86
+          <View>欢迎进入农户端小程序!</View>
87
+        </View>
88
+        <View>
89
+          <View className='loginPhone-box' >
90
+            <View className='loginPhone-box-loginPhoneView'>+86</View>
91
+            <Input maxlength={11} placeholder='请输入手机号码' type={Number} onInput={InputCode} />
92
+            <ButtontWX disabled={countCenter.show_btn} onClick={getCode} butText={countCenter.code_ts} butWidth={94} butHeight={34} butFontSize={15} butBorderRadius={10} />
93
+          </View>
94
+          <View className='loginPhone-box'>
95
+            <View className='loginPhone-box-loginPhoneView'>
96
+              <Image style={{ width: '16px', height: '20px', margin: 'auto 2.8vw auto 2.8vw' }} src={require("@/assets/lolginImages/phoneCode.png")} />
97
+            </View>
98
+            <Input maxlength={10} placeholder='请输入验证码' />
99
+          </View>
100
+        </View>
101
+      </View>
102
+      <View className='BottomtButrelative'  >
103
+        <ButtontWX onClick={getUserLogin} butText='登陆' butWidth={315} butHeight={49} butFontSize={16} butBorderRadius={49} />
104
+      </View>
105
+      <View className='bottom-agreement'>
106
+        <Image src={!checkImage ? checkedImg : unselectedImg} onClick={() => { setCheckImage(!checkImage) }} />
107
+        <View>
108
+          请认真查看<Text style={{ color: '#CE3800' }}>文本协议/隐私政策</Text>,确认之后选择此项!
109
+        </View>
23 110
       </View>
24 111
 
25 112
     </View>

+ 43
- 6
src/pages/UserLogin/style.less View File

@@ -4,13 +4,13 @@
4 4
   > Image {
5 5
     height: 100%;
6 6
     width: 100%;
7
-    background-size: 100% 100%;
8
-    background-repeat: no-repeat;
9
-    position: fixed;
7
+
8
+    position: absolute;
9
+    top: 0;
10 10
   }
11 11
 
12 12
   .loginhallo-text {
13
-    position: absolute;
13
+    position: relative;
14 14
     margin: 98px 0 80px 30px;
15 15
   }
16 16
   .loginhallo-text:nth-child(1) {
@@ -25,8 +25,45 @@
25 25
   }
26 26
 
27 27
   .loginPhone-box {
28
-    position: absolute;
29
-    > View {
28
+    width: 93%;
29
+    height: 108px;
30
+    margin: 0 auto;
31
+    position: relative;
32
+    display: flex;
33
+    align-items: center;
34
+    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
35
+    padding-bottom: 12px;
36
+
37
+    &-loginPhoneView {
38
+      font-size: 38px;
39
+      font-weight: 500;
40
+      color: #333333;
41
+      height: 39px;
42
+      line-height: 39px;
43
+      padding-right: 20px;
44
+      margin-right: 31px;
45
+      border-right: 3px solid #000;
30 46
     }
31 47
   }
32 48
 }
49
+.BottomtButrelative {
50
+  position: relative;
51
+  bottom: 5vh;
52
+}
53
+
54
+.bottom-agreement {
55
+  position: relative;
56
+  display: flex;
57
+  align-items: center;
58
+  font-size: 26px;
59
+  color: #2a2a2a;
60
+  margin-left: 30px;
61
+  margin-bottom: 60px;
62
+  // height: 2vh;
63
+  // bottom: 8vh;
64
+  > Image {
65
+    width: 28px;
66
+    height: 28px;
67
+    margin-right: 11px;
68
+  }
69
+}

+ 2
- 1
src/pages/index/index.config.js View File

@@ -1,7 +1,8 @@
1 1
 
2 2
 export default {
3 3
   navigationBarTitleText: '首页',
4
-  // navigationStyle: 'custom',
4
+  navigationStyle: 'custom',
5
+
5 6
   styleIsolation: 'shared',
6 7
   enableShareAppMessage: true,
7 8
   disableScroll: true,

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

@@ -1,7 +1,7 @@
1 1
 import React, { useState, useEffect } from 'react'
2 2
 import Taro, { useDidShow } from '@tarojs/taro'
3 3
 import withLayout from '@/layouts'
4
-
4
+import CustomNav from '@/components/CustomNav'
5 5
 import tabList from './tabbar'
6 6
 import Homes from './tabs/Homes'
7 7
 import Orders from './tabs/Orders'
@@ -40,7 +40,9 @@ export default withLayout((props) => {
40 40
 
41 41
   return (
42 42
     <view className='page-index'>
43
+
43 44
       <view className='index-navbar'>
45
+        <CustomNav title='首页' />
44 46
       </view>
45 47
       <view className='index-container'>
46 48
         {currentTab === 0 && <Homes />}

+ 6
- 2
src/pages/index/tabs/Homes.jsx View File

@@ -1,7 +1,7 @@
1 1
 
2 2
 import { View, Swiper, Image, SwiperItem, Text, Input } from "@tarojs/components"
3 3
 import ButtontWX from '@/components/ButtontWX'
4
-
4
+import Taro from "@tarojs/taro"
5 5
 import addresss from '@/assets/mineImgaes/addresss.png'//地址
6 6
 import searchs from '@/assets/homesImgaes/searchs.png'//搜索图片
7 7
 import carsListImga from '@/assets/homesImgaes/carsListImga.png'//农机列表图片
@@ -34,6 +34,10 @@ export default (props) => {
34 34
     console.log(e.detail.value)
35 35
   }
36 36
 
37
+  const goToCarsList = () => {
38
+    Taro.navigateTo({ url: '/pages/MoreCars/index' })
39
+  }
40
+
37 41
   return (
38 42
 
39 43
 
@@ -65,7 +69,7 @@ export default (props) => {
65 69
           <Image src={carsListImga} />
66 70
           <View>农机列表</View>
67 71
         </View>
68
-        <View className='content-header-box-rightCentent'>更多&gt;&gt;</View>
72
+        <View onClick={goToCarsList} className='content-header-box-rightCentent'>更多&gt;&gt;</View>
69 73
       </View>
70 74
 
71 75
       {

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

@@ -1,7 +1,7 @@
1 1
 .User-Avatar-background-falseBox {
2 2
   width: 95vw;
3 3
   height: 30vh;
4
-  background-size: 100%;
4
+  background-size: 100% 100%;
5 5
   background-repeat: no-repeat;
6 6
   border-radius: 40px;
7 7
   box-shadow: 0px 10px 24px 0px rgba(0, 0, 0, 0.1);

+ 24
- 2
src/routes.js View File

@@ -9,12 +9,34 @@ const Pages = [
9 9
   {
10 10
     title: '订单详情',
11 11
     page: 'pages/OrderInfo/index',
12
-    isIndex: true,
13 12
   },
14 13
   {
15 14
     title: '登陆页',
16 15
     page: 'pages/UserLogin/index',
17
-    isIndex: true,
16
+  },
17
+  {
18
+    title: '我的地址',
19
+    page: 'pages/MyAddressInfo/index',
20
+  },
21
+  {
22
+    title: '关于我们',
23
+    page: 'pages/AboutUsPage/index',
24
+  },
25
+  {
26
+    title: '版本更新',
27
+    page: 'pages/NewVersionUpdatePage/index',
28
+  },
29
+  {
30
+    title: '帮助中心',
31
+    page: 'pages/HelpCenterInfo/index',
32
+  },
33
+  {
34
+    title: '意见反馈',
35
+    page: 'pages/FeedbackText/index',
36
+  },
37
+  {
38
+    title: '农机列表',
39
+    page: 'pages/MoreCars/index',
18 40
   },
19 41
 
20 42
 ];