Bladeren bron

提交vip首页仅续费

wangkaiyue 5 jaren geleden
bovenliggende
commit
fe25804754

+ 4 - 3
src/web/staticres/vipsubscribe/js/UpgradePrice.js

@@ -200,10 +200,11 @@ function getUpgradeFinalStatus(newBuyset, oldBuyset, t, endUnix, renewList) {
     var Upgrade = Upgradestatus[0];
     console.log("Upgrade", Upgrade, Upgradestatus);
     if (Upgrade === -1) {
-        if (t.length == 0) {
+        if (t.length === 0) {
             return [-1, false, false]   //订阅修改
         }
-        return getsubVipOrderPriceBybuyset(oldBuyset, t)//续费
+        var renewPrice = getsubVipOrderPriceBybuyset(oldBuyset, t)//续费
+        return [renewPrice, false, false]
     }
     var final_price = 0;
     var nowEndTime = endUnix;
@@ -230,7 +231,7 @@ function getUpgradeFinalStatus(newBuyset, oldBuyset, t, endUnix, renewList) {
     final_price += now_price;
     //新增续费升级价格
     if (t.length != 0) {
-        var this_price = getsubVipOrderPriceBybuyset(Upgrade, t);
+        var this_price = getsubVipOrderPriceBybuyset(oldBuyset, t);
         if (this_price < 0) {
             return [-2, false, false]
         }

+ 5 - 1
src/web/staticres/vipsubscribe/js/vip_index_new.js

@@ -562,6 +562,11 @@ $(function () {
         if (status[2]) {
             $(".body-item.industry .tip-need-upgrade").show()
         }
+
+        if (!status[1] && !status[2]) {
+            $(".vip-footer.upgrade .confirm").text("立即续费");
+        }
+
         $('.vip-footer .button-l.reset').on("click", function () {
             cancelTip(2);
         })
@@ -578,7 +583,6 @@ $(function () {
     })
 
 
-
     //保存 or 升级
     function doSubmit() {
         $DoPost('/subscribepay/vipsubscribe/saveChange', {