panhui 4 年之前
父節點
當前提交
b3cc910a25
共有 2 個文件被更改,包括 12 次插入15 次删除
  1. 11 14
      src/components/order/OrderInfoAuction.vue
  2. 1 1
      src/views/auction/Detail.vue

+ 11 - 14
src/components/order/OrderInfoAuction.vue

@@ -87,20 +87,23 @@ export default {
                 return [...this.info.material].slice(0, 2);
             }
         },
+        isLeader() {
+            return this.isLogin && this.info.actPurchasedId === this.userInfo.id;
+        },
+        isbidder() {
+            return this.info.auctionStatus == 'PURCHASED' && this.info.actPurchasedId === this.userInfo.id;
+        },
         status() {
-            let status = this.getLabelName(this.info.status || this.info.orderStatus, this.orderStatusOptions);
+            let status = this.getLabelName(this.info.orderStatus || this.info.orderStatus, this.orderStatusOptions);
             if (!status) {
                 if (this.isbidder) {
                     status = '竞价成功,去支付';
-                } else if (
-                    this.info.auctionStatus === 'ONGOING' &&
-                    (this.info.purchaserId === this.userInfo.id || !this.info.purchaserId)
-                ) {
+                } else if (this.info.auctionStatus === 'PASS') {
+                    status = '已流局';
+                } else if (this.info.auctionStatus === 'ONGOING' && this.isLeader) {
                     status = '竞价中';
-                } else if (this.info.purchaserId) {
+                } else if (this.info.auctionStatus === 'ONGOING' && !this.isLeader) {
                     status = '已出局,重新叫价';
-                } else if (this.isPass) {
-                    status = '已流局';
                 } else {
                     status = '已结束';
                 }
@@ -178,12 +181,6 @@ export default {
             }
             return '#939599';
         },
-        isLeader() {
-            return this.isLogin && this.info.purchaserId === this.userInfo.id;
-        },
-        isbidder() {
-            return this.isLeader && this.info.auctionStatus === 'PURCHASED';
-        },
         type() {
             return this.info.paymentType || this.info.type;
         }

+ 1 - 1
src/views/auction/Detail.vue

@@ -375,7 +375,7 @@ export default {
                             this.changeTab('#0f0f0f');
                         }
                         if (this.isbidder) {
-                            this.$http.get('/sysConfig/get/auction_pass_time').then(res => {
+                            this.$http.get('/sysConfig/get/auction_cancel_time').then(res => {
                                 let date1 = this.dayjs(this.info.endTime).add(Number(res.value), 'hour');
                                 let date2 = this.dayjs();
                                 let time = date1.diff(date2);