Эх сурвалжийг харах

Merge branch 'dev2.8.5' of http://192.168.3.207:10080/qmx/jy into dev2.8.5

wangshan 5 жил өмнө
parent
commit
8d4c982fe7

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

@@ -47,9 +47,18 @@ function getAreaClassArr(area){
         provinceArr.push(i)
       }
     }
-    return [provinceArr,cityArr]
+    return [SortArr(provinceArr),SortArr(cityArr)]
 }
 
+//对数组进行排序(拼音)
+function SortArr(arr){
+	arr = arr.sort(function compareFunction(item1, item2) {
+	    return item1.localeCompare(item2);
+	});
+	return arr
+}
+
+
 /* vip订阅价格
 	area:地区 {}
 	industry:行业 []

+ 13 - 0
src/jfw/modules/app/src/web/templates/vipsubscribe/renew_pay.html

@@ -439,6 +439,19 @@
         })
         /* -------- 选择按年订阅  radio触发的事件------- */
         $('#yearly').on('change', function (e) {
+        	if((12+nowUpgrade)>36){
+            	var overtimeWarning = `最长订阅周期不可超过3年<br />当前订阅周期:${nowUpgrade}个月`
+		        weui.toast(overtimeWarning, {
+		            duration: 3000,
+		            className: 'custom-toast',
+		            callback: function() {
+		            }
+		        })
+		        $('#yearly').prop("checked", false);
+		        $('#monthly').prop("checked", true);
+		        $('#number_box_month').addClass('active')
+		        return
+            }
             $('.profit_tips').hide()
             // console.log($(this).is(':checked'))
             let isChecked = $(this).is(':checked')

+ 15 - 3
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_upgrade.html

@@ -448,9 +448,9 @@
 			nowDates = nowDates.split("/");
 			var nowMonths = Number(nowDates[1]);
 			var nowYears = Number(nowDates[0]);
-			var as = nowMonths +1
+			var as = nowMonths +1;
 			if(as > 12){
-				as = nowMonths-12;
+				as = as-12;
 				nowYears = nowYears +1;
 			}
 			var bs = nowYears+"/"+as+"/1";
@@ -528,7 +528,6 @@
                 // $('#time_cycle .tips.monthly_tips').hide();
 
                 $('#number_box_month').removeClass('active');
-                $('#number_box_year span:eq(0)').addClass('active');
             }else{
                 $('.computed_price').hide()
                 $('#number_box_month').removeClass('active');
@@ -669,6 +668,19 @@
         })
         /* -------- 选择按年订阅  radio触发的事件------- */
         $('#yearly').on('change', function (e) {
+        	if((12+nowRenew)>36){
+            	var overtimeWarning = `最长订阅周期不可超过3年<br />当前订阅周期:${nowRenew}个月`
+		        weui.toast(overtimeWarning, {
+		            duration: 3000,
+		            className: 'custom-toast',
+		            callback: function() {
+		            }
+		        })
+		        $('#yearly').prop("checked", false);
+		        $('#monthly').prop("checked", true);
+		        $('#number_box_month').addClass('active')
+		        return
+           	}
             $('.profit_tips').hide()
             // console.log($(this).is(':checked'))
             let isChecked = $(this).is(':checked')

+ 2 - 2
src/jfw/modules/pushsubscribe/src/match/job/matchjob.go

@@ -284,7 +284,7 @@ func (m *MatchJob) ToRelationProject(projectUser *sync.Map) {
 				})
 			}
 			if len(updateproject) == BigBulkSize {
-				mongodb.NewUpdateBulk(Pushspace_project, updateproject...)
+				mongodb.NewUpdateBulk(Pushspace_project, true, true, updateproject...)
 				updateproject = [][]map[string]interface{}{}
 			}
 		}(k, v)
@@ -296,7 +296,7 @@ func (m *MatchJob) ToRelationProject(projectUser *sync.Map) {
 	})
 	m.saveWaitGroup.Wait()
 	if len(updateproject) > 0 {
-		mongodb.NewUpdateBulk(Pushspace_project, updateproject...)
+		mongodb.NewUpdateBulk(Pushspace_project, true, true, updateproject...)
 		updateproject = [][]map[string]interface{}{}
 	}
 	logger.Info("关联项目结束。。。", index)

+ 10 - 1
src/web/staticres/vipsubscribe/js/common.js

@@ -47,9 +47,18 @@ function getAreaClassArr(area){
         provinceArr.push(i)
       }
     }
-    return [provinceArr,cityArr]
+    return [SortArr(provinceArr),SortArr(cityArr)]
 }
 
+//对数组进行排序(拼音)
+function SortArr(arr){
+	arr = arr.sort(function compareFunction(item1, item2) {
+	    return item1.localeCompare(item2);
+	});
+	return arr
+}
+
+
 /* vip订阅价格
 	area:地区 {}
 	industry:行业 []

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

@@ -475,7 +475,7 @@
             if (selected >= count) {
                 obj.parent().find(".city:not(.active)").attr("disabled", "disabled");
                 if (showtip) {
-                    this.showTip(`<p>当前省份只可选择${count}个城市<br/><span style="white-space: nowrap;">您只购买了${count}个城市,如需更多请升级<span></p>`)
+                    this.showTip(`<span style="white-space: nowrap;">您只购买了${count}个城市,如需更多请升级<span></p>`)
                 }
             } else {
                 obj.parent().find(".city:not(.active)").removeAttr("disabled", "disabled");

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

@@ -310,7 +310,7 @@
                         return
                       }
                       if(EditIndustry.reqData.buyset.buyerclasscount!=-1){ //购买不是全部行业 不能点击
-                        EditIndustry.showTip(`<p>只可选择${EditIndustry.reqData.buyset.buyerclasscount}个行业<br/><span style="white-space: nowrap;">您只购买了${EditIndustry.reqData.buyset.buyerclasscount}个行业,如需更多请升级<span></p>`);
+                        EditIndustry.showTip(`<span style="white-space: nowrap;">您只购买了${EditIndustry.reqData.buyset.buyerclasscount}个行业,如需更多请升级<span></p>`);
                         return
                       }
                       $('.select-area-box .list button').removeClass('active');
@@ -376,7 +376,7 @@
                   // 显示隐藏优惠tips
                   if (selectedArr.length >= EditIndustry.reqData.buyset.buyerclasscount&& EditIndustry.reqData.buyset.buyerclasscount!=-1) {
                     if(!isInit){
-                      EditIndustry.showTip(`<p>只可选择${EditIndustry.reqData.buyset.buyerclasscount}个行业<br/><span style="white-space: nowrap;">您只购买了${EditIndustry.reqData.buyset.buyerclasscount}个行业,如需更多请升级<span></p>`);
+                      EditIndustry.showTip(`<span style="white-space: nowrap;">您只购买了${EditIndustry.reqData.buyset.buyerclasscount}个行业,如需更多请升级<span></p>`);
                     }
                     $('.industry_item:not(.active)').attr('disabled','disabled');
                   } else {

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

@@ -478,7 +478,7 @@
             //是否还能继续选择
             if (EditProvince.selectedArr.length >= EditProvince.reqData.buyset.areacount) {
                 if (showTip) {
-                    this.showTip(`<p>当前省份只可选择${EditProvince.reqData.buyset.areacount}个省份<br/><span style="white-space: nowrap;">您只购买了${EditProvince.reqData.buyset.areacount}个省份,如需更多请升级<span></p>`);
+                    this.showTip(`<span style="white-space: nowrap;">您只购买了${EditProvince.reqData.buyset.areacount}个省份,如需更多请升级<span></p>`);
                 }
                 $(".province .checkbox:not(:checked)").attr('disabled', 'disabled');
             } else {

+ 19 - 2
src/web/templates/weixin/vipsubscribe/renew_pay.html

@@ -476,6 +476,19 @@
         })
         /* -------- 选择按年订阅  radio触发的事件------- */
         $('#yearly').on('change', function (e) {
+        	if((12+nowUpgrade)>36){
+            	var overtimeWarning = `最长订阅周期不可超过3年<br />当前订阅周期:${nowUpgrade}个月`
+		        weui.toast(overtimeWarning, {
+		            duration: 3000,
+		            className: 'custom-toast',
+		            callback: function() {
+		            }
+		        })
+		        $('#yearly').prop("checked", false);
+		        $('#monthly').prop("checked", true);
+		        $('#number_box_month').addClass('active')
+		        return
+            }
             $('.profit_tips').hide()
             // console.log($(this).is(':checked'))
             let isChecked = $(this).is(':checked')
@@ -541,8 +554,12 @@
         	}else{
         		$("#buy").attr("checked", true);
         		sessionStorage.buyChecks = true;
-        		if(sessionStorage.renew_cycleunit!==undefined&&sessionStorage.renew_cycleunit!==""){
-        			$(".save_renew").removeAttr("disabled");
+        		if(sessionStorage.renew_cycleunit!==undefined&&sessionStorage.renew_cycleunit!==""&&sessionStorage.renew_cyclecount!==""&&sessionStorage.renew_cyclecount!==undefined){
+        			let cycleunit = Number(sessionStorage.renew_cycleunit);
+        			let cyclecount = Number(sessionStorage.renew_cyclecount);
+ 	 	      		if(cycleunit>0&&cyclecount>0){
+ 	 	      			$(".save_renew").removeAttr("disabled");
+ 	 	      		}
         		}
         	}
         });

+ 15 - 3
src/web/templates/weixin/vipsubscribe/vip_upgrade.html

@@ -452,9 +452,9 @@
 			nowDates = nowDates.split("/");
 			var nowMonths = Number(nowDates[1]);
 			var nowYears = Number(nowDates[0]);
-			var as = nowMonths +1
+			var as = nowMonths +1;
 			if(as > 12){
-				as = nowMonths-12;
+				as = as-12;
 				nowYears = nowYears +1;
 			}
 			var bs = nowYears+"/"+as+"/1";
@@ -541,7 +541,6 @@
                 // $('#time_cycle .tips.monthly_tips').hide();
 
                 $('#number_box_month').removeClass('active');
-                $('#number_box_year span:eq(0)').addClass('active');
             }else{
                 $('.computed_price').hide()
                 $('#number_box_month').removeClass('active');
@@ -682,6 +681,19 @@
         })
         /* -------- 选择按年订阅  radio触发的事件------- */
         $('#yearly').on('change', function (e) {
+        	if((12+nowRenew)>36){
+            	var overtimeWarning = `最长订阅周期不可超过3年<br />当前订阅周期:${nowRenew}个月`
+		        weui.toast(overtimeWarning, {
+		            duration: 3000,
+		            className: 'custom-toast',
+		            callback: function() {
+		            }
+		        })
+		        $('#yearly').prop("checked", false);
+		        $('#monthly').prop("checked", true);
+		        $('#number_box_month').addClass('active')
+		        return
+           	}
             $('.profit_tips').hide()
             // console.log($(this).is(':checked'))
             let isChecked = $(this).is(':checked')