瀏覽代碼

订单详情-折扣价格显示问题处理

DaMowang 2 年之前
父節點
當前提交
a6d1971861
共有 2 個文件被更改,包括 7 次插入6 次删除
  1. 4 4
      src/components/navigationCustom/navigation-custom.vue
  2. 3 2
      src/pagesB/directCharge/orderDetail.vue

+ 4 - 4
src/components/navigationCustom/navigation-custom.vue

@@ -1,8 +1,8 @@
 <template>
-	<view class="navigation-bar" :style="{height:height}">
-		<view class="navigation-bar-fixed" :style="{height:height,background:(!config.transparent&&!config.linear)?config.bgcolor:'transparent'}">
+	<view class="navigation-bar" :style="{'height':height}">
+		<view class="navigation-bar-fixed" :style="{'height':height,'background':(!config.transparent&&!config.linear)?config.bgcolor:'transparent'}">
 			<!-- capsule or normal -->
-			<view v-if="[1,2].indexOf(config.type)!= -1" :class="config.type==1?'navigation-bar-capsule':'navigation-bar-textbox'" :style="{top:marginTop}">
+			<view v-if="[1,2].includes(config.type)" :class="config.type==1?'navigation-bar-capsule':'navigation-bar-textbox'" :style="{'top':marginTop}">
 				<view class="button-action" hover-class="button-action-active" @click="back_">
 					<view class="iconfont" :style="'color:'+config.fontcolor">&#xe603;</view>
 				</view>
@@ -17,7 +17,7 @@
 				</view>
 			</view>
 			<!-- custom button -->
-			<view v-if="[3,4].indexOf(config.type)!= -1" @click="conduct_" :class="config.type == 3?'navigation-bar-custom-capsule':'navigation-bar-custom-textbox'" :style="{top:marginTop}">
+			<view v-if="[3,4].includes(config.type)" @click="conduct_" :class="config.type == 3?'navigation-bar-custom-capsule':'navigation-bar-custom-textbox'" :style="{'top':marginTop}">
 				<view class="iconfont" :style="'color:'+config.fontcolor">&#xe603;</view>
 				<text class="custom-describe">{{config.menuText}}</text>
 			</view>

+ 3 - 2
src/pagesB/directCharge/orderDetail.vue

@@ -30,7 +30,7 @@
                 <span>¥{{ order.order_amount || 0 }}</span>
             </div>
             <div class="li flex_r flex_jb">
-                <span>消费金抵扣<span class="corg">{{Integral}}%</span></span>
+                <span>消费金抵扣<span class="corg" v-if="!order.deduct_amount">{{Integral}}%</span></span>
                 <span class="corg">-¥{{ deduction || 0 }}</span>
             </div>
             <div class="li flex_r flex_jb">
@@ -95,7 +95,8 @@ export default {
                 if (res.code == 0) {
                     let i1 = res.data.integral;
                     this.Integral = this.$h.Mul(i1, 100);
-                    this.deduction = this.$h.Mul(this.order.order_amount, i1).toFixed(2);
+                    if(this.order.deduct_amount) this.deduction = this.order.deduct_amount
+                    else this.deduction = this.$h.Mul(this.order.order_amount, i1).toFixed(2);
                 }
             })
         },