Selaa lähdekoodia

fix: 修复订阅升级订单提交参数

yangfeng 4 vuotta sitten
vanhempi
commit
c7982a8f98

+ 1 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/common.js

@@ -123,6 +123,7 @@ function getBuySet (area, industry, price) {
     "citys": [] //购买省份中城市数量
   };
   //行业
+  console.log(industry,price.buyerClassMaxCount, 'industry')
   if (industry.length != 0 && industry.length <= price.buyerClassMaxCount) {
     buyset.buyerclasscount = industry.length
   }

+ 4 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_index_new.js

@@ -289,6 +289,7 @@ $(function () {
       }
 
       // 设置已选择行业
+      console.log(selected, 'selected')
       if (selected.buyerclasscount === -1) {
           $('.vip-body .industry .selected-industry').text('全行业')
       } else {
@@ -322,6 +323,7 @@ $(function () {
       }
 
       // 设置已选择行业
+      console.log(buySet, 'buySet')
       if (buySet.buyerclasscount === -1) {
           $('.vip-body .industry .buy-set-industry').text('全行业')
       } else {
@@ -784,9 +786,11 @@ $(function () {
   var selectTime = "";
 
   function init(state) {
+    console.log(state, 'state')
       checkmerge(state.industry, state.isread)
       // init 已选择的区域和行业
       var selectedAreaAndInd = getBuySet(state.area, state.industry);
+      console.log(selectedAreaAndInd, 'selectedAreaAndInd')
       setSelectedAreaAndInd(selectedAreaAndInd);
       // 初始化,已购买的城市和行业
       setBuyAreaAndInd(state.buyset);

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

@@ -520,7 +520,8 @@ $(function () {
       "userLotteryId": coupon.$refs.couponRef.coupon.userLotteryId,
       "lotteryId": coupon.$refs.couponRef.coupon.lotteryId,
       "area": JSON.stringify(area),
-      "industry": industry.join(","),
+      // "industry": industry.join(","),
+      'price': Number($('.computed_price').html()),
       "time": purchase.timeValue.trim(),
       "orderType": 5,
       "disWord": GetQueryString("disWord"),

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

@@ -658,11 +658,11 @@
               var areaStorage = sessionStorage.getItem('vipSubSelectArea');
               var industryStorage = sessionStorage.getItem('vipSubSelectIndustry');
               var readStorage = sessionStorage.getItem('vipSub_read') == 'true' ? true : false;
-              console.log(areaStorage, industryStorage, readStorage)
+              // console.log(areaStorage, industryStorage, readStorage)
               if(readStorage) {
                 this.checkboxStatus = true
               }
-              if (areaStorage && industryStorage && readStorage && OrderPhoneCheck.status) {
+              if (areaStorage && readStorage && OrderPhoneCheck.status) {
                 this.$refs.couponRef.submitStatus = false
               } else {
                 this.$refs.couponRef.submitStatus = true
@@ -677,9 +677,9 @@
             checkSubmitStatus: function (checkStatus) {
               $('#buy').prop('checked', checkStatus)
               var areaStorage = sessionStorage.getItem('vipSubSelectArea');
-              var industryStorage = sessionStorage.getItem('vipSubSelectIndustry');
+              // var industryStorage = sessionStorage.getItem('vipSubSelectIndustry');
               var readStorage = sessionStorage.getItem('vipSub_read');
-              return areaStorage && industryStorage && readStorage && OrderPhoneCheck.status
+              return areaStorage && readStorage && OrderPhoneCheck.status
             },
             // 阅读协议点击事件
             readEvent: function () {
@@ -1218,7 +1218,7 @@
           var area = $(".info:eq(0)").val().trim();
           var industry = $(".info:eq(1)").val().trim();
           var checked = $('#buy').prop('checked');
-          if (area != '' && industry != '' && checked == true && OrderPhoneCheck.status) {
+          if (area != '' && checked == true && OrderPhoneCheck.status) {
             $("#payHandle").removeAttr('disabled');
           } else {
             $("#payHandle").attr({

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

@@ -524,7 +524,8 @@ $(function () {
       "userLotteryId":coupon.$refs.couponRef.coupon.userLotteryId,
       "lotteryId": coupon.$refs.couponRef.coupon.lotteryId,
       "area": JSON.stringify(area),
-      "industry": industry.join(","),
+      // "industry": industry.join(","),
+      'price': Number($('.computed_price').html()),
       "time": purchase.timeValue.trim(),
       "orderType": 5,
       "activeCode": activeCodes,

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

@@ -94,7 +94,7 @@
                         <a href="/front/vipsubscribe/toChooseArea">
                             <span class="label">省份数量</span>
                             {{if not .T.isTrial }}
-                                <input type="text" disabled value="" placeholder="1个"
+                                <input type="text" disabled value="" placeholder="1个"
                                        class="info choose_area">
                             {{else}}
                                 <input type="text" disabled value="" placeholder="选择全国、省份、地市" class="info choose_area">
@@ -650,7 +650,7 @@
                   if(readStorage) {
                     this.checkboxStatus = true
                   }
-                  if (areaStorage && industryStorage && readStorage && OrderPhoneCheck.status) {
+                  if (areaStorage && readStorage && OrderPhoneCheck.status) {
                     this.$refs.couponRef.submitStatus = false
                   } else {
                     this.$refs.couponRef.submitStatus = true
@@ -664,9 +664,9 @@
                 checkSubmitStatus: function (checkStatus) {
                   $('#buy').prop('checked', checkStatus)
                   var areaStorage = sessionStorage.getItem('vipSubSelectArea');
-                  var industryStorage = sessionStorage.getItem('vipSubSelectIndustry');
+                  // var industryStorage = sessionStorage.getItem('vipSubSelectIndustry');
                   var readStorage = sessionStorage.getItem('vipSub_read');
-                  return areaStorage && industryStorage && readStorage && OrderPhoneCheck.status
+                  return areaStorage && readStorage && OrderPhoneCheck.status
                 },
                 // 阅读协议点击事件
                 readEvent: function () {
@@ -1121,7 +1121,7 @@
                         "userLotteryId":coupon.$refs.couponRef.coupon.userLotteryId,
                         "lotteryId": coupon.$refs.couponRef.coupon.lotteryId,
                         "area": JSON.stringify(area),
-                        "industry": industry.join(","),
+                        // "industry": industry.join(","),
                         "time": $(".info:eq(2)").val().trim(),
                         "orderType":{{.T.orderType}},
                         "activeCode": activeCodes,
@@ -1145,7 +1145,7 @@
                     //试用用户
                     $DoPost("/subscribepay/order/trialPay", {
                         "area": JSON.stringify(area),
-                        "industry": industry.join(","),
+                        // "industry": industry.join(","),
                         "order_phone": OrderPhoneCheck.phone
                     }, function (r) {
                         if (r.success) {
@@ -1171,9 +1171,9 @@
             //是否可点击
             function checkOk() {
                 var area = $(".info:eq(0)").val().trim();
-                var industry = $(".info:eq(1)").val().trim();
+                // var industry = $(".info:eq(1)").val().trim();
                 var checked = $('#buy').prop('checked');
-                if (area != '' && industry != '' && checked == true && OrderPhoneCheck.status) {
+                if (area != '' && checked == true && OrderPhoneCheck.status) {
                     $("#payHandle").removeAttr('disabled');
                 } else {
                     $("#payHandle").attr({
@@ -1184,9 +1184,9 @@
                     if (area === '') {
                         $(".area_warn").css("display", "block");
                     }
-                    if (industry === "") {
-                        $(".industry_warn").css("display", "block");
-                    }
+                    // if (industry === "") {
+                    //     $(".industry_warn").css("display", "block");
+                    // }
                 }
                 // else {
                 //     $(".area_warn").css("display", "");