ソースを参照

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

wangkaiyue 5 年 前
コミット
9fbe70c0b7

+ 24 - 17
src/jfw/modules/app/src/web/templates/vipsubscribe/renew_notice.html

@@ -47,8 +47,8 @@
                 </div>
             </div>
 			<div class="renew_box">
-                <button class="renew_service" onclick="window.location.href='/jyapp/vipsubscribe/renewPayPage'">续费</button>
-                <button class="free_service" onclick="window.location.href='/jyapp/swordfish/historypush'">使用免费订阅</button>
+                <button style="display: none;" class="renew_service" onclick="window.location.href='/jyapp/vipsubscribe/renewPayPage'">续费</button>
+                <button style="display: none;" class="free_service" onclick="window.location.href='/jyapp/swordfish/historypush'">使用免费订阅</button>
             </div>
 		</div>
 		<script src="/jyapp/vipsubscribe/js/jquery-2.1.4.js"></script>
@@ -63,7 +63,7 @@
 //			console.log("orderId",orderId)
 //			console.log("starts",starts)
 //			console.log("ends",ends)
-			var nowTime = new Date().getTime()/1000;
+			var nowTime = new Date().getTime();
 			if(orderId !== "" && orderId !== undefined){
 				$DoPost("/subscribepay/renewUpgrade/getExprie", {"orderId":orderId}, function (r) {
 					if(r){
@@ -75,6 +75,7 @@
 					    var areaHtml = "";
 					    var buyerclassArr = [];
 					    var buyerclassHtml = "";
+					    var endstime = new Date(ends).getTime();
 						if (area !== "" && area !== undefined){
 					    	for(var province in area){
 					    		var citys = area[province]
@@ -110,17 +111,22 @@
 					    	let dateHtml = start + " - " + end;
 					    	$(".date-span").text(dateHtml);
 					    }
+					    if(vipStatus === 2&&nowTime>endstime){
+							return   
+					    }
 					    if(exprie === "will"){
-					    	$(".free_service").hide();
-					    	$("#exprie").text("VIP订阅服务即将到期,请及时续费")
-					    	$(".recommend_title").text("以下区域、行业的订阅推送即将停止,为了不影响您的使用,请立即续费!")
+					    	let a = (endstime/1000) - (86400 * 3);
+					    	let b = nowTime/1000;
+					    	let c = endstime/1000;
+					    	if(a < b&&b < c){
+					    		$(".renew_service").show();
+						    	$("#exprie").text("VIP订阅服务即将到期,请及时续费")
+						    	$(".recommend_title").text("以下区域、行业的订阅推送即将停止,为了不影响您的使用,请立即续费!")
+					    	}
 					    }else{
+					    	$(".renew_service").show();
 					    	$(".free_service").show();
 					    }
-					    if(vipStatus === 2&&nowTime > ends){
-					    	$(".free_service").hide();
-					    	$(".renew_service").hide();
-					    }
 					}
 				});
 			}else{
@@ -183,16 +189,17 @@
 					    	$(".date-span").text(dateHtml);
 					    }
 					    if(exprie === "will"){
-					    	$(".free_service").hide();
-					    	$("#exprie").text("VIP订阅服务即将到期,请及时续费")
-					    	$(".recommend_title").text("以下区域、行业的订阅推送即将停止,为了不影响您的使用,请立即续费!")
+					    	let a = (endstime/1000) - (86400 * 3)
+					    	let b = nowTime/1000
+					    	if(b > a){
+					    		$(".renew_service").show();
+						    	$("#exprie").text("VIP订阅服务即将到期,请及时续费")
+						    	$(".recommend_title").text("以下区域、行业的订阅推送即将停止,为了不影响您的使用,请立即续费!")
+					    	}
 					    }else{
+					    	$(".renew_service").show();
 					    	$(".free_service").show();
 					    }
-					    if(vipStatus === 2){
-					    	$(".free_service").hide();
-					    	$(".renew_service").hide();
-					    }
 					}
 				});	
 			}

+ 1 - 1
src/jfw/modules/pushent/src/followpush/push.go

@@ -296,7 +296,7 @@ func push(fid, sname, userId string, res *[]map[string]interface{}) {
 				}
 				setMap["a_relationinfo"] = relationinfoTemp
 			} else { //追加
-				(*updateMap)["$pushAll"] = bson.M{"a_relationinfo": pushArray}
+				(*updateMap)["$push"] = bson.M{"a_relationinfo": bson.M{"$each": pushArray}}
 			}
 			updateFlag = tools.MQFW.UpdateById(FOLLOW_COLLECTION, fid, updateMap)
 		}

+ 1 - 1
src/jfw/modules/pushproject/src/followpush/push.go

@@ -394,7 +394,7 @@ func push(fid interface{}, sname, scode, title, userId string, res *[]map[string
 						}
 						setMap["a_relationinfo"] = relationinfoTemp
 					} else { //追加
-						(*updateMap)["$pushAll"] = bson.M{"a_relationinfo": pushArray}
+						(*updateMap)["$push"] = bson.M{"a_relationinfo": bson.M{"$each": pushArray}}
 					}
 					updateFlag = tools.MQFW.Update(FOLLOW_COLLECTION, &bson.M{"_id": fid}, updateMap, false, false)
 				}

+ 4 - 4
src/jfw/modules/pushsubscribe/src/push/job/movejob.go

@@ -2,7 +2,6 @@
 package job
 
 import (
-	"log"
 	. "public"
 	. "push/config"
 	putil "push/util"
@@ -172,7 +171,6 @@ func (m *MoveJob) merge(number *int, nowUnix int64, moveUsers map[string]*MoveUs
 					newList = append(newList, vv)
 				}
 				pLength := len(newList)
-				log.Println(pLength)
 				if pLength == 0 {
 					invalidArray_delete = append(invalidArray_delete, moveUser.ids...)
 					if len(invalidArray_delete) == BigBulkSize {
@@ -193,8 +191,10 @@ func (m *MoveJob) merge(number *int, nowUnix int64, moveUsers map[string]*MoveUs
 					setMap["size"] = maxPushSize
 				} else { //追加
 					setMap["size"] = rLength + pLength
-					upSet["$pushAll"] = map[string]interface{}{
-						"list": newList,
+					upSet["$push"] = map[string]interface{}{
+						"list": map[string]interface{}{
+							"$each": newList,
+						},
 					}
 				}
 				upSet["$set"] = setMap

+ 4 - 2
src/jfw/modules/pushsubscribe/src/push/pusher/normalpush.go

@@ -182,8 +182,10 @@ func (n *NormalPush) vipTempSave(u *UserInfo, pushParam *putil.PushParam) {
 				}
 				set["list"] = oldList
 			} else { //追加
-				upSet["$pushAll"] = map[string]interface{}{
-					"list": pushParam.Infos,
+				upSet["$push"] = map[string]interface{}{
+					"list": map[string]interface{}{
+						"$each": pushParam.Infos,
+					},
 				}
 			}
 		}

+ 19 - 19
src/web/templates/weixin/vipsubscribe/renew_notice.html

@@ -50,8 +50,8 @@
                 </div>
             </div>
 			<div class="renew_box">
-                <button class="renew_service" onclick="window.location.href='/weixin/pay/renewPayPage'">续费</button>
-                <button class="free_service" onclick="window.location.href='/swordfish/historypush'">使用免费订阅</button>
+                <button style="display: none;" class="renew_service" onclick="window.location.href='/weixin/pay/renewPayPage'">续费</button>
+                <button style="display: none;" class="free_service" onclick="window.location.href='/swordfish/historypush'">使用免费订阅</button>
             </div>
 		</div>
 		<script src="/vipsubscribe/js/jquery-2.1.4.js"></script>
@@ -114,23 +114,22 @@
 					    	let dateHtml = start + " - " + end;
 					    	$(".date-span").text(dateHtml);
 					    }
+					    if(vipStatus === 2&&nowTime>endstime){
+							return   
+					    }
 					    if(exprie === "will"){
-					    	let a = (endstime/1000) - (86400 * 3)
-					    	let b = nowTime/1000
-					    	if(b > a){
-					    		$(".free_service").hide();
+					    	let a = (endstime/1000) - (86400 * 3);
+					    	let b = nowTime/1000;
+					    	let c = endstime/1000;
+					    	if(a < b&&b < c){
+					    		$(".renew_service").show();
 						    	$("#exprie").text("VIP订阅服务即将到期,请及时续费")
 						    	$(".recommend_title").text("以下区域、行业的订阅推送即将停止,为了不影响您的使用,请立即续费!")
 					    	}
 					    }else{
+					    	$(".renew_service").show();
 					    	$(".free_service").show();
 					    }
-					    if(vipStatus === 2&&nowTime>endstime){
-					    	if(exprie === "exprie"){
-					    		$(".free_service").hide();
-					    		$(".renew_service").hide();
-					    	}
-					    }
 					}
 				});
 			}else{
@@ -193,16 +192,17 @@
 					    	$(".date-span").text(dateHtml);
 					    }
 					    if(exprie === "will"){
-					    	$(".free_service").hide();
-					    	$("#exprie").text("VIP订阅服务即将到期,请及时续费")
-					    	$(".recommend_title").text("以下区域、行业的订阅推送即将停止,为了不影响您的使用,请立即续费!")
+					    	let a = (endstime/1000) - (86400 * 3)
+					    	let b = nowTime/1000
+					    	if(b > a){
+					    		$(".renew_service").show();
+						    	$("#exprie").text("VIP订阅服务即将到期,请及时续费")
+						    	$(".recommend_title").text("以下区域、行业的订阅推送即将停止,为了不影响您的使用,请立即续费!")
+					    	}
 					    }else{
+					    	$(".renew_service").show();
 					    	$(".free_service").show();
 					    }
-					    if(vipStatus === 2){
-					    	$(".free_service").hide();
-					    	$(".renew_service").hide();
-					    }
 					}
 				});	
 			}