Browse Source

fix: 修复订单显示原价及单位问题

zhangyuhan 4 years ago
parent
commit
260bd0a9f0

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

@@ -28,7 +28,7 @@ $(function () {
                 $(".productType").text("超级订阅(试用)");
             }
             //价格
-            $(".price").text("¥ " + r.data.order.original_price / 100 + "元");
+            $(".price").text("¥ " + formatMoney(parseFloat(r.data.order.original_price) / 100) + "元");
             if (!r.data.order.isLiveActive) {
                 $(".origin-price-container").hide();
             } else {
@@ -52,7 +52,7 @@ $(function () {
                     giveTime = giveTime < 12 ? (giveTime + '个月') : ('1年')
                     $(".discount-container .highlight-text").text('赠送' + giveTime);
                     $(".discount-container").removeClass("hide");
-                    var originPrice = (filterObj.original_price / 100).toFixed(2);
+                    var originPrice = formatMoney(parseFloat(filterObj.original_price) / 100)
                     $(".price-num").text(originPrice);
                     $(".origin-price-container").show()
                     $(".bill-origin-price").css("display", "flex");

+ 7 - 2
src/jfw/modules/app/src/web/templates/commonPay/myOrder.html

@@ -1644,13 +1644,18 @@
                         + '<div class="media-info">'
                         + '<p class="item-ifo ellipsis">区域:' + region_vip + '</p>'
                         + '<p class="item-ifo ellipsis">行业:' + industry_vip + '</p>'
-                        + '<p class="item-ifo ellipsis">订阅周期:' + effectiveduration_vip + '</p>'
+                        + '<p class="item-ifo ellipsis">订阅周期:' + effectiveduration_vip
+                        + (can1111 ? ('&nbsp;+&nbsp;' + '<span style="color: #2ABED1;">赠送' + (giveCycle < 12 ? (giveCycle + '个月') : '1年') + '</span>')  : '')
+                        + '</p>'
                         + '<p class="item-ifo ellipsis">有效日期:' + effectivetime_vip + '</p>'
                         + '</div>'
                         + '</a>'
                     listhtml += '<div class="price">'
-                    if (isLiveActive) {
+                    if (can1111 || isLiveActive) {
                         var originPrice = formatMoney(parseFloat(orginsPrices) / 0.6);
+                        if (can1111) {
+                            originPrice = formatMoney(parseFloat(orginsPrices) / 100)
+                        }
                         listhtml += '<span class="origin-price-container">'
                             + '<span>原价:¥</span>'
                             + '<span class="origin-price">' + originPrice + '</span>'

+ 1 - 1
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_purchase.html

@@ -27,7 +27,7 @@
         }
     </style>
 </head>
-<body>
+<body  data-weui-theme="light">
 <div class="app-layout-header jy-app-header">
     <span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
     超级订阅

+ 1 - 1
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_renew.html

@@ -36,7 +36,7 @@
         }
     </style>
 </head>
-<body class="no-touch">
+<body class="no-touch"  data-weui-theme="light">
 <div class="app-layout-header jy-app-header">
     <span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
     超级订阅续费

+ 2 - 2
src/web/templates/weixin/vipsubscribe/vip_order_detail.html

@@ -201,7 +201,7 @@
                     $(".productType").text("超级订阅(试用)");
                 }
                 //价格
-                $(".price").text("¥ " + r.data.order.original_price / 100 + "元");
+                $(".price").text("¥ " + formatMoney(parseFloat(r.data.order.original_price) / 100) + "元");
 
                 //优惠码
                 if (r.data.order.isUsedActiveCode) {
@@ -219,7 +219,7 @@
                         giveTime = giveTime < 12 ? (giveTime + '个月') : ('1年')
                         $(".discount-container .highlight-text").text('赠送' + giveTime);
                         $(".discount-container").removeClass("hide");
-                        var originPrice = (filterObj.original_price / 100).toFixed(2);
+                        var originPrice = formatMoney(parseFloat(filterObj.original_price) / 100)
                         $(".price-num").text(originPrice);
                         $(".origin-price-container").show()
                         $(".bill-origin-price").css("display", "flex");

+ 1 - 1
src/web/templates/weixin/vipsubscribe/vip_purchase.html

@@ -14,7 +14,7 @@
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/css/wxbutton.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="/vipsubscribe/css/vip_purchase.css?v={{Msg "seo" "version"}}">
 </head>
-<body>
+<body  data-weui-theme="light">
 <div style="height: 100%;">
     {{if not .T.isLiveActive}}
     <div class="vip_purchase">

+ 1 - 1
src/web/templates/weixin/vipsubscribe/vip_renew.html

@@ -34,7 +34,7 @@
     </style>
 </head>
 
-<body class="no-touch">
+<body class="no-touch"  data-weui-theme="light">
 
 {{if not .T.isLiveActive}}
 <div class="vip-renew">