[baozhangchao] 3 лет назад
Родитель
Сommit
e36a10cf83

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

@@ -100,10 +100,7 @@ export default (props) => {
100 100
       </View>
101 101
       <scroll-view scrollY style='height: 100%;' >
102 102
         <View>
103
-
104 103
           {/* <mp-orderRater raterChange={srcor} initW='50%' /> */}
105
-
106
-
107 104
           {
108 105
             addresList.map((item, index) => {
109 106
               return (

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

@@ -7,7 +7,7 @@ import searchs from '@/assets/homesImgaes/searchs.png'//搜索图片
7 7
 import carsListImga from '@/assets/homesImgaes/carsListImga.png'//农机列表图片
8 8
 import CarsListContent from "@/components/CarsListContent"
9 9
 import { getHomeBanner, getMachinery, } from "@/services/homes"
10
-
10
+import { useModel } from "@/store"
11 11
 import './HomesCss/style.less'
12 12
 
13 13
 export default (props) => {
@@ -15,6 +15,7 @@ export default (props) => {
15 15
   const [bannerHome, setBannerHome] = useState([])
16 16
   const [carsList, setCarsList] = useState([])
17 17
 
18
+  const { person, setPerson } = useModel('userData')
18 19
 
19 20
 
20 21
   useEffect(() => {
@@ -46,36 +47,41 @@ export default (props) => {
46 47
 
47 48
   return (
48 49
     <scroll-view className='scrollView' scrollY style='height: 100%;' >
49
-      <View className='heads-top-box'>
50
-        <View className='heads-top-box-left'>
51
-          <Image src={addresss} className='heads-top-box-left-addresssImg' />
52
-          <Text>邓州市</Text>
53
-          <View className='heads-top-box-left-addresssImg-DownIcon' />
54
-        </View>
55
-        <View className='heads-content-searchClass'>
56
-          <Input type='text' className='heads-content-searchClass-searchInput' onBlur={handleSearch} placeholder='搜索关键字查询订单' />
57
-          <Image src={searchs} className='heads-content-searchClass-searchInput-searchImg' />
58
-        </View>
59
-      </View>
60
-      <Swiper
61
-        circular
62
-        autoplay
63
-        className='swiper-box'
64
-      >
65
-        {bannerHome.map((item, inx) => (
66
-          <SwiperItem key={inx}>
67
-            <Image src={item.thumb} mode='widthFix' className='storeImage' />
68
-          </SwiperItem>
69
-        ))}
70
-      </Swiper>
71
-      <View className='content-header-box'>
72
-        <View className='content-header-box-liftCentent'>
73
-          <Image src={carsListImga} />
74
-          <View>农机列表</View>
75
-        </View>
76
-        <View onClick={goToCarsList} className='content-header-box-rightCentent'>更多&gt;&gt;</View>
77
-      </View>
78
-      <CarsListContent carsList={carsList} />
50
+      {
51
+        person?.phone !== '' ? <>
52
+          <View className='heads-top-box'>
53
+            <View className='heads-top-box-left'>
54
+              <Image src={addresss} className='heads-top-box-left-addresssImg' />
55
+              <Text>邓州市</Text>
56
+              <View className='heads-top-box-left-addresssImg-DownIcon' />
57
+            </View>
58
+            <View className='heads-content-searchClass'>
59
+              <Input type='text' className='heads-content-searchClass-searchInput' onBlur={handleSearch} placeholder='搜索关键字查询订单' />
60
+              <Image src={searchs} className='heads-content-searchClass-searchInput-searchImg' />
61
+            </View>
62
+          </View>
63
+          <Swiper
64
+            circular
65
+            autoplay
66
+            className='swiper-box'
67
+          >
68
+            {bannerHome.map((item, inx) => (
69
+              <SwiperItem key={inx}>
70
+                <Image src={item.thumb} mode='widthFix' className='storeImage' />
71
+              </SwiperItem>
72
+            ))}
73
+          </Swiper>
74
+          <View className='content-header-box'>
75
+            <View className='content-header-box-liftCentent'>
76
+              <Image src={carsListImga} />
77
+              <View>农机列表</View>
78
+            </View>
79
+            <View onClick={goToCarsList} className='content-header-box-rightCentent'>更多&gt;&gt;</View>
80
+          </View>
81
+          <CarsListContent carsList={carsList} />
82
+        </> : <View>未登录,请先登陆</View>
83
+      }
84
+
79 85
     </scroll-view>
80 86
   )
81 87
 }

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

@@ -152,10 +152,10 @@ export default (props) => {
152 152
 
153 153
         </UserCellBox>
154 154
 
155
-        {
155
+        {/* {
156 156
           !isLoginBox ? '' :
157 157
             <View className='bottom-buttom'>退出登陆</View>
158
-        }
158
+        } */}
159 159
 
160 160
       </View>
161 161
     </scroll-view>

+ 36
- 24
src/pages/index/tabs/Orders.jsx Просмотреть файл

@@ -7,6 +7,7 @@ import ordersLeft from '@/assets/ordersImages/ordersLeft.png'//订单装饰
7 7
 import { useEffect, useState } from "react"
8 8
 import { getOrder } from "@/services/order"
9 9
 import formatTimes from "@/utils/codeSegment"
10
+import { useModel } from "@/store"
10 11
 
11 12
 import './OrdersCss/style.less'
12 13
 
@@ -14,6 +15,11 @@ import './OrdersCss/style.less'
14 15
 export default (props) => {
15 16
 
16 17
   const [ourderList, setOrderList] = useState([])
18
+
19
+  const { person, setPerson } = useModel('userData')
20
+
21
+
22
+
17 23
   useDidShow(() => {
18 24
     getOrder().then((e) => {
19 25
       const { records } = e
@@ -80,33 +86,39 @@ export default (props) => {
80 86
 
81 87
   return (
82 88
     <scroll-view scrollY style='height: 100%;' >
83
-      <View className='content-header-box-orders'>
84
-        <View className='content-header-box-orders-liftCentent'>
85
-          <Image src={ordersListImga} />
86
-          <View>订单列表</View>
87
-        </View>
88
-        {/* <View className='content-header-box-orders-rightCentent'>更多&gt;&gt;</View> */}
89
-      </View>
89
+
90 90
       {
91
-        ourderList.map((item, index) => {
92
-          return (
93
-            <View key={index} className='orders-listBox'>
94
-              <Image src={ordersLeft} />
95
-              <View className='orders-listBox-RihtboxBoxOrderViewText'>
96
-                <View className='View-LiftTextTop' onClick={() => handleTobePaid(item.orderId)} >订单编号:<Text>{item.orderNo}</Text><Text className='View-LiftTextTop-nextText'>更多&gt;&gt;</Text></View>
97
-                <View>农机名称:<Text>{item.machineryName}</Text></View>
98
-                <View>作业面积:<Text>{item.amount}</Text></View>
99
-                <View>需求时间:<Text>{formatTimes(item.appointmentDate, 'yyyy-MM-dd hh:mm')}</Text></View>
100
-                <View>下单时间:<Text>{formatTimes(item.createDate, 'yyyy-MM-dd hh:mm')}</Text></View>
101
-                <View className='View-LiftTextBotton'>
102
-                  <View>订单状态:<Text style={{ color: orderStates(item.payStatus).styleColor }} >{orderStates(item.orderState).title}</Text></View>
103
-                  <View>费用:<Text className='feiyongStyle'>{item.charges}</Text></View>
104
-                </View>
105
-              </View>
91
+        person?.phone !== '' ? <>
92
+          <View className='content-header-box-orders'>
93
+            <View className='content-header-box-orders-liftCentent'>
94
+              <Image src={ordersListImga} />
95
+              <View>订单列表</View>
106 96
             </View>
107
-          )
108
-        })
97
+            {/* <View className='content-header-box-orders-rightCentent'>更多&gt;&gt;</View> */}
98
+          </View>
99
+          {
100
+            ourderList.map((item, index) => {
101
+              return (
102
+                <View key={index} className='orders-listBox'>
103
+                  <Image src={ordersLeft} />
104
+                  <View className='orders-listBox-RihtboxBoxOrderViewText'>
105
+                    <View className='View-LiftTextTop' onClick={() => handleTobePaid(item.orderId)} >订单编号:<Text>{item.orderNo}</Text><Text className='View-LiftTextTop-nextText'>更多&gt;&gt;</Text></View>
106
+                    <View>农机名称:<Text>{item.machineryName}</Text></View>
107
+                    <View>作业面积:<Text>{item.amount}</Text></View>
108
+                    <View>需求时间:<Text>{formatTimes(item.appointmentDate, 'yyyy-MM-dd hh:mm')}</Text></View>
109
+                    <View>下单时间:<Text>{formatTimes(item.createDate, 'yyyy-MM-dd hh:mm')}</Text></View>
110
+                    <View className='View-LiftTextBotton'>
111
+                      <View>订单状态:<Text style={{ color: orderStates(item.payStatus).styleColor }} >{orderStates(item.orderState).title}</Text></View>
112
+                      <View>费用:<Text className='feiyongStyle'>{item.charges}</Text></View>
113
+                    </View>
114
+                  </View>
115
+                </View>
116
+              )
117
+            })
109 118
 
119
+          }
120
+        </>
121
+          : <View>未登录,请先登陆</View>
110 122
       }
111 123
 
112 124
     </scroll-view>