Bladeren bron

增加订单待评价

junyuanz 4 jaren geleden
bovenliggende
commit
e4399dbce3

+ 16 - 4
packageUser/pages/user/orders/orders.js

@@ -71,7 +71,7 @@ Page({
   tabUnpay: function () {
     if (this.data.type !== 'unpay') {
       this.setData({
-        tabLeft: '20%',
+        tabLeft: '16.6%',
         type: 'unpay',
         more: true,
         page: 1,
@@ -83,7 +83,7 @@ Page({
   tabProcessing: function () {
     if (this.data.type !== 'processing') {
       this.setData({
-        tabLeft: '40%',
+        tabLeft: '33.2%',
         type: 'processing',
         more: true,
         page: 1,
@@ -95,7 +95,7 @@ Page({
   tabDispatch: function () {
     if (this.data.type !== 'dispatch') {
       this.setData({
-        tabLeft: '60%',
+        tabLeft: '49.8%',
         type: 'dispatch',
         more: true,
         page: 1,
@@ -104,10 +104,22 @@ Page({
       this.getOrderList()
     }
   },
+  tabComment: function () {
+    if (this.data.type !== 'waitcommen') {
+      this.setData({
+        tabLeft: '66.4%',
+        type: 'waitcommen',
+        more: true,
+        page: 1,
+        tabChange: true
+      })
+      this.getOrderList()
+    }
+  },
   tabComplete: function () {
     if (this.data.type !== 'complete') {
       this.setData({
-        tabLeft: '80%',
+        tabLeft: '83%',
         type: 'complete',
         more: true,
         page: 1,

+ 1 - 0
packageUser/pages/user/orders/orders.wxml

@@ -4,6 +4,7 @@
     <view class="orders-tab" bindtap="tabUnpay">待支付</view>
     <view class="orders-tab" bindtap="tabProcessing">待发货</view>
     <view class="orders-tab" bindtap="tabDispatch">待收货</view>
+    <view class="orders-tab" bindtap="tabComment">待评价</view>
     <view class="orders-tab" bindtap="tabComplete">已完成</view>
     <view class="clean"></view>
     <view class="orders-tab__border" style="left: {{tabLeft}}"></view>

+ 6 - 6
packageUser/pages/user/orders/orders.wxss

@@ -9,23 +9,23 @@
   top: -1rpx;
   left: 0rpx;
   width: 100%;
-  height: 91rpx;
+  height: 81rpx;
   background-color: #fff;
   border-bottom: 1rpx solid #dddddd;
   z-index: 99999;
 }
 .orders-tab {
-  width: 20%;
-  height: 90rpx;
+  width: 16.6%;
+  height: 80rpx;
   float: left;
-  line-height: 90rpx;
+  line-height: 80rpx;
   text-align: center;
-  font-size: 28rpx;
+  font-size: 22rpx;
   color: #4c4c4c;
 }
 .orders-tab__border {
   position: absolute;
-  width: 20%;
+  width: 16.6%;
   height: 4rpx;
   bottom: 0;
   background-color: #eab86a;