Bladeren bron

fix: 修复微信升级显示负数

yangfeng 4 jaren geleden
bovenliggende
commit
90a8947c98

+ 3 - 1
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_upgrade.js

@@ -248,7 +248,7 @@ var purchase = {
     }
     this.flushSelectTime(times, flag === undefined ? 1 : flag);
     
-    coupon.updatePrice(price < 0 ? 0 : price)
+    coupon.updatePrice(Number(price) < 0 ? 0 : price)
   },
   flushSelectTime (thisValue, flag) {
     if (this.endTime) {
@@ -310,6 +310,8 @@ var purchase = {
       coupon.$refs.couponRef.submitStatus = false
       if (!$('.error-update-tips').is(':hidden')) {
         coupon.$refs.couponRef.submitStatus = true
+      } else {
+        coupon.$refs.couponRef.submitStatus = false
       }
     } else {
       $('.vip-footer.renew .confirm').prop('disabled', true)

+ 1 - 1
src/web/staticres/vipsubscribe/js/vip_upgrade.js

@@ -255,7 +255,7 @@ var purchase = {
       $('.now-price .dis-price').text(formatMoney(price));
     }
     this.flushSelectTime(times, flag === undefined ? 1 : flag);
-    coupon.updatePrice(price)
+    coupon.updatePrice(Number(price) < 0 ? 0 : price)
   },
   flushSelectTime(thisValue, flag) {
     if (this.endTime) {