Pārlūkot izejas kodu

修改订单详情中展示的数据

ylong 9 mēneši atpakaļ
vecāks
revīzija
39cec0b278

+ 5 - 5
pages-mine/components/detail-book-item.vue

@@ -12,9 +12,9 @@
 
                     <view class="flex flex-j-b flex-a-c mt-20" v-if="!isReturn">
                         <view class="book-price">预估价: ¥{{ book.expectMoney }}</view>
-
-                        <view class="has-upsell" v-if="book.upsellExpectMoney">
-                            已加价 {{ book.upsellExpectMoney }} 元
+                        
+                        <view class="has-upsell" v-if="book.upsellFinalMoney">
+                            已加价 {{ book.upsellFinalMoney }} 元
                             <image
                                 src="/static/img/activity/up3.png"
                                 mode="aspectFill"
@@ -22,8 +22,8 @@
                             />
                         </view>
 
-                        <view class="has-upsell" v-if="book.currUpsellMoney">
-                            已加价 {{ book.currUpsellMoney }} 元
+                        <view class="has-upsell" v-if="!book.upsellFinalMoney && book.upsellExpectMoney">
+                            已加价 {{ book.upsellExpectMoney }} 元
                             <image
                                 src="/static/img/activity/up3.png"
                                 mode="aspectFill"

+ 2 - 2
pages-mine/pages/order-detail.vue

@@ -22,9 +22,9 @@
                     <text class="common-text font-26">{{ orderInfo.totalNum }}</text>
                 </view>
                 
-                <view class="flex-a flex-j-b" v-if="orderInfo.upsellExpectMoney">
+                <view class="flex-a flex-j-b" v-if="orderInfo.upsellFinalMoney || orderInfo.upsellExpectMoney">
                     <text class="common-text-2 font-26">已加价金额:</text>
-                    <text class="common-text-2 font-26">¥{{ orderInfo.upsellExpectMoney }}</text>
+                    <text class="common-text-2 font-26">¥{{ orderInfo.upsellFinalMoney || orderInfo.upsellExpectMoney }}</text>
                 </view>
                 <view class="flex-a flex-j-b">
                     <view class="common-text-2 font-26">

+ 49 - 43
pages/home/components/BookItem.vue

@@ -48,6 +48,38 @@
             </view>
           </view>
 
+          <view class="countdown-wrap" v-if="book.restTime > 0">
+            <text>加价即将结束</text>
+            <u-count-down
+              :timestamp="book.restTime"
+              format="HH:mm:ss"
+              autoStart
+              color="#db0702"
+              font-size="24"
+              separator-color="#db0702"
+              separator-size="24"
+              @finish="onCountdownFinish"
+            ></u-count-down>
+          </view>
+        </view>
+
+        <view class="flex flex-j-b" style="align-items: center">
+          <view class="price-action">
+            <view class="book-price"
+              >回收价
+              <text style="font-weight: 600; color: #db0702; margin-left: 8rpx">
+                ¥{{ recycleMoney }}</text
+              ></view
+            >
+            <button
+              class="up-price-btn"
+              @tap="handleUpsell"
+              v-if="book.canInvite === 1"
+            >
+              去加价
+            </button>
+          </view>
+
           <u-number-box
             class="number-box"
             bg-color="#38c148"
@@ -61,37 +93,6 @@
             :disabled="book.status != 1"
           ></u-number-box>
         </view>
-
-        <view class="flex flex-a-c" style="align-items: center">
-          <view class="book-price"
-            >回收价
-            <text style="font-weight: 600; color: #db0702; margin-left: 8rpx">
-              ¥{{ recycleMoney }}</text
-            ></view
-          >
-          <view class="price-action" style="margin-left: 10rpx">
-            <button
-              class="up-price-btn"
-              @tap="handleUpsell"
-              v-if="book.canInvite === 1"
-            >
-              去加价
-            </button>
-            <view class="countdown-wrap" v-if="book.restTime > 0">
-              <text>加价即将结束</text>
-              <u-count-down
-                :timestamp="book.restTime"
-                format="HH:mm:ss"
-                autoStart
-                color="#db0702"
-                font-size="24"
-                separator-color="#db0702"
-                separator-size="24"
-                @finish="onCountdownFinish"
-              ></u-count-down>
-            </view>
-          </view>
-        </view>
       </view>
       <view class="delete-btn" @tap="onDelete">
         <u-icon name="close" size="26" color="#999"></u-icon>
@@ -99,7 +100,11 @@
     </view>
 
     <common-dialog ref="deleteDialog" title="温馨提示" @confirm="confirmDelete">
-      <text>{{ book.upsellMoney ? "此书为限时加价收图书,删除后再次添加将失去加价收资格,确定删除吗?" : "确定删除这本图书吗?" }}</text>
+      <text>{{
+        book.upsellMoney
+          ? "此书为限时加价收图书,删除后再次添加将失去加价收资格,确定删除吗?"
+          : "确定删除这本图书吗?"
+      }}</text>
     </common-dialog>
   </view>
 </template>
@@ -128,7 +133,7 @@ export default {
     onDelete() {
       this.$emit("delete", this.book);
 
-    //   this.$refs.deleteDialog.openPopup();
+      //   this.$refs.deleteDialog.openPopup();
     },
     confirmDelete() {
       this.$emit("delete", this.book);
@@ -298,18 +303,19 @@ export default {
           line-height: 48rpx;
           padding: 0 10rpx;
           border-radius: 24rpx;
+          margin-left: 10rpx;
         }
+      }
+    }
 
-        .countdown-wrap {
-          display: flex;
-          align-items: center;
-          font-size: 24rpx !important;
-          color: #db0702;
-          margin-left: 6rpx;
-          text {
-            margin-right: 6rpx;
-          }
-        }
+    .countdown-wrap {
+      display: flex;
+      align-items: center;
+      font-size: 24rpx !important;
+      color: #db0702;
+      margin-left: 6rpx;
+      text {
+        margin-right: 6rpx;
       }
     }