[baozhangchao] 3 vuotta sitten
vanhempi
commit
205a2897da

BIN
src/assets/BottomMoadlImags/Alipay.png Näytä tiedosto


BIN
src/assets/BottomMoadlImags/WeChatPay.png Näytä tiedosto


BIN
src/assets/lolginImages/backLogin.png Näytä tiedosto


BIN
src/assets/ordersImages/ordersLeft.png Näytä tiedosto


BIN
src/assets/ordersImages/ordersListImga.png Näytä tiedosto


+ 67
- 0
src/components/BottomMoadl/index.jsx Näytä tiedosto

@@ -0,0 +1,67 @@
1
+import Taro from '@tarojs/taro'
2
+import { View, Image } from '@tarojs/components'
3
+import WeChatPay from '@/assets/BottomMoadlImags/WeChatPay.png'
4
+import Alipay from '@/assets/BottomMoadlImags/Alipay.png'
5
+import userRight from '@/assets/mineImgaes/userRight.png'
6
+
7
+import './style.css'
8
+
9
+
10
+export default (props) => {
11
+  const { frameTitle, flag, onRecommend } = props
12
+
13
+  let wrapAnimate = 'wrap wrapAnimate'
14
+  let frameAnimate = 'frame-wrapper'
15
+  // const [textNextSum, setTextNext] = useState(1)
16
+  // const [recommendContent, setRecommendContent] = useState([])
17
+  // const [loading, setLoading] = useState(false)
18
+
19
+  const hideFrame = () => {
20
+    onRecommend()
21
+  }
22
+
23
+
24
+
25
+
26
+  return (
27
+    flag && <view>
28
+      <view className={wrapAnimate} style='background:rgba(0,0,0,0);'></view>
29
+      <view onClick={hideFrame} className={frameAnimate}>
30
+        <view className='frame'>
31
+          {/* 标题  */}
32
+          <view className='title-wrapper '>
33
+            <view>{frameTitle}</view>
34
+          </view>
35
+          {/* 内容 */}
36
+          <View className='Paybox-moadl' style='overflow-x: hidden;'>
37
+            <View className='Paybox-moadl-Alipay'>
38
+              <View className='Paybox-moadl-liftPay'>
39
+                <Image className='Paybox-moadl-liftPay-Alipay' src={Alipay} />
40
+                支付宝
41
+              </View>
42
+              <Image className='Paybox-moadl-rightPay' src={userRight} />
43
+            </View>
44
+
45
+            <View className='Paybox-moadl-Alipay'>
46
+              <View className='Paybox-moadl-liftPay'>
47
+                <Image className='Paybox-moadl-liftPay-Alipay' src={WeChatPay} />
48
+                微信
49
+              </View>
50
+              <Image className='Paybox-moadl-rightPay' src={userRight} />
51
+            </View>
52
+            {/* 
53
+            <View className='Paybox-moadl-Alipay'>
54
+              <View>
55
+                <Image src={WeChatPay} />
56
+                微信
57
+              </View>
58
+              <Image src={userRight} />
59
+
60
+            </View> */}
61
+
62
+          </View>
63
+        </view>
64
+      </view>
65
+    </view>
66
+  )
67
+}

+ 82
- 0
src/components/BottomMoadl/style.css Näytä tiedosto

@@ -0,0 +1,82 @@
1
+.wrapAnimate {
2
+  animation: wrapAnimate 0.2s ease forwards;
3
+}
4
+@keyframes wrapAnimate {
5
+  0% {
6
+  }
7
+  100% {
8
+    background: rgba(0, 0, 0, 0.35);
9
+  }
10
+}
11
+.frame-wrapper {
12
+  position: fixed;
13
+  height: 100vh;
14
+  width: 100vw;
15
+  z-index: 2;
16
+  top: 0;
17
+}
18
+.frame {
19
+  background: #fff;
20
+  position: absolute;
21
+  bottom: 0;
22
+  width: 100%;
23
+  padding: 2.9vw 2.9vw 0;
24
+  border-top-left-radius: 40px;
25
+  border-top-right-radius: 40px;
26
+  z-index: 3;
27
+  box-sizing: border-box;
28
+  align-items: center;
29
+  text-align: center;
30
+}
31
+.title-wrapper {
32
+  justify-content: space-between;
33
+
34
+  text-align: center;
35
+  height: 28px;
36
+  font-size: 35px;
37
+  font-weight: 700;
38
+  color: #202020;
39
+  margin-bottom: 5.9vw;
40
+}
41
+.title-wrapper > image {
42
+  width: 3.5vw;
43
+  height: 3.5vw;
44
+  padding: 0 5vw;
45
+  margin-right: -5vw;
46
+}
47
+
48
+.wrap {
49
+  position: fixed;
50
+  z-index: 1;
51
+  top: 0;
52
+  left: 0;
53
+  right: 0;
54
+  bottom: 0;
55
+}
56
+
57
+.Paybox-moadl {
58
+}
59
+.Paybox-moadl-Alipay {
60
+  width: 100%;
61
+  display: flex;
62
+  align-items: center;
63
+  justify-content: space-between;
64
+  margin: 60px auto 60px auto;
65
+}
66
+.Paybox-moadl-liftPay {
67
+  display: flex;
68
+  align-items: center;
69
+  font-size: 36px;
70
+  font-weight: 500;
71
+  color: #333333;
72
+}
73
+
74
+.Paybox-moadl-liftPay-Alipay {
75
+  width: 60px;
76
+  height: 60px;
77
+  padding-right: 21px;
78
+}
79
+.Paybox-moadl-rightPay {
80
+  width: 21px;
81
+  height: 38px;
82
+}

+ 1
- 0
src/components/ButtontWX/style.less Näytä tiedosto

@@ -1,6 +1,7 @@
1 1
 .buttont-box {
2 2
   background: #ff703b;
3 3
   display: flex;
4
+  margin: 0 auto;
4 5
   > View {
5 6
     margin: 0 auto;
6 7
     font-weight: 600;

+ 40
- 0
src/pages/OrderInfo/index.jsx Näytä tiedosto

@@ -0,0 +1,40 @@
1
+import { View, Text } from "@tarojs/components"
2
+import { useState } from "react"
3
+import ButtontWX from '@/components/ButtontWX'
4
+// import BottomMoadl from '@/components/BottomMoadl/index'
5
+
6
+
7
+
8
+
9
+
10
+
11
+import './style.less'
12
+
13
+export default (props) => {
14
+  //底部弹窗
15
+  // const [showFrame, setShowFrame] = useState(false)
16
+  // const setRecommend = () => {
17
+  //   setShowFrame(!showFrame)
18
+  // }
19
+
20
+
21
+  return (
22
+    <View>
23
+      {/* <BottomMoadl frameTitle='支付方式' flag={showFrame} onRecommend={setRecommend} /> */}
24
+      <View className='orders-listBox-RihtboxBoxOrderViewText'>
25
+        <View className='View-LiftTextTop'>订单编号:<Text>41242425</Text></View>
26
+        <View>农机名称:<Text>阿松大的</Text></View>
27
+        <View>需求数量:<Text>2</Text></View>
28
+        <View>需求时间:<Text>2322-80-99</Text></View>
29
+        <View>下单时间:<Text>2244-06-78</Text></View>
30
+        <View>订单状态:<Text  >未支付</Text></View>
31
+        <View className='View-LiftTextBotton'>
32
+          <View>费用:<Text className='feiyongStyle'>88</Text></View>
33
+        </View>
34
+      </View>
35
+      <View className='BottomtBut' onClick={setRecommend}>
36
+        <ButtontWX butText='支付' butWidth={345} butHeight={49} butFontSize={16} butBorderRadius={49} />
37
+      </View>
38
+    </View>
39
+  )
40
+}

+ 9
- 0
src/pages/OrderInfo/infex.config.js Näytä tiedosto

@@ -0,0 +1,9 @@
1
+
2
+export default {
3
+  navigationBarTitleText: '订单详情',
4
+  navigationStyle: 'custom',
5
+  disableScroll: true,
6
+  usingComponents: {
7
+  }
8
+
9
+}

+ 49
- 0
src/pages/OrderInfo/style.less Näytä tiedosto

@@ -0,0 +1,49 @@
1
+.orders-listBox-RihtboxBoxOrderViewText:before {
2
+  content: "";
3
+  display: block;
4
+  position: absolute;
5
+  width: 100%;
6
+  bottom: -10px;
7
+  left: 0;
8
+  border-bottom: 20px dotted rgb(255, 255, 255);
9
+}
10
+
11
+.orders-listBox-RihtboxBoxOrderViewText {
12
+  width: 85vw;
13
+  margin: 35px auto 44px auto;
14
+  padding: 62px 30px 93px 30px;
15
+  background: #ffffff;
16
+  box-shadow: 0px 4px 40px 0px rgba(0, 0, 0, 0.12);
17
+  border-radius: 40px 40px 0px 0px;
18
+  position: relative;
19
+
20
+  .View-LiftTextTop {
21
+    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
22
+    padding-bottom: 20px;
23
+    padding-top: 0;
24
+  }
25
+  View:nth-child(6) {
26
+    padding-bottom: 40px;
27
+
28
+    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
29
+  }
30
+  > View {
31
+    padding: 15px 0;
32
+    font-size: 32px;
33
+    font-weight: bold;
34
+    color: #666666;
35
+    > Text {
36
+      color: #222222;
37
+    }
38
+
39
+    .feiyongStyle {
40
+      color: #222222;
41
+    }
42
+  }
43
+}
44
+
45
+.BottomtBut {
46
+  width: 99vw;
47
+  position: absolute;
48
+  bottom: 5vh;
49
+}

+ 20
- 2
src/pages/UserLogin/index.jsx Näytä tiedosto

@@ -1,9 +1,27 @@
1 1
 
2
-import { View, Text } from '@tarojs/components'
2
+import { View, Image, Input } from '@tarojs/components'
3
+import ButtontWX from '@/components/ButtontWX'
4
+
5
+import './style.less'
3 6
 
4 7
 export default (props) => {
5 8
 
6 9
   return (
7
-    <View>1111111111</View>
10
+    <View className='loginBackImg-box' >
11
+      <Image src={require("@/assets/lolginImages/backLogin.png")} />
12
+
13
+      <View className='loginhallo-text'>
14
+        <View>您好!</View>
15
+        <View>欢迎进入农户端小程序!</View>
16
+      </View>
17
+
18
+      <View className='loginPhone-box'>
19
+        <View>+86</View>
20
+        <Input />
21
+        <ButtontWX butText='获取验证码' butWidth={94} butHeight={34} butFontSize={15} butBorderRadius={10} />
22
+
23
+      </View>
24
+
25
+    </View>
8 26
   )
9 27
 }

+ 0
- 0
src/pages/UserLogin/index.less Näytä tiedosto


+ 9
- 4
src/pages/index/tabs/Mine.jsx Näytä tiedosto

@@ -37,8 +37,11 @@ export default (props) => {
37 37
               <View style={{ backgroundImage: "url(" + require("@/assets/mineImgaes/mineBack.png") + ")" }} className='User-Avatar-background-trueBox'>
38 38
                 <View className='setPassword'>修改密码</View>
39 39
                 <Image className='User-Avatar-background-trueBox-userImg' src='https://profile.csdnimg.cn/3/1/5/0_qq_42551866' />
40
-                <View className='User-Avatar-background-trueBox-name textStyle' >鲍zhangchao</View>
41
-                <View className='User-Avatar-background-trueBox-phone textStyle'>18082043755</View>
40
+                <View className='User-Avatar-background-trueBox-name'>
41
+                  <View >鲍zhangchao</View>
42
+                  <View >18082043755</View>
43
+                </View>
44
+
42 45
               </View>
43 46
               <UserCellBox title='地址信息' >
44 47
                 <View className='addresss-box'>
@@ -71,8 +74,10 @@ export default (props) => {
71 74
 
72 75
         </UserCellBox>
73 76
 
74
-
75
-        <View className='bottom-buttom'>退出登陆</View>
77
+        {
78
+          !isLoginBox ? '' :
79
+            <View className='bottom-buttom'>退出登陆</View>
80
+        }
76 81
 
77 82
       </View>
78 83
     </scroll-view>

+ 22
- 10
src/pages/index/tabs/MineCss/style.less Näytä tiedosto

@@ -33,7 +33,7 @@
33 33
 //已登陆样式-----------------------
34 34
 
35 35
 .User-Avatar-background-trueBox {
36
-  background-size: 100%;
36
+  background-size: 100% 100%;
37 37
   background-repeat: no-repeat;
38 38
   width: 95vw;
39 39
   height: 30vh;
@@ -41,6 +41,7 @@
41 41
   box-shadow: 0px 10px 24px 0px rgba(0, 0, 0, 0.1);
42 42
   margin-top: 1em;
43 43
   margin: 0 auto 30px auto;
44
+  display: flex;
44 45
   &-userImg {
45 46
     position: relative;
46 47
     top: 8vh;
@@ -51,19 +52,30 @@
51 52
     border-radius: 50%;
52 53
   }
53 54
 
54
-  .textStyle {
55
+  &-name {
55 56
     position: relative;
56
-    top: -5vh;
57
-    margin-left: -2em;
58
-    text-align: center;
57
+    top: 9vh;
58
+    left: 11vw;
59 59
     font-size: 34px;
60 60
     color: #ffffff;
61 61
     font-weight: 500;
62 62
     text-shadow: 0px 2px 0px rgba(0, 0, 0, 0.4);
63
+    > View {
64
+    }
63 65
   }
64
-  &-phone {
65
-    margin-top: 38px;
66
-  }
66
+  // .textStyle {
67
+  //   position: relative;
68
+  //   top: -5vh;
69
+  //   margin-left: -2em;
70
+  //   text-align: center;
71
+  //   font-size: 34px;
72
+  //   color: #ffffff;
73
+  //   font-weight: 500;
74
+  //   text-shadow: 0px 2px 0px rgba(0, 0, 0, 0.4);
75
+  // }
76
+  // &-phone {
77
+  //   margin-top: 38px;
78
+  // }
67 79
 
68 80
   .setPassword {
69 81
     position: absolute;
@@ -116,8 +128,8 @@
116 128
   align-items: center;
117 129
   border-bottom: 1px solid rgba(0, 0, 0, 0.1);
118 130
   &-imgae {
119
-    width: 34px;
120
-    height: 43px;
131
+    width: 46px;
132
+    height: 46px;
121 133
   }
122 134
   .box-flex {
123 135
     width: 91%;

+ 99
- 3
src/pages/index/tabs/Orders.jsx Näytä tiedosto

@@ -1,12 +1,108 @@
1 1
 
2
-import { View } from "@tarojs/components"
2
+import { View, Image, Text } from "@tarojs/components"
3
+import Taro from '@tarojs/taro'
4
+
5
+import ordersListImga from '@/assets/ordersImages/ordersListImga.png'
6
+import ordersLeft from '@/assets/ordersImages/ordersLeft.png'//订单装饰
7
+
8
+
9
+import './OrdersCss/style.less'
3 10
 
4 11
 
5 12
 export default (props) => {
6 13
 
14
+
15
+
16
+
17
+  const orderStates = (item) => {
18
+    switch (item) {
19
+      case 0:
20
+        return {
21
+          title: '待付款',
22
+          styleColor: '#51D4FF'
23
+        }
24
+      case 1:
25
+        return {
26
+          title: '已付款',
27
+          styleColor: '#FF703B'
28
+        }
29
+      case 2:
30
+        return {
31
+          title: '进行中',
32
+          styleColor: '#44F68B'
33
+        }
34
+      case 3:
35
+        return {
36
+          title: '已完成',
37
+          styleColor: '#FF703B'
38
+        }
39
+      case 4:
40
+        return {
41
+          title: '待评价',
42
+          styleColor: '#51D4FF'
43
+        }
44
+      case 5:
45
+        return {
46
+          title: '退单待审',
47
+          styleColor: '#51D4FF'
48
+        }
49
+      case 6:
50
+        return {
51
+          title: '待付款',
52
+          styleColor: '#FF703B'
53
+        }
54
+      default:
55
+        return {
56
+          title: '暂无状态',
57
+          styleColor: '#000'
58
+        }
59
+    }
60
+  }
61
+  const handleTobePaid = () => {
62
+    Taro.navigateTo({ url: '/pages/OrderInfo/index' })
63
+  }
64
+
65
+  const orderListContent = [
66
+    { orderNumber: 'XJDF82521DA', cardsName: '联合收割机', cardNumber: '6', need: '2021-08-09', place: '2021-08-01', orderState: 0, feiyong: '360' },
67
+    { orderNumber: 'XJDF45244DA', cardsName: '不知道这是什么什么', cardNumber: '1', need: '2021-05-08', place: '2021-08-17', orderState: 1, feiyong: '78' },
68
+    { orderNumber: 'XJDF82521DA', cardsName: '为此发爱疸的箭的', cardNumber: '211', need: '2021-08-04', place: '2021-08-27', orderState: 2, feiyong: '35' },
69
+    { orderNumber: 'X78788821DA', cardsName: '水稻播种000015', cardNumber: '4', need: '2021-04-04', place: '2021-08-22', orderState: 3, feiyong: '170' },
70
+    { orderNumber: 'X44F77777DA', cardsName: '消费者协会', cardNumber: '5', need: '2021-02-11', place: '2021-08-10', orderState: 4, feiyong: '88' },
71
+    { orderNumber: 'XJ7857771DA', cardsName: '3·15', cardNumber: '1', need: '2021-01-09', place: '2021-08-10', orderState: 5, feiyong: '1.35' },
72
+    { orderNumber: 'X0000000001', cardsName: '农民伯伯', cardNumber: '2', need: '2027-08-29', place: '2021-08-17', orderState: 6, feiyong: '0.35' },
73
+  ]
74
+
7 75
   return (
8
-    <View>
76
+    <scroll-view scrollY style='height: 100%;' >
77
+      <View className='content-header-box-orders'>
78
+        <View className='content-header-box-orders-liftCentent'>
79
+          <Image src={ordersListImga} />
80
+          <View>订单列表</View>
81
+        </View>
82
+        {/* <View className='content-header-box-orders-rightCentent'>更多&gt;&gt;</View> */}
83
+      </View>
84
+      {
85
+        orderListContent.map((item, index) => {
86
+          return (
87
+            <View key={index} className='orders-listBox'>
88
+              <Image src={ordersLeft} />
89
+              <View className='orders-listBox-RihtboxBoxOrderViewText'>
90
+                <View className='View-LiftTextTop' onClick={handleTobePaid} >订单编号:<Text>{item.orderNumber}</Text><Text className='View-LiftTextTop-nextText'>更多&gt;&gt;</Text></View>
91
+                <View>农机名称:<Text>{item.cardsName}</Text></View>
92
+                <View>需求数量:<Text>{item.cardNumber}</Text></View>
93
+                <View>需求时间:<Text>{item.need}</Text></View>
94
+                <View>下单时间:<Text>{item.place}</Text></View>
95
+                <View className='View-LiftTextBotton'>
96
+                  <View>订单状态:<Text style={{ color: orderStates(item.orderState).styleColor }} >{orderStates(item.orderState).title}</Text></View>
97
+                  <View>费用:<Text className='feiyongStyle'>{item.feiyong}</Text></View>
98
+                </View>
99
+              </View>
100
+            </View>
101
+          )
102
+        })
103
+
104
+      }
9 105
 
10
-    </View>
106
+    </scroll-view>
11 107
   )
12 108
 }

+ 86
- 0
src/pages/index/tabs/OrdersCss/style.less Näytä tiedosto

@@ -0,0 +1,86 @@
1
+.content-header-box-orders {
2
+  width: 93vw;
3
+  margin: 0 auto;
4
+  display: flex;
5
+  align-items: center;
6
+  justify-content: space-between;
7
+  &-liftCentent {
8
+    display: flex;
9
+    align-items: center;
10
+    > Image {
11
+      width: 44px;
12
+      height: 40px;
13
+    }
14
+    > View {
15
+      padding-left: 15px;
16
+      font-size: 40px;
17
+      font-weight: 800;
18
+      color: #222222;
19
+    }
20
+  }
21
+  &-rightCentent {
22
+    font-size: 32px;
23
+    font-weight: 500;
24
+    color: #666666;
25
+  }
26
+}
27
+.orders-listBox {
28
+  box-shadow: 0px 10px 24px 0px rgba(0, 0, 0, 0.1);
29
+  padding: 60px 30px;
30
+  display: flex;
31
+  justify-items: flex-start;
32
+  > Image {
33
+    width: 34px;
34
+    padding-right: 33px;
35
+  }
36
+  &-RihtboxBoxOrderViewText {
37
+    .View-LiftTextTop {
38
+      width: 80vw;
39
+      border-bottom: 1px solid rgba(0, 0, 0, 0.1);
40
+      padding-bottom: 20px;
41
+      padding-top: 0;
42
+      &-nextText {
43
+        position: relative;
44
+        left: 13vw;
45
+        font-size: 32px;
46
+        font-weight: 500;
47
+        color: #666666;
48
+      }
49
+    }
50
+
51
+    View:nth-child(5) {
52
+      padding-bottom: 40px;
53
+    }
54
+    > View {
55
+      padding: 15px 0;
56
+      font-size: 32px;
57
+      font-weight: bold;
58
+      color: #666666;
59
+      > Text {
60
+        color: #222222;
61
+      }
62
+    }
63
+    .View-LiftTextBotton {
64
+      border-top: 1px solid rgba(0, 0, 0, 0.1);
65
+      padding-bottom: 20px;
66
+      width: 80vw;
67
+      padding-top: 30px;
68
+      display: flex;
69
+      align-items: center;
70
+      justify-content: space-between;
71
+      > View {
72
+        padding-top: 30px;
73
+        font-size: 32px;
74
+        font-weight: bold;
75
+        color: #666666;
76
+        .feiyongStyle {
77
+          font-weight: bold;
78
+          color: #222222;
79
+          background: linear-gradient(180deg, #fa7878 0%, #b61515 100%);
80
+          -webkit-background-clip: text;
81
+          -webkit-text-fill-color: transparent;
82
+        }
83
+      }
84
+    }
85
+  }
86
+}

+ 10
- 0
src/routes.js Näytä tiedosto

@@ -6,6 +6,16 @@ const Pages = [
6 6
     page: 'pages/index/index',
7 7
     isIndex: true,
8 8
   },
9
+  {
10
+    title: '订单详情',
11
+    page: 'pages/OrderInfo/index',
12
+    isIndex: true,
13
+  },
14
+  {
15
+    title: '登陆页',
16
+    page: 'pages/UserLogin/index',
17
+    isIndex: true,
18
+  },
9 19
 
10 20
 ];
11 21