xuzhiheng 5 年之前
父节点
当前提交
94d89954d6

+ 3 - 1
src/web/staticres/vipsubscribe/js/updateArea.js

@@ -643,7 +643,9 @@ $(function () {
         //     province: 0,
         //     city: 0
         // }
-		sessionStorage.removeItem("vipAddCount");
+		// sessionStorage.removeItem("vipAddCount");
+		// sessionStorage.removeItem("vipSubSelectAreaAdd");
+		// sessionStorage.removeItem("vipSubSelectCity");
         // 数组置0,在重新从数据中计算初始状态结果并返回
         for (let i in alreadyBuy) {
             for(let ii in alreadyBuy[i]) {

+ 9 - 0
src/web/templates/weixin/vipsubscribe/renew_pay.html

@@ -806,6 +806,15 @@
 	    }
 	    //
 	    $(".save_renew").on("click", function(){
+			if(nowUpgrade>=36){
+				var overtimeWarning = `最长订阅周期不可超过3年<br />当前订阅周期:${nowUpgrade}个月`
+			    weui.toast(overtimeWarning, {
+			        duration: 3000,
+			        className: 'custom-toast',
+			        callback: function() {
+			        }
+			    })
+			}
 	        $(".save_renew").attr("disabled","disabled");
 	    	var param = {
 	    		"area": JSON.stringify(areas),

+ 22 - 4
src/web/templates/weixin/vipsubscribe/vip_upgrade.html

@@ -653,16 +653,17 @@
 			// 	$("#area").attr("placeholder", areaHtml);
 			// }
 	  //   }
-		if(sessionStorage.vipAddCount!==""&&sessionStorage.vipAddCount!==undefined&&sessionStorage.vipSubSelectCity!==undefined&&sessionStorage.vipSubSelectCity!==""){
+		if(sessionStorage.vipAddCount!==""&&sessionStorage.vipAddCount!==undefined&&sessionStorage.vipSubSelectCity!==undefined&&sessionStorage.vipSubSelectCity!==""&&sessionStorage.vipSubSelectAreaAdd!==undefined){
 			var vipSubSelectArea = JSON.parse(sessionStorage.vipAddCount);
+			var vipadd = JSON.parse(sessionStorage.vipSubSelectAreaAdd);
 			let cityLen = sessionStorage.vipSubSelectCity;
-			if(vipSubSelectArea.province === 0&&vipSubSelectArea.city === 0){
+			if(vipadd.country === -1){
 				areaHtml = "已新增全国";
 				$("#area").attr("placeholder", areaHtml);
 			}else{
 				areaHtml = "已新增 "+ vipSubSelectArea.province +" 个省级区域、"+ cityLen +" 个地市";
 				if(Number(vipSubSelectArea.province) === 0 && Number(cityLen) === 0){
-					areaHtml = "选择升级区域";
+					areaHtml = "选择升级区域";
 				}
 				$("#area").attr("placeholder", areaHtml);
 			}
@@ -1206,6 +1207,16 @@
         
         //
         $(".save_upgrade").on("click", function(){
+			if(nowRenew>=36){
+				var overtimeWarning = `最长订阅周期不可超过3年<br />当前订阅周期:${nowRenew}个月`
+			    weui.toast(overtimeWarning, {
+			        duration: 3000,
+			        className: 'custom-toast',
+			        callback: function() {
+			        }
+			    })
+			    return
+			}
         	$(".save_upgrade").attr("disabled","disabled");
         	//
         	// let areas = areasArr;
@@ -1427,7 +1438,14 @@
 				newbuyset.buyerclasscount = newbuyset.buyerclasscount + addindustrys.length;
 			}
 		}
-		console.log("233333",newbuyset)
+		for(let n in newbuyset.citys){
+			if(newbuyset.citys[n] > 2){
+				let cityarr = newbuyset.citys
+				delete cityarr[n]
+				newbuyset.areacount += 1
+			}
+		}
+		console.log(JSON.stringify(newbuyset))
 		return newbuyset
 	}