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

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

wangkaiyue 5 жил өмнө
parent
commit
aeaee9a904

+ 2 - 0
src/jfw/front/swordfish.go

@@ -2399,6 +2399,8 @@ func (f *Front) HasPushHistory() {
 	} else {
 		if (*user)["i_vip_status"] == nil {
 			isExpire = 0
+		} else {
+			isOnTail = util.IntAll((*user)["i_vip_status"])
 		}
 		var o_jy map[string]interface{}
 		if user != nil {

+ 21 - 8
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/updateArea.js

@@ -566,8 +566,8 @@ $(function () {
             $(this).prop('checked',false);
             $(this).parents('li').find('.city').removeClass('active');
         }
-        showOther();
         getResult();
+        showOther();
     })
     // 4.点击半选按钮触发的事件
 //  $('.checkbox.half').on('change', function () {
@@ -597,8 +597,8 @@ $(function () {
         } else {//半选
             oInput.prop("checked",false).addClass('half')
         }
-        showCityTips(this)
         getResult();
+        showCityTips(this)
     })
     // 6. 重置按钮点击事件
     $('.reset-btn').on('click', function() {
@@ -660,22 +660,35 @@ $(function () {
 	function showCityTips(dom){
 		let activeCityLength = $(dom).parent().find('.city.active').length;
 		let selectedCityLength = $(dom).parent().find('.city.active:not([disabled])').length;
+		let disabledCityLength = $(dom).parent().find('.city[disabled]').length;
 		let cityLength = $(dom).parent().find('.city').length;
-		if(selectedCityLength > 2){
-			$(".tips_d_text").text("已选择"+selectedCityLength+"个市,建议购买“全省”");
+		let dataCount = $(dom).parent().parent().attr("data-buy-city-count");
+		if(dataCount === undefined){
+			dataCount = 0;
+		}else{
+			if(Number(dataCount) === disabledCityLength){
+				dataCount = 0;
+			}else{
+				dataCount = dataCount - disabledCityLength;
+			}
+		}
+		let showCount = selectedCityLength - dataCount;
+		if(showCount > 2){
+			$(".tips_d_text").text("已选择"+showCount+"个市,建议购买“全省”");
 			$(".tips_d_text").show();
 		}else{
 			$(".tips_d_text").hide();
 		}
-		if(selectedCityLength === cityLength){
+		if(showCount === cityLength){
 			showOther();
 		}
 	}
 	
 	function showOther(){
-		let provinceLength = $(".area-list .checkbox:not(.other):not([disabled]):checked").length;
-		if(provinceLength > 9){
-			$(".tips_d_text").text("已选择"+provinceLength+"个省,建议购买“全国”")
+		let showCounts = newlyAdded.province;
+		console.log(showCounts)
+		if(showCounts > 9){
+			$(".tips_d_text").text("已新增"+showCounts+"个省,建议新增“全国”")
 			$(".tips_d_text").show();
 		}else{
 			$(".tips_d_text").hide();

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

@@ -649,9 +649,9 @@
 		    }
         }, false);
         //
-		var nowMonth = new Date(startTime).getMonth()+1;
-		var nowYear = new Date(startTime).getFullYear();
-		var nowDay = new Date(startTime).getDate();
+		var nowMonth = new Date().getMonth()+1;
+		var nowYear = new Date().getFullYear();
+		var nowDay = new Date().getDate();
 		//
 		var endMonth = new Date(endTime).getMonth()+1;
 		var endYear = new Date(endTime).getFullYear();

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

@@ -40,7 +40,7 @@
     <div class="app-layout-content-b">
     <div class="vip_update">
         <div class="choose_condition">
-            <p class="update_tip">提示:订阅升级可在已购买的服务基础上,增加区域、行业、以及延长订阅周期!</p>
+            <p class="update_tip">提示:订阅升级可在已购买的服务基础上,增加区域、行业、以及延长订阅周期。升级完成后,将立即生效。</p>
             <ul class="chooseList">
                 <li class="choose_item">
                     <a href="/jyapp/vipsubscribe/toChooseAreaUpgrade">
@@ -113,8 +113,7 @@
                         </table>
                         <dl class="tips">
                             <dt>购买须知:</dt>
-                            <dd>套餐周期内,不支持套餐降级,续费可降级;</dd>
-                            <dd>用户最多购买/续费3年套餐;</dd>
+                            <dd>套餐周期内,不支持套餐降级,即将到期时续费可降级;</dd>
                             <dd>支持套餐升级,补差价(按月进行补差价,不足一个月按一个月计算)。</dd>
                         </dl>
                     </div>

+ 66 - 90
src/jfw/modules/subscribepay/src/service/afterPay.go

@@ -32,8 +32,9 @@ func (a *AfterPay) FastImport() error {
 	flagInt := 0
 	var _keys []map[string]interface{}
 	kwsCount := 0
-	classify_index := 0
-	kws_index := 0
+	classify_index, _ := a.GetInteger("c_index")
+	kws_index, _ := a.GetInteger("k_index")
+	classify_name := a.GetString("c_name")
 	if userId != "" {
 		data, ok := util.MQFW.FindById("user", userId, `{"o_jy":1,"o_vipjy":1,"i_vip_fastimport":1}`)
 		if ok && data != nil && len(*data) > 0 {
@@ -43,14 +44,14 @@ func (a *AfterPay) FastImport() error {
 				o_vipjy, _ := (*data)["o_vipjy"].(map[string]interface{})
 				if o_vipjy["a_items"] != nil {
 					a_items := o_vipjy["a_items"].([]interface{})
-					for k, v := range a_items {
+					for _, v := range a_items {
 						tmp := qutil.ObjToMap(v.(map[string]interface{}))
 						a_key := (*tmp)["a_key"].([]interface{})
 						kwsCount = kwsCount + len(a_key)
-						if (*tmp)["s_item"] == "未分类" {
-							classify_index = k
-							kws_index = len(a_key)
-						}
+						//						if (*tmp)["s_item"] == "未分类" {
+						//							classify_index = k
+						//							kws_index = len(a_key)
+						//						}
 						for _, n := range a_key {
 							ntmp := qutil.ObjToMap(n.(interface{}))
 							nkey := qutil.ObjArrToStringArr((*ntmp)["key"].([]interface{}))
@@ -70,28 +71,20 @@ func (a *AfterPay) FastImport() error {
 						if len(_keys)+kwsCount >= 300 {
 							_keys = _keys[:(300 - kwsCount)]
 						}
-						if classify_index == 0 && kws_index == 0 {
-							//首次添加分类和关键词
-							var o_kws = make(map[string]interface{})
-							classify_name := "未分类"
-							o_kws["s_item"] = classify_name
-							o_kws["i_tips"] = 0
-							o_kws["a_key"] = _keys
-							ok := util.MQFW.UpdateById("user", userId, bson.M{
-								"$push": bson.M{"o_vipjy.a_items": o_kws},
-								"$set":  bson.M{"o_vipjy.l_modifydate": time.Now().Unix(), "i_vip_fastimport": 1},
-							})
-							if ok {
-								flagInt = 1 //导入成功
-							}
-						} else {
-							ok := util.MQFW.UpdateById("user", userId, bson.M{
-								"$push": bson.M{"o_vipjy.a_items." + strconv.Itoa(classify_index) + ".a_key": bson.M{"$each": _keys}},
-								"$set":  bson.M{"o_vipjy.l_modifydate": time.Now().Unix(), "i_vip_fastimport": 1},
-							})
-							if ok {
-								flagInt = 1 //导入成功
-							}
+						ok := util.MQFW.UpdateById("user", userId, bson.M{
+							"$push": bson.M{
+								"o_vipjy.a_items." + strconv.Itoa(classify_index) + ".a_key": bson.M{
+									"$each": _keys,
+								},
+							},
+							"$set": bson.M{
+								"o_vipjy.l_modifydate":                                        time.Now().Unix(),
+								"i_vip_fastimport":                                            1,
+								"o_vipjy.a_items." + strconv.Itoa(classify_index) + ".s_item": classify_name,
+							},
+						})
+						if ok {
+							flagInt = 1 //导入成功
 						}
 					}
 				} else {
@@ -128,7 +121,7 @@ func (a *AfterPay) CheckOrder() error {
 	return nil
 }
 
-//
+//搜索关键词直接订阅
 func (a *AfterPay) DirectSubKWS() error {
 	defer qutil.Catch()
 	userId, _ := a.GetSession("userId").(string)
@@ -138,9 +131,11 @@ func (a *AfterPay) DirectSubKWS() error {
 		keys := a.GetString("keys")
 		var repleat = false
 		var classify_index = 0
-		var kws_index = 0
 		var kwsCount = 0
-		if ok && data != nil && len(*data) > 0 {
+		if len([]rune(keys)) > 20 {
+			keys = qutil.SubString(keys, 0, 20)
+		}
+		if ok && data != nil && len(*data) > 0 && keys != "" {
 			o_vipjy, _ := (*data)["o_vipjy"].(map[string]interface{})
 			if o_vipjy["a_items"] != nil {
 				a_items := o_vipjy["a_items"].([]interface{})
@@ -150,7 +145,6 @@ func (a *AfterPay) DirectSubKWS() error {
 					kwsCount = kwsCount + len(a_key)
 					if (*tmp)["s_item"] == "未分类" {
 						classify_index = k
-						kws_index = len(a_key)
 					}
 					for _, n := range a_key {
 						ntmp := qutil.ObjToMap(n.(interface{}))
@@ -170,31 +164,23 @@ func (a *AfterPay) DirectSubKWS() error {
 			} else if kwsCount >= 300 {
 				flag = "m"
 			} else {
-				if classify_index == 0 && kws_index == 0 {
-					//首次添加分类和关键词
-					var _key = make(map[string]interface{})
-					var a_key = make([]map[string]interface{}, 1)
-					var o_kws = make(map[string]interface{})
-					classify_name := "未分类"
-					o_kws["s_item"] = classify_name
-					_key["key"] = strings.Split(keys, " ")
-					a_key[0] = _key
-					o_kws["a_key"] = a_key
-					o_kws["i_tips"] = 0
-					if o_kws != nil && len(o_kws) > 0 {
-						ok := util.MQFW.UpdateById("user", userId, bson.M{
-							"$push": bson.M{"o_vipjy.a_items": o_kws},
-							"$set":  bson.M{"o_vipjy.l_modifydate": time.Now().Unix()},
-						})
-						if ok {
-							flag = "y"
-						}
-					}
-				} else {
-					var saveData = make(map[string]interface{})
-					saveData["o_vipjy.a_items."+strconv.Itoa(classify_index)+".a_key."+strconv.Itoa(kws_index)+".key"] = strings.Split(keys, " ")
-					ok := util.MQFW.UpdateById("user", userId, map[string]interface{}{
-						"$set": saveData,
+				//首次添加分类和关键词
+				var _key = make(map[string]interface{})
+				var a_key = make([]map[string]interface{}, 1)
+				classify_name := "未分类"
+				_key["key"] = strings.Split(keys, " ")
+				a_key[0] = _key
+				if len(a_key) > 0 {
+					ok := util.MQFW.UpdateById("user", userId, bson.M{
+						"$push": bson.M{
+							"o_vipjy.a_items." + strconv.Itoa(classify_index) + ".a_key": bson.M{
+								"$each": a_key,
+							},
+						},
+						"$set": bson.M{
+							"o_vipjy.l_modifydate":                                        time.Now().Unix(),
+							"o_vipjy.a_items." + strconv.Itoa(classify_index) + ".s_item": classify_name,
+						},
 					})
 					if ok {
 						flag = "y"
@@ -281,7 +267,6 @@ func (a *AfterPay) SetUserInfo() error {
 			kws_index := a.GetString("kws_index")
 			kws_name := strings.Trim(a.GetString("kws_name"), " ")
 			actionType := a.GetString("actionType")
-			kwscount := a.GetString("kwscount")
 			addtion_kws := a.GetSlice("addition_kws")
 			not_kws := a.GetSlice("not_kws")
 			if len([]rune(kws_name)) > 20 {
@@ -310,38 +295,29 @@ func (a *AfterPay) SetUserInfo() error {
 							}
 						}
 					}
-					if kwscount != "0" {
-						//修改关键词
-						saveData["o_vipjy.a_items."+classify_index+".s_item"] = classify_name
-						saveData["o_vipjy.a_items."+classify_index+".a_key."+kws_index+".key"] = _kws
-						if len(addtion_kws) > 0 {
-							saveData["o_vipjy.a_items."+classify_index+".a_key."+kws_index+".appendkey"] = addtion_kws
-						}
-						if len(not_kws) > 0 {
-							saveData["o_vipjy.a_items."+classify_index+".a_key."+kws_index+".notkey"] = not_kws
-						}
-					} else {
-						//首次添加分类和关键词
-						var _key = make(map[string]interface{})
-						var a_key = make([]map[string]interface{}, 1)
-						var o_kws = make(map[string]interface{})
-						if classify_name == "" {
-							classify_name = "未分类"
-						}
-						o_kws["s_item"] = classify_name
-						_key["key"] = _kws
-						_key["appendkey"] = addtion_kws
-						_key["notkey"] = not_kws
-						a_key[0] = _key
-						o_kws["a_key"] = a_key
-						o_kws["i_tips"] = 0
-						if o_kws != nil && len(o_kws) > 0 {
-							flag = util.MQFW.UpdateById("user", userId, bson.M{
-								"$push": bson.M{"o_vipjy.a_items": o_kws},
-								"$set":  bson.M{"o_vipjy.l_modifydate": time.Now().Unix()},
-							})
-						}
+					var _key = make(map[string]interface{})
+					var a_key = make([]map[string]interface{}, 1)
+					if classify_name == "" {
+						classify_name = "未分类"
+					}
+					_key["key"] = _kws
+					_key["appendkey"] = addtion_kws
+					_key["notkey"] = not_kws
+					a_key[0] = _key
+					if len(a_key) > 0 {
+						flag = util.MQFW.UpdateById("user", userId, bson.M{
+							"$push": bson.M{
+								"o_vipjy.a_items." + classify_index + ".a_key": bson.M{
+									"$each": a_key,
+								},
+							},
+							"$set": bson.M{
+								"o_vipjy.l_modifydate":                          time.Now().Unix(),
+								"o_vipjy.a_items." + classify_index + ".s_item": classify_name,
+							},
+						})
 					}
+					//					}
 				} else if actionType == "DK" { //删除关键词
 					data, ok := util.MQFW.FindById("user", userId, `{"o_vipjy.a_items":1}`)
 					if ok && data != nil && len(*data) > 0 {

+ 1 - 2
src/jfw/modules/subscribepay/src/util/msgremind.go

@@ -144,7 +144,7 @@ func (m *msgRemind) run() {
 			now_unix := time.Now().Unix()
 			remind_status := 0
 			//剩余2小时
-			if unpaidOrder.remindStatus != 2 && unpaidOrder.prepayTime+m.getExpireTime() < now_unix && now_unix >= unpaidOrder.prepayTime+m.getExpireTime()-TimeTaskConfig.UnpaidRemind.BeforeExpire {
+			if unpaidOrder.remindStatus != 2 && unpaidOrder.prepayTime+m.getExpireTime() > now_unix && now_unix >= unpaidOrder.prepayTime+m.getExpireTime()-TimeTaskConfig.UnpaidRemind.BeforeExpire {
 				remind_status = 2
 			} else if unpaidOrder.remindStatus == 0 && now_unix > unpaidOrder.prepayTime+TimeTaskConfig.UnpaidRemind.AfterOrder { //下单时间后2小时未支付
 				remind_status = 1
@@ -213,7 +213,6 @@ func (m *msgRemind) run() {
 	})
 }
 func (m *msgRemind) gc() {
-	log.Println(m.getExpireTime())
 	time.AfterFunc(5*time.Minute, func() {
 		defer util.Catch()
 		m.unpaidOrders.Range(func(k interface{}, v interface{}) bool {

+ 2 - 2
src/web/staticres/js/wxSupersearch.js

@@ -1930,7 +1930,7 @@ var SuperSearch = {
 			$("#supersearchPage .resbm").addClass("hidden");
 		}
 	},
-	getHomeList:function(){
-		
+	getHomeList:function(locationCity){
+		alert(locationCity)
 	}
 };

+ 25 - 1
src/web/staticres/vipsubscribe/css/subscribe_list.css

@@ -6,7 +6,7 @@
   align-items: center;
 }
 
-.flex_alginC_justB, .vip_banner .box, .filter_tab, .filter_tab .area_container .area_wrap .handle_menu, .set_keyword > div, .renew_toast > div,.nv_renew_toast > div, .open_remind .remind_box {
+.flex_alginC_justB, .vip_banner .box, .filter_tab, .filter_tab .area_container .area_wrap .handle_menu, .set_keyword > div, .renew_toast > div,.nv_renew_toast > div,._renew_toast > div, .open_remind .remind_box {
   display: flex;
   align-items: center;
   justify-content: space-between;
@@ -521,4 +521,28 @@ text-decoration: none;
 }
 .nv_renew_toast > div {
   background-color: #FE737A;
+}
+/*‘’*/
+._renew_toast > div {
+  padding: .15rem .3rem;
+  color: #fff;
+  font-size: .26rem;
+}
+
+._renew_toast > div i {
+  font-size: .32rem;
+}
+
+._renew_toast > div a {
+  width: 1.24rem;
+  height: .64rem;
+  line-height: .64rem;
+  color: #fff;
+  text-align: center;
+  background: transparent;
+  border: 1px solid white;
+  border-radius: .32rem;
+}
+._renew_toast > div {
+  background-color: #FE737A;
 }

+ 53 - 53
src/web/staticres/vipsubscribe/js/keyWord.js

@@ -277,7 +277,7 @@ var reloadFunc = function(){
 		$.ajax({
             type: "POST",
             url: "/subscribepay/afterPay/fastImport",
-            data: {},
+            data: {c_index:classify_index,k_index:$(".showKeyWord li").length,c_name:$(".classify-detail").text()},
             dataType: "json",
             async: false,
             traditional: true,
@@ -294,59 +294,59 @@ var reloadFunc = function(){
 		                className: 'custom-toast',
 		                callback: function () { console.log('close') }
 		            });
-					if($(".classify .classify-detail").text()=="未分类"){
-						var _keyArr = r.kwMap;
-						var p = $(".showKeyWord li").length;
-						if($(".showKeyWord li").length==0){
-	                    	var classifyArr = {"s_item":"未分类","a_key":[]}
-	                        a_items.push(classifyArr);
-						}else{
-							a_items[classify_index]["s_item"]="未分类";
-						}
-		                for (var i = 0; i< _keyArr.length; i++) {
-							a_items[classify_index]["a_key"].push(_keyArr[i]);
-							kws_arr[_keyArr[i]["key"].join(" ")] = p+"-"+classify_index
-            				var kwsHtml = '';
-		                    var nk_showClass = 'hide';//是否显示排除词个数
-		                    var nk_remark = '添加';
-		                    var notkeylth = 0;
-		                    kwsHtml +='<li>'
-		                    kwsHtml +='<div class="one" style="">'
-		                    kwsHtml +='<div>'
-		                                +'<span><strong> 关键词:</strong>'
-		                                +'<p class="key">'+_keyArr[i]["key"].join(" ")+'</p></span>'
-		                    if (_keyArr[i]["notkey"]!=undefined&&_keyArr[i]["notkey"].length>0){
-		                        nk_showClass = "";
-		                        nk_remark = '编辑';
-		                        notkeylth = _keyArr[i]["notkey"].length;
-		                        kwsHtml +='<span>'
-		                                    +'<strong> 排除词:</strong>'
-		                                    +'<p class="notkey">'+_keyArr[i]["notkey"].join(" ")+'</p>'
-		                                    +'</span>'
-		                    }
-		                    kwsHtml +='</div>'
-		                                +'<button class="editKeyWord" dataIndex="'+p+'"><i class="iconfont icon-xiugai"></i> 修改</button>'
-		                                +'</div>'
-		                     
-		                    if(modifyFlag&&i==kws_index){
-		                        kwsHtml +='<div class="modify" style="display:block;">'
-		                        if(not_kws.length>0){
-		                            notkeylth = not_kws.length;
-		                        }
-		                    }else{
-		                        kwsHtml +='<div class="modify" style="display: none;">'
-		                    }
-		                    kwsHtml +='<textarea name="" rows="1" placeholder="" maxlength="20">'+_keyArr[i]["key"].join(" ")+'</textarea>'
-		                                +'<button class="addAdjunctWord" onclick="toappendkey(this)">添加 附加词 <i class="appendkey hide">(0)</i></button>'
-		                                +'<button class="addExclusion" onclick="tonotkey(this)">'+nk_remark+' 排除词 <i class="notkey '+nk_showClass+'">('+notkeylth+')</i></button>'
-		                                +'<button class="deleteKey">删除</button>'
-		                                +'<button class="ascertainKey" dataIndex="'+p+'" onclick="saveK(this)">确定</button>'
-		                                +'</div>'
-		                                +'</li>'
-							$(kwsHtml).prependTo(".showKeyWord ul");
-							p = parseInt(p) + 1;
-		                }
+					//if($(".classify .classify-detail").text()=="未分类"){
+					var _keyArr = r.kwMap;
+					var p = $(".showKeyWord li").length;
+					if($(".showKeyWord li").length==0){
+                    	var classifyArr = {"s_item":"未分类","a_key":[]}
+                        a_items.push(classifyArr);
+					}else{
+						a_items[classify_index]["s_item"]="未分类";
 					}
+	                for (var i = 0; i< _keyArr.length; i++) {
+						a_items[classify_index]["a_key"].push(_keyArr[i]);
+						kws_arr[_keyArr[i]["key"].join(" ")] = p+"-"+classify_index
+           				var kwsHtml = '';
+	                    var nk_showClass = 'hide';//是否显示排除词个数
+	                    var nk_remark = '添加';
+	                    var notkeylth = 0;
+	                    kwsHtml +='<li>'
+	                    kwsHtml +='<div class="one" style="">'
+	                    kwsHtml +='<div>'
+	                                +'<span><strong> 关键词:</strong>'
+	                                +'<p class="key">'+_keyArr[i]["key"].join(" ")+'</p></span>'
+	                    if (_keyArr[i]["notkey"]!=undefined&&_keyArr[i]["notkey"].length>0){
+	                        nk_showClass = "";
+	                        nk_remark = '编辑';
+	                        notkeylth = _keyArr[i]["notkey"].length;
+	                        kwsHtml +='<span>'
+	                                    +'<strong> 排除词:</strong>'
+	                                    +'<p class="notkey">'+_keyArr[i]["notkey"].join(" ")+'</p>'
+	                                    +'</span>'
+	                    }
+	                    kwsHtml +='</div>'
+	                                +'<button class="editKeyWord" dataIndex="'+p+'"><i class="iconfont icon-xiugai"></i> 修改</button>'
+	                                +'</div>'
+	                     
+	                    if(modifyFlag&&i==kws_index){
+	                        kwsHtml +='<div class="modify" style="display:block;">'
+	                        if(not_kws.length>0){
+	                            notkeylth = not_kws.length;
+	                        }
+	                    }else{
+	                        kwsHtml +='<div class="modify" style="display: none;">'
+	                    }
+	                    kwsHtml +='<textarea name="" rows="1" placeholder="" maxlength="20">'+_keyArr[i]["key"].join(" ")+'</textarea>'
+	                                +'<button class="addAdjunctWord" onclick="toappendkey(this)">添加 附加词 <i class="appendkey hide">(0)</i></button>'
+	                                +'<button class="addExclusion" onclick="tonotkey(this)">'+nk_remark+' 排除词 <i class="notkey '+nk_showClass+'">('+notkeylth+')</i></button>'
+	                                +'<button class="deleteKey">删除</button>'
+	                                +'<button class="ascertainKey" dataIndex="'+p+'" onclick="saveK(this)">确定</button>'
+	                                +'</div>'
+	                                +'</li>'
+						$(kwsHtml).prependTo(".showKeyWord ul");
+						p = parseInt(p) + 1;
+	                }
+					//}
 				}else{
 					weui.toast('导入失败', {
 		                duration: 2000,

+ 22 - 9
src/web/staticres/vipsubscribe/js/updateArea.js

@@ -565,9 +565,9 @@ $(function () {
         }else{
             $(this).prop('checked',false);
             $(this).parents('li').find('.city').removeClass('active');
-        }
-        showOther();
+        };
         getResult();
+        showOther();
     })
     // 4.点击半选按钮触发的事件
 //  $('.checkbox.half').on('change', function () {
@@ -597,8 +597,8 @@ $(function () {
         } else {//半选
             oInput.prop("checked",false).addClass('half')
         }
-        showCityTips(this)
         getResult();
+        showCityTips(this)
     })
     // 6. 重置按钮点击事件
     $('.reset-btn').on('click', function() {
@@ -660,22 +660,35 @@ $(function () {
 	function showCityTips(dom){
 		let activeCityLength = $(dom).parent().find('.city.active').length;
 		let selectedCityLength = $(dom).parent().find('.city.active:not([disabled])').length;
+		let disabledCityLength = $(dom).parent().find('.city[disabled]').length;
 		let cityLength = $(dom).parent().find('.city').length;
-		if(selectedCityLength > 2){
-			$(".tips_d_text").text("已选择"+selectedCityLength+"个市,建议购买“全省”");
+		let dataCount = $(dom).parent().parent().attr("data-buy-city-count");
+		if(dataCount === undefined){
+			dataCount = 0;
+		}else{
+			if(Number(dataCount) === disabledCityLength){
+				dataCount = 0;
+			}else{
+				dataCount = dataCount - disabledCityLength;
+			}
+		}
+		let showCount = selectedCityLength - dataCount;
+		if(showCount > 2){
+			$(".tips_d_text").text("已新增"+showCount+"个市,建议新增“全省”");
 			$(".tips_d_text").show();
 		}else{
 			$(".tips_d_text").hide();
 		}
-		if(selectedCityLength === cityLength){
+		if(showCount === cityLength){
 			showOther();
 		}
 	}
 	
 	function showOther(){
-		let provinceLength = $(".area-list .checkbox:not(.other):not([disabled]):checked").length;
-		if(provinceLength > 9){
-			$(".tips_d_text").text("已选择"+provinceLength+"个省,建议购买“全国”")
+		let showCounts = newlyAdded.province;
+		console.log(showCounts)
+		if(showCounts > 9){
+			$(".tips_d_text").text("已新增"+showCounts+"个省,建议新增“全国”")
 			$(".tips_d_text").show();
 		}else{
 			$(".tips_d_text").hide();

+ 5 - 5
src/web/staticres/wxswordfish/share.js

@@ -11,7 +11,7 @@ function initShare(signature,openid,isentry,activecode,nickname,avatar,id){
 	}
 	if(typeof(signature) != "undefined" && signature != null && signature.length == 4){
 		wx.config({
-		    debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
+		    debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
 		    appId: signature[0], // 必填,公众号的唯一标识
 		    timestamp:signature[1], // 必填,生成签名的时间戳
 		    nonceStr: signature[2], // 必填,生成签名的随机串
@@ -201,14 +201,14 @@ function initShare(signature,openid,isentry,activecode,nickname,avatar,id){
 			    	var latitude = res.latitude; // 纬度,浮点数,范围为90 ~ -90
 			    	var longitude = res.longitude; // 经度,浮点数,范围为180 ~ -180。
 					//生成地理位置
-                    var fname = '';
                     var point = new BMap.Point(longitude, latitude);
                     var geoc = new BMap.Geocoder();
                     geoc.getLocation(point, function(rs) {
                         var addComp = rs.addressComponents;
-                        //alert(addComp.province + ", "+addComp.city + ", "+addComp.district + ", "+addComp.street + ", "+addComp.streetNumber);
-                        fname = addComp.district;
-                        alert('您现在所处位置:'+JSON.stringify(addComp));
+                        //alert('您现在所处位置:'+addComp.province + ", "+addComp.city + ", "+addComp.district + ", "+addComp.street + ", "+addComp.streetNumber);
+						if(window.location.pathname.indexOf("/jylab/mainSearch")>-1){
+							SuperSearch.getHomeList(addComp.city);
+						}
                     });
 			  }
 			});

+ 31 - 9
src/web/templates/weixin/historypush.html

@@ -244,8 +244,10 @@
 				if(isPassCount){
 					$(".open_remind").show();
 				}
-				if(parseInt(isExpire)<0){
-					$(".nv_renew_toast").show();
+				if(parseInt(isExpire)<0&&parseInt(isOnTail)==-1){
+					if(localStorage.getItem("nv_vip_"+userId)==null){
+						$(".nv_renew_toast").show();
+					}
 				}
 				if(!firstPage.length>0 && !haskey){
 					if(sessionStorage&&(sessionStorage.keysetindexToHistory=="1"||sessionStorage.keysetindexToHistory=="2"||sessionStorage.keysetindexToHistory=="3")){
@@ -274,15 +276,21 @@
 				}
 				if(parseInt(isOnTail)!=1){
 					$('.free7days_pic').append("<style>.free7days_pic:after{display:none}</style>");
-					if(parseInt(isExpire)>0){
-						$(".isExpire").text(parseInt(isExpire));
-						$(".renew_toast").show();
+					if(parseInt(isExpire)>1){
+						$(".renew_toast .isExpire").text(parseInt(isExpire));
+					}else if (parseInt(isExpire)>0){
+						$(".renew_toast").find(".other").hide();
+						$(".renew_toast").find(".today").show();
 					}
+					$(".renew_toast").show();
 				}else{
-					if(parseInt(isExpire)>0){
-						$(".isExpire").text(parseInt(isExpire));
-						$(".renew_toast").show();
+					if(parseInt(isExpire)>1){
+						$("._renew_toast .isExpire").text(parseInt(isExpire));
+					}else if (parseInt(isExpire)>0){
+						$("._renew_toast").find(".other").hide();
+						$("._renew_toast").find(".today").show();
 					}
+					$("._renew_toast").show();
 				}
 				$(".vip_set").show();
 				$(".tab_left .area").show();
@@ -895,9 +903,19 @@
       	<div class="renew_toast" style="display: none;">
       		<div>
       			<i class="icon iconfont" id="close_renew">&#xe61a;</i>
-      			<span>VIP订阅服务还有 <span class="isExpire"></span> 天到期,请及时续费!</span>
+      			<span class="other">VIP订阅服务还有 <span class="isExpire"></span> 天到期,请及时续费!</span>
+      			<span class="today" style="display:none;">VIP订阅服务今天到期,请及时续费!</span>
       			<a onclick="torepay()">去续费</a>
       		</div>
+      	</div>
+		<!--试用用户-->
+      	<div class="_renew_toast" style="display: none;">
+      		<div>
+      			<i class="icon iconfont" id="_close_renew">&#xe61a;</i>
+      			<span class="other">VIP订阅服务试用还有<span class="isExpire"></span>天到期,请及时购买!</span>
+      			<span class="today" style="display:none;">VIP订阅服务试用今天到期,请及时购买!</span>
+      			<a onclick="topay()">去购买</a>
+      		</div>
       	</div>
       	<!-- 试用用户 到期 去购买 提醒 -->
       	<div class="nv_renew_toast" style="display: none;">
@@ -1236,7 +1254,11 @@
             $('#close_renew').on('click',() =>{
             	$('.renew_toast').hide()
             })
+            $('#_close_renew').on('click',() =>{
+            	$('._renew_toast').hide()
+            })
             $('#nv_close_renew').on('click',() =>{
+				localStorage.setItem("nv_vip_"+userId,"T");
             	$('.nv_renew_toast').hide()
             })
             

+ 5 - 2
src/web/templates/weixin/my.html

@@ -27,7 +27,7 @@
                     <span>邮箱设置</span>
                     <i class="iconfont icon-arrow"></i>
                 </a> 
-                <a href="#" class="user_email" style="display:none">
+                <a class="user_email" style="display:none">
                     <span></span>
                     <i class="iconfont icon-arrow"></i>
                 </a>
@@ -114,7 +114,10 @@
 	        	window.location.href="/weixin/pay/toMyWxOrder?v=01";
 	        })
 			$(".set_email").on("click",function(){
-				window.location.href="/front/wxMyOrder/myEmail";	//邮箱设置_
+				window.location.href="/front/wxMyOrder/myEmail";	//邮箱设置
+			})
+			$(".user_email").on("click",function(){
+				window.location.href="/front/wxMyOrder/myEmail";	//邮箱设置
 			})
 	        $(".feedback").on("click",function(){
 	        	window.location.href = "/swordfish/feedback";

+ 2 - 5
src/web/templates/weixin/search/mainSearch.html

@@ -20,10 +20,10 @@
 <script src="{{Msg "seo" "cdn"}}/mobiscroll/mobiscroll.min.js"></script>
 {{include "/common/weixin.html"}}
 <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=DD279b2a90afdf0ae7a3796787a0742e"></script>
-<script src="{{Msg "seo" "cdn"}}/wxswordfish/share.js?v={{Msg "seo" "version"}}1"></script>
+<script src="{{Msg "seo" "cdn"}}/wxswordfish/share.js?v={{Msg "seo" "version"}}"></script>
 <script src="{{Msg "seo" "cdn"}}/js/dropload.js?v={{Msg "seo" "version"}}"></script>
 <script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/wxEntsesearch.js?v={{Msg "seo" "version"}}"></script>
-<script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/wxSupersearch.js?v={{Msg "seo" "version"}}112"></script>
+<script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/wxSupersearch.js?v={{Msg "seo" "version"}}"></script>
 <!--2.8-->
 <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/base_myorder.css?v={{Msg "seo" "version"}}1">
 <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
@@ -301,9 +301,6 @@
         </div>
 		{{$s_top:=(Ad "jy-wxsearch-home-top" -1)}}
 		<script>
-			$(function(){
-				SuperSearch.getHomeList()
-			})
 			var ADTopList={{$s_top}}
 			if (ADTopList!=null){
 				var adhtml = '';

+ 0 - 2
src/web/templates/weixin/vipsubscribe/keyWord.html

@@ -625,7 +625,6 @@
         //保存数据
         function saveData(actionType){
             var _flag = false;
-            var kwscount = $(".content .showKeyWord li").length;
             var param = {};
             param.pageType = "keyWords";
             param.classify_index = classify_index;
@@ -633,7 +632,6 @@
             param.kws_index = kws_index;
             param.kws_name = kws_name;
             param.actionType = actionType;
-            param.kwscount = kwscount;
             param.addition_kws = addition_kws;
             param.not_kws = not_kws;
             $.ajax({

+ 3 - 3
src/web/templates/weixin/vipsubscribe/renew_pay.html

@@ -685,9 +685,9 @@
 		    }
         }, false);
         //
-		var nowMonth = new Date(startTime).getMonth()+1;
-		var nowYear = new Date(startTime).getFullYear();
-		var nowDay = new Date(startTime).getDate();
+		var nowMonth = new Date().getMonth()+1;
+		var nowYear = new Date().getFullYear();
+		var nowDay = new Date().getDate();
 		//
 		var endMonth = new Date(endTime).getMonth()+1;
 		var endYear = new Date(endTime).getFullYear();

+ 2 - 1
src/web/templates/weixin/vipsubscribe/vip_index.html

@@ -136,7 +136,7 @@
             <div class="nv_renew_toast" style="display: none;">
                 <div>
                     <i class="icon iconfont" id="nv_close_renew">&#xe61a;</i>
-                    <span>VIP订阅服务试用即将过期,请及时购买!</span>
+                    <span>VIP订阅服务试用还有<span class="renew_day"></span>天到期,请及时购买!</span>
                     <a href="/weixin/pay/vipsubscribe_new">去购买</a>
                 </div>
             </div>
@@ -264,6 +264,7 @@
 							if(parseInt(_vipData["expRemind"])>0){
 	                            $(".to_expired").show();
 	                            $(".nv_renew_toast").show();
+								$(".renew_day").text(_vipData["expRemind"]);
 								$(".tabbar").hide();
 	                        }else{
 	                            $(".to_expired").hide();