Prechádzať zdrojové kódy

feat(page):历史订单页按照UI初稿修改

Zhenghanjv 3 mesiacov pred
rodič
commit
b7cbb612d5

BIN
images/date.png


+ 9 - 97
pages/historyOrder/historyOrder.js

@@ -12,106 +12,18 @@ Page({
     endDate:'',
     orders:[
       {
-        buttonMessage1:'',
-        buttonColor1:'',
-        buttonMessage2:'',
-        buttonColor2:'',
         order:{
+          nozzle:5,
+          status:'已授权',
+          statusColor:'#bbe06e',
           oilName:"92#",
-          nozzleNum:'5',
-          volume:'20.0',
-          amount:'46.8',
-          date:'2024-11-24',
-          time:'09:08',
-          status:'已授权'
+          volume:20.0,
+          amount:46.8,
+          payAmount:46.8,
+          discount:0.00,
+          time:'2024-11-24 09:08',
         },
-        statusColor:'#838282',
-        countdown:'60'
-      },
-      {
-        buttonMessage1:'取消订单',
-        buttonColor1:'#838282',
-        buttonMessage2:'重新授权',
-        buttonColor2:'#d17067',
-        order:{
-          oilName:"0#",
-          nozzleNum:'6',
-          volume:'21.0',
-          amount:'42.8',
-          date:'2024-11-24',
-          time:'09:08',
-          status:'已失效'
-        },
-        statusColor:'#838282',
-        countdown:''
-      },
-      {
-        buttonMessage1:'',
-        buttonColor1:'',
-        buttonMessage2:'重新支付',
-        buttonColor2:'#d17067',
-        order:{
-          oilName:"0#",
-          nozzleNum:'6',
-          volume:'21.0',
-          amount:'42.8',
-          date:'2024-11-24',
-          time:'09:08',
-          status:'支付失败'
-        },
-        statusColor:'#d17067',
-        countdown:''
-      },
-      {
-        buttonMessage1:'',
-        buttonColor1:'',
-        buttonMessage2:'重新支付',
-        buttonColor2:'#d17067',
-        order:{
-          oilName:"0#",
-          nozzleNum:'6',
-          volume:'21.0',
-          amount:'42.8',
-          date:'2024-11-24',
-          time:'09:08',
-          status:'支付失败'
-        },
-        statusColor:'#d17067',
-        countdown:''
-      },
-      {
-        buttonMessage1:'',
-        buttonColor1:'',
-        buttonMessage2:'重新支付',
-        buttonColor2:'#d17067',
-        order:{
-          oilName:"0#",
-          nozzleNum:'6',
-          volume:'21.0',
-          amount:'42.8',
-          date:'2024-11-24',
-          time:'09:08',
-          status:'支付失败'
-        },
-        statusColor:'#d17067',
-        countdown:''
-      },
-      {
-        buttonMessage1:'',
-        buttonColor1:'',
-        buttonMessage2:'重新支付',
-        buttonColor2:'#d17067',
-        order:{
-          oilName:"0#",
-          nozzleNum:'6',
-          volume:'21.0',
-          amount:'42.8',
-          date:'2024-11-24',
-          time:'09:08',
-          status:'支付失败'
-        },
-        statusColor:'#d17067',
-        countdown:''
+        bottonText2:'请尽快提枪'
       },
     ]
   },

+ 1 - 1
pages/historyOrder/historyOrder.json

@@ -1,5 +1,5 @@
 {
   "usingComponents": {
-    "orderItem":"../../components/orderItem/orderItem"
+    "orderItem":"../../components/orderItemInfo/orderItemInfo"
   }
 }

+ 6 - 7
pages/historyOrder/historyOrder.wxml

@@ -3,7 +3,11 @@
 
   <!-- 日期选择器 -->
   <view class="dataSelect">
-    <text>日期选择</text>
+    <view class="dateTip">
+      <image src="../../images/date.png" mode="aspectFill" />
+      <text>日期跳转</text>
+    </view>
+    
     <picker mode="date" value="{{date}}" bindchange="bindDateChange">
       <text>{{date}} ></text>
     </picker>
@@ -14,12 +18,7 @@
     <view class="orderItem" wx:for="{{orders}}">
       <orderItem 
       order="{{item.order}}"
-      statusColor="{{item.statusColor}}"
-      buttonMessage1="{{item.buttonMessage1}}"
-      buttonColor1="{{item.buttonColor1}}"
-      buttonMessage2="{{item.buttonMessage2}}"
-      buttonColor2="{{item.buttonColor2}}"
-      countdown="{{item.countdown}}"
+      bottonText2="{{item.bottonText2}}"
       bind:bottonEvent1="onOrderButtonClick1"
       bind:bottonEvent2="onOrderButtonClick2" />
     </view>

+ 11 - 0
pages/historyOrder/historyOrder.wxss

@@ -8,11 +8,22 @@
   display: flex;
   flex-direction: row;
   justify-content: space-between;
+  align-items: center;
   width: 90%;
   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
   padding: 2% 3%;
   border-radius: 3%;
 }
+.dateTip{
+  display: flex;
+  align-items: center;
+  width: 50%;
+}
+.dataSelect image{
+  width: 50rpx;
+  height: 50rpx;
+  margin-right: 5%;
+}
 
 .order{
   display: flex;