wangshan 4 年之前
父节点
当前提交
694c08d9a1

+ 3 - 6
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_order_detail.js

@@ -624,16 +624,10 @@ $(function () {
                     + '<div class="vp-type-text">' + typeName + '</div>'
                     + '</div>'
             }
-            var disHtml = ""
             var price = list[i].price
-            if (discount_price>0&&i==0){
-              disHtml =  '<span class="footer-label disCount">已优惠:¥'+(discount_price / 100)+'</span>'
-              price = price - discount_price
-            }
             returnHtml += '</div>'
                 + '</div>'
                 + '<div class="item-footer">'
-                + disHtml
                 + '<span class="footer-label">小计:</span>'
                 + '<span class="footer-content text-title">¥' + (price / 100) + '</span>'
                 + '</div>'
@@ -641,6 +635,9 @@ $(function () {
 
             total_price += (list[i].price);
         }
+        if (discount_price>0){
+          $(".disCount").text('已优惠:¥'+(discount_price / 100));
+        }
         $(".total-price").text("共计:¥" + money / 100);
         $(".list-content").html(returnHtml);
     }

+ 8 - 7
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_order_detail.html

@@ -26,13 +26,13 @@
     display: none;
   }
   .disCount{
-    border: 1px solid rgba(251,72,61,0.10);
-    border-radius: 12px;
-    padding: .02rem .05rem;
-    background: rgba(251,72,61,0.10);
-    color: #FB483D;
-    font-size: .1rem !important;
-    margin-right: .2rem;
+      border: 1px solid rgba(251,72,61,0.10);
+      border-radius: 12px;
+      padding: 0rem .15rem;
+      background: rgba(251,72,61,0.10);
+      color: #FB483D;
+      font-size: .1rem !important;
+      margin-right: -1.8rem
   }
 </style>
 <body style="visibility:hidden">
@@ -160,6 +160,7 @@
 			<div class="weui-half-screen-dialog__ft">
 				<div class="va-total-container">
 					<span class="total-label"></span>
+          <span class="disCount"></span>
 					<span class="total-price"></span>
 				</div>
 			</div>

+ 6 - 8
src/web/templates/weixin/vipsubscribe/vip_order_detail.html

@@ -55,11 +55,11 @@
     .disCount{
       border: 1px solid rgba(251,72,61,0.10);
       border-radius: 12px;
-      padding: .02rem .05rem;
+      padding: 0rem .15rem;
       background: rgba(251,72,61,0.10);
       color: #FB483D;
       font-size: .1rem !important;
-      margin-right: .2rem;
+      margin-right: -1.8rem
     }
 </style>
 <body style="visibility:hidden">
@@ -184,6 +184,7 @@
         <div class="weui-half-screen-dialog__ft">
             <div class="va-total-container">
                 <span class="total-label"></span>
+                <span class="disCount"></span>
                 <span class="total-price"></span>
             </div>
         </div>
@@ -827,16 +828,10 @@
                     + '<div class="vp-type-text">' + typeName + '</div>'
                     + '</div>'
             }
-            var disHtml = ""
             var price = list[i].price
-            if (discount_price>0&&i==0){
-              disHtml =  '<span class="footer-label disCount">已优惠:¥'+(discount_price / 100)+'</span>'
-              price = price - discount_price
-            }
             returnHtml += '</div>'
                 + '</div>'
                 + '<div class="item-footer">'
-                + disHtml
                 + '<span class="footer-label">小计:</span>'
                 + '<span class="footer-content text-title">¥' + (price / 100) + '</span>'
                 + '</div>'
@@ -844,6 +839,9 @@
 
             total_price += (list[i].price);
         }
+        if (discount_price>0){
+          $(".disCount").text('已优惠:¥'+(discount_price / 100));
+        }
         $(".total-price").text("共计:¥" + money / 100);
         $(".list-content").html(returnHtml);
     }