Browse Source

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

zhangxinlei1996 5 năm trước cách đây
mục cha
commit
fbd081b76c
26 tập tin đã thay đổi với 582 bổ sung220 xóa
  1. 2 0
      src/jfw/front/swordfish.go
  2. 15 1
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/updateArea.js
  3. 3 6
      src/jfw/modules/app/src/web/templates/vipsubscribe/choose_area.html
  4. 6 6
      src/jfw/modules/app/src/web/templates/vipsubscribe/renew_pay.html
  5. 9 2
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_purchase.html
  6. 7 3
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_upgrade.html
  7. 3 0
      src/jfw/modules/subscribepay/src/a/init.go
  8. 66 90
      src/jfw/modules/subscribepay/src/service/afterPay.go
  9. 255 0
      src/jfw/modules/subscribepay/src/service/index_p1.go
  10. 1 2
      src/jfw/modules/subscribepay/src/util/msgremind.go
  11. 2 1
      src/web/staticres/css/wx/home.css
  12. 3 3
      src/web/staticres/css/wxsearch.css
  13. 3 0
      src/web/staticres/js/wxSupersearch.js
  14. 2 2
      src/web/staticres/vipsubscribe/css/keyWord.css
  15. 25 1
      src/web/staticres/vipsubscribe/css/subscribe_list.css
  16. 53 53
      src/web/staticres/vipsubscribe/js/keyWord.js
  17. 15 1
      src/web/staticres/vipsubscribe/js/updateArea.js
  18. 17 0
      src/web/staticres/wxswordfish/share.js
  19. 31 9
      src/web/templates/weixin/historypush.html
  20. 39 24
      src/web/templates/weixin/search/mainSearch.html
  21. 3 6
      src/web/templates/weixin/vipsubscribe/choose_area.html
  22. 2 4
      src/web/templates/weixin/vipsubscribe/keyWord.html
  23. 3 3
      src/web/templates/weixin/vipsubscribe/renew_pay.html
  24. 2 1
      src/web/templates/weixin/vipsubscribe/vip_index.html
  25. 9 2
      src/web/templates/weixin/vipsubscribe/vip_purchase.html
  26. 6 0
      src/web/templates/weixin/vipsubscribe/vip_upgrade.html

+ 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 {

+ 15 - 1
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/updateArea.js

@@ -638,6 +638,8 @@ $(function () {
         $('.optional').remove()
         init();
         $(".tips_d_text").hide();
+        $(".btns .reset-btn").prop("disabled",false);
+        $(".btns .save-btn").prop("disabled",false);
     })
 
     // 7.锚点跳转
@@ -658,8 +660,20 @@ $(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){
+		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("已选择"+selectedCityLength+"个市,建议购买“全省”");
 			$(".tips_d_text").show();
 		}else{

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

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html style="height: 100%">
 
 <head>
     <meta charset="utf-8">
@@ -17,7 +17,7 @@
     <link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}"/>
 </head>
 
-<body>
+<body style="height: 100%">
 <div class="app-layout-header">
     <span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
     区域选择
@@ -617,7 +617,6 @@
             let minHeight = $('.result_text').css('min-height');
             let rows = Math.round(Math.round(pHeight) / parseFloat(minHeight));
             console.log("高度:" + pHeight, "最小高度" + minHeight, "行数:" + rows);
-            $(".select-area-box .area-list").css("margin-top", $('.result_text').height() + 25);
             if (rows == 1) {
                 $('.packup').hide();
                 $('.detail').hide();
@@ -641,14 +640,12 @@
                 $(".result").css("padding-bottom", "0.3rem");
                 $(this).hide();
                 $('.packup').show();
-                $(".select-area-box .area-list").css("margin-top", $('.result_text').height() + 25);
             });
             $('.packup').click(function () {
                 $(".result").css("padding-bottom", "0.2rem");
                 $('.result_text').addClass('line_two');
                 $(this).hide();
                 $('.detail').show();
-                $(".select-area-box .area-list").css("margin-top", $('.result_text').height() + 25);
             });
             $("body").on('click', '.slide a', function () {
                 var s = $(this).html();
@@ -721,7 +718,7 @@
                     }
                 } else {
                     $(this).parent('div').siblings('.tab').children().children('.checkbox').prop(
-                        'checked', false)
+                        'checked', false).removeClass('half');
                 }
                 AreaChoose.isAllSelected()
                 AreaChoose.getResult($(this).parent('div').siblings('.tab').find('.province').text()) //出入选择的省份

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

@@ -46,11 +46,11 @@
             <ul class="chooseList">
                 <li class="detail_item">
                         <div class="item_info item_area">
-                            <span class="label">已订阅区域:</span>
+                            <span class="label">已购买区域:</span>
                             <span class="label_for">河南省、郑州市、洛阳市、淮南市</span>
                         </div>
                         <div class="item_info item_industry">
-                            <span class="label">已订阅行业:</span>
+                            <span class="label">已购买行业:</span>
                             <span class="label_for">保监、城管保监</span>
                         </div>
                         <div class="item_info item_cycle">
@@ -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();
@@ -766,7 +766,7 @@
                     try {
                         if (pay_way == "wx_app") {
                             JyObj.wxPay(r.data.res);
-                        } else {
+                        } else if(pay_way === "ali_app"){
                             JyObj.aliPay(r.data.res)
                         }
                         //校验是否支付完成

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

@@ -194,7 +194,7 @@
                             </label>
                             <div class="number_box" id="number_box_month" data-numbox-step="1" data-numbox-min="1"
                                  data-numbox-max="12">
-                                <button class="weui-btn weui-btn_plain-default" type="button">
+                                <button class="weui-btn weui-btn_plain-default" type="button" disabled>
                                     <div class="jy_icon decrease"></div>
                                 </button>
                                 <span class="month_number">1</span>
@@ -383,6 +383,9 @@
 
             if (!$.isEmptyObject(this.areaSelect) && !this.areaSelect["全国"] && !this.areaSelect["一个省"]) { //选择有行业信息 且不是全国
                 var tipTxt = "已选择 ";
+                {{if eq .T.orderType 5 }}
+                tipTxt = "已购买 ";
+                {{end}}
                 if (provinceArr.length > 0) tipTxt += provinceArr.length + " 个省级区域";
                 if (cityArr.length > 0) {
                     if (provinceArr.length > 0) tipTxt += "、";
@@ -422,7 +425,11 @@
                 $(".choose_industry").val(data.join(" "));
             }*/
             if (this.industrySelect.length > 0 && this.industrySelect[0] != "全部行业" && this.industrySelect[0] != "一个行业") { //选择有行业信息
-                $(".choose_industry").val("已选择 " + this.industrySelect.length + " 个行业");
+                var tipTxt = "已选择 ";
+                {{if eq .T.orderType 5 }}
+                tipTxt = "已购买 ";
+                {{end}}
+                $(".choose_industry").val(tipTxt+ this.industrySelect.length + " 个行业");
             } else if (this.industrySelect.length > 0 && this.industrySelect[0] == "全部行业") {
                 $(".choose_industry").val("全部行业");
             } else {

+ 7 - 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>
@@ -601,6 +600,9 @@
 				$("#area").attr("placeholder", areaHtml);
 			}else{
 				areaHtml = "已新增 "+ vipSubSelectArea.province +" 个省级区域、"+ cityLen +" 个地市";
+				if(Number(vipSubSelectArea.province) === 0 && Number(cityLen) === 0){
+					areaHtml = "请选择升级区域";
+				}
 				$("#area").attr("placeholder", areaHtml);
 			}
 	    }
@@ -1247,6 +1249,8 @@
 		    					if(cityLen > cityCount){
 					    			let reduce = cityLen - cityCount;
 					    			areasObj[province] = citys.slice(0, -reduce);
+					    		}else{
+					    			areasObj[province] = citys;
 					    		}
 		    				}
 		    			}

+ 3 - 0
src/jfw/modules/subscribepay/src/a/init.go

@@ -29,6 +29,9 @@ func init() {
 	xweb.AddRouter("/subscribepay", &service.OrderListDetails{}) //订单详情&列表
 	xweb.AddRouter("/subscribepay", &service.RenewUpgrade{})     //续费&升级
 
+	//p1
+	xweb.AddRouter("/subscribepay", &service.IndexSearch{})     //续费&升级
+
 	//数据导出
 	xweb.AddRouter("/jypay", &service.DataExportPayMobile{})
 	xweb.AddRouter("/jypay", &service.DataExportPayPC{})

+ 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 {

+ 255 - 0
src/jfw/modules/subscribepay/src/service/index_p1.go

@@ -0,0 +1,255 @@
+package service
+
+import (
+	"entity"
+	"fmt"
+	"github.com/go-xweb/xweb"
+	"log"
+	qutil "qfw/util"
+	"qfw/util/elastic"
+	"qfw/util/redis"
+	"strings"
+	"util"
+)
+
+type IndexSearch struct {
+	*xweb.Action
+	getIndexMessage xweb.Mapper `xweb:"/index/getIndexMessage"` //首页p1数据
+}
+
+const (
+	search_index = "bidding"
+	search_type  = "bidding"
+	search_field = `"_id","title","publishtime","toptype","subtype","type","city","s_subscopeclass","budget"`
+
+	query               = `{"query":{"bool":{"should":[%s]}},"highlight": {"pre_tags": ["<a>"],"post_tags": ["</a>"],"fields": {"title": {"fragment_size": 0,"number_of_fragments": 1}}},"_source":[` + search_field + `],"sort":[{"publishtime":"desc"},{"budget":"desc"}],"from":0,"size":50}`
+	multi_match         = `{"multi_match": {"query": %s,"type": "phrase", "fields": ["title"]}}`
+	query_bool_must     = `{"terms":{"%s":[%s]}}`
+	query_bool_must_and = `{"bool":{"must":[%s]%s}}`
+	query_bool_should   = `{"bool":{"should":[%s],"minimum_should_match": 1}}`
+)
+
+/* p1获取信息
+  return
+	  success : true or false
+	  errMsh : 错误信息
+	  data  :{
+		isVip: true or false,
+		weekNullData:true or false,
+		list:[{},{},{}]
+	 }
+*/
+func (this *IndexSearch) GetIndexMessage() {
+	userId := qutil.ObjToString(this.GetSession("userId"))
+	areaCity := this.GetString("city")
+	log.Println(userId, "=== 地区:", areaCity)
+	r := func() *entity.FuncResult {
+		SearchType := 0 //订阅 0 > 搜索 1(有无订阅)> 无搜索 2(有无订阅)
+		doSearchStr := ""
+		isVip := false
+		//获取订阅信息
+		userMap, ok := util.MQFW.FindById("user", userId, `{"o_jy":1,"o_vipjy":1,"i_vip_status":1}`)
+		if !ok || userMap == nil || len(*userMap) == 0 {
+			SearchType++
+		}
+		//根据订阅词获取查询语句
+		if SearchType == 0 {
+			vipStatus := qutil.IntAll((*userMap)["i_vip_status"])
+			if vipStatus > 0 { //vip用户
+				isVip = true
+				o_msgset := qutil.ObjToMap((*userMap)["o_vipjy"])
+				vip_items, ok := (*o_msgset)["a_items"].([]interface{})
+				if !ok || len(vip_items) == 0 {
+					SearchType++
+				} else {
+					//拼接查询语句-vip订阅词
+					doSearchStr = getVipSubscribeSql(o_msgset)
+					log.Println("getVipSubscribeSql SearchStr===", doSearchStr)
+				}
+			} else { //普通用户
+				o_msgset := qutil.ObjToMap((*userMap)["o_jy"])
+				items, ok := (*o_msgset)["a_key"].([]interface{})
+				if !ok || len(items) == 0 {
+					SearchType++
+				} else {
+					//拼接查询语句-普通用户订阅词
+					doSearchStr = getNormalSubscribeSql(items)
+					log.Println("getNormalSubscribeSql SearchStr===", doSearchStr)
+				}
+			}
+		}
+		//根据搜索历史获取查询语句
+		if SearchType == 1 {
+			h := redis.GetStr("other", "s_"+userId)
+			if h == "" {
+				SearchType++
+			} else {
+				history := strings.Split(h, ",")
+				//拼接查询语句-普通用户订阅词
+				doSearchStr = getSimpleSql(areaCity, history)
+				log.Println(history)
+			}
+		}
+		//无订阅无搜索历史
+		if SearchType == 2 {
+			doSearchStr = getSimpleSql(areaCity, []string{})
+		}
+		list := elastic.Get(search_index, search_type, doSearchStr)
+		return &entity.FuncResult{true, nil, map[string]interface{}{
+			"isVip": isVip,
+			"list":  list,
+		}}
+	}()
+	if r.Err != nil {
+		log.Printf("%s CreateOrder err:%v\n", userId, r.Err.Error())
+	}
+	this.ServeJson(r.Format())
+}
+
+func getVipSubscribeSql(vipSets *map[string]interface{}) string {
+	items := qutil.ObjArrToMapArr((*vipSets)["a_items"].([]interface{}))
+	bools := []string{}
+	musts := []string{}
+
+	//订阅词
+	for _, v := range items {
+		a_key := (*qutil.ObjToMap(v))["a_key"]
+		keysets := qutil.ObjArrToMapArr(a_key.([]interface{}))
+		for _, keyset := range keysets {
+			musts := []string{}
+			must_not := []string{}
+
+			allKeys := []string{}
+			//关键词
+			keys := qutil.ObjArrToStringArr(keyset["key"].([]interface{}))
+			if len(keys) == 0 {
+				continue
+			}
+			allKeys = append(allKeys, keys...)
+			//附加次
+			appendkeys := qutil.ObjArrToStringArr(keyset["appendkey"].([]interface{}))
+			allKeys = append(allKeys, appendkeys...)
+
+			for _, key := range allKeys {
+				musts = append(musts, fmt.Sprintf(multi_match, "\""+key+"\""))
+			}
+			//排除词
+			notkeys := qutil.ObjArrToStringArr(keyset["notkey"].([]interface{}))
+			for _, notkey := range notkeys {
+				must_not = append(must_not, fmt.Sprintf(multi_match, "\""+notkey+"\""))
+			}
+
+			if len(musts) > 0 {
+				notStr := ""
+				if len(must_not) > 0 {
+					notStr = fmt.Sprintf(`,"must_not":[%s]`, strings.Join(must_not, ","))
+				}
+				bools = append(bools, fmt.Sprintf(query_bool_must_and, strings.Join(musts, ","), notStr))
+			}
+		}
+	}
+	//地区
+	areaMap := qutil.ObjToMap((*vipSets)["o_area"])
+	var areas, citys, areaSql []string
+	for k, v := range (*areaMap) {
+		tmp := qutil.ObjArrToStringArr(v.([]interface{}))
+		if len(tmp) == 0 {
+			areas = append(areas, k)
+		} else {
+			citys = append(citys, tmp...)
+		}
+	}
+
+	if len(areas) > 0 {
+		areaSql = append(areaSql, fmt.Sprintf(query_bool_must, "area", `"`+strings.Join(areas, `","`)+`"`))
+	}
+	if len(citys) > 0 {
+		areaSql = append(areaSql, fmt.Sprintf(query_bool_must, "city", `"`+strings.Join(citys, `","`)+`"`))
+	}
+
+	if len(areaSql) > 0 {
+		musts = append(musts, fmt.Sprintf(query_bool_should, strings.Join(areaSql, ",")))
+	}
+
+	//类型
+	infotypes := qutil.ObjArrToStringArr((*vipSets)["a_infotype"].([]interface{}))
+	if len(infotypes) > 0 {
+		musts = append(musts, fmt.Sprintf(query_bool_must, "toptype", `"`+strings.Join(infotypes, `","`)+`"`))
+	}
+	//行业
+	buyerclasses := qutil.ObjArrToStringArr((*vipSets)["a_buyerclass"].([]interface{}))
+	if len(buyerclasses) > 0 {
+		musts = append(musts, fmt.Sprintf(query_bool_must, "buyerclass", `"`+strings.Join(infotypes, `","`)+`"`))
+	}
+	return fmt.Sprintf(query, strings.Join(musts, ","), strings.Join(bools, ","))
+}
+
+func getNormalSubscribeSql(keySets []interface{}) string {
+	bools := []string{}
+	for _, v := range keySets {
+		keySet := qutil.ObjToMap(v)
+		if keySet == nil || len(*keySet) == 0 {
+			continue
+		}
+		var keywords, notkeys, areas, infotypes []string
+		if val, ok := (*keySet)["key"]; ok {
+			keywords = qutil.ObjArrToStringArr(val.([]interface{}))
+		} else {
+			continue
+		}
+		if val, ok := (*keySet)["notkey"]; ok {
+			notkeys = qutil.ObjArrToStringArr(val.([]interface{}))
+		}
+		if val, ok := (*keySet)["area"]; ok {
+			areas = qutil.ObjArrToStringArr(val.([]interface{}))
+		}
+		if val, ok := (*keySet)["infotype"]; ok {
+			infotypes = qutil.ObjArrToStringArr(val.([]interface{}))
+		}
+		log.Println(keywords, notkeys, areas, infotypes)
+
+		musts := []string{}
+		must_not := []string{}
+		//关键词
+		for _, key := range keywords {
+			musts = append(musts, fmt.Sprintf(multi_match, "\""+key+"\""))
+		}
+		//排除词
+		for _, notkey := range notkeys {
+			must_not = append(must_not, fmt.Sprintf(multi_match, "\""+notkey+"\""))
+		}
+		//地区
+		if len(areas) > 0 {
+			musts = append(musts, fmt.Sprintf(query_bool_must, "area", `"`+strings.Join(areas, `","`)+`"`))
+		}
+		//类型
+		if len(infotypes) > 0 {
+			musts = append(musts, fmt.Sprintf(query_bool_must, "toptype", `"`+strings.Join(infotypes, `","`)+`"`))
+		}
+
+		//添加
+		if len(musts) > 0 {
+			notStr := ""
+			if len(must_not) > 0 {
+				notStr = fmt.Sprintf(`,"must_not":[%s]`, strings.Join(must_not, ","))
+			}
+			bools = append(bools, fmt.Sprintf(query_bool_must_and, strings.Join(musts, ","), notStr))
+		}
+	}
+	return fmt.Sprintf(query, strings.Join(bools, ","))
+}
+
+func getSimpleSql(city string, history []string) string {
+	musts := []string{}
+	if len(history) > 0 {
+		for _, key := range history {
+			musts = append(musts, fmt.Sprintf(multi_match, "\""+key+"\""))
+		}
+
+	}
+	if city != "" {
+		musts = append(musts, fmt.Sprintf(query_bool_must, "area", `"`+city+`"`))
+	}
+	bools := fmt.Sprintf(query_bool_must_and, strings.Join(musts, ","), "")
+	return fmt.Sprintf(query, bools)
+}

+ 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 - 1
src/web/staticres/css/wx/home.css

@@ -82,7 +82,7 @@
   width: 0.08rem;
   height: 0.08rem;
   background: #fff;
-  opacity: 0.4;
+  opacity: 0.6;
 }
 
 .home .top .home_banner .lunbo .custorm_dot .swiper-pagination-bullet-active {
@@ -129,6 +129,7 @@
   padding: .32rem .3rem 0.08rem;
   font-size: .4rem;
   color: #1D1D1D;
+font-weight: bold;
 }
 
 .home .home_data .data_list {

+ 3 - 3
src/web/staticres/css/wxsearch.css

@@ -386,12 +386,12 @@ form{
 }
 /**引导页**/
 .swiper-pagination{
-	top: 80px !important;
+/*	top: 80px !important;*/
 	transition: 0ms !important;
 	-webkit-transition: 0ms !important;
 }
 .swiper-pagination-bullet{
-	margin-bottom: 15px !important;
+	margin-bottom: 5px !important;
 }
 .swiper-slide{
 	text-align: center;
@@ -482,7 +482,7 @@ form{
 	height: 100%;
 }
 .swiper-pagination-bullet-active{
-	background-color: #35c5da !important;
+/*	background-color: #35c5da !important;*/
 }
 .swiper-pagination-bullet{
 	opacity: .1;

+ 3 - 0
src/web/staticres/js/wxSupersearch.js

@@ -1929,5 +1929,8 @@ var SuperSearch = {
 			$("#wrapper").css("margin-bottom","52px");
 			$("#supersearchPage .resbm").addClass("hidden");
 		}
+	},
+	getHomeList:function(locationCity){
+		alert(locationCity)
 	}
 };

+ 2 - 2
src/web/staticres/vipsubscribe/css/keyWord.css

@@ -566,7 +566,7 @@ bottom:0px;
     width: 1.7rem;
     text-align: center;
     color: #2CB7CA;
-    font-size: 0.2rem;
+    font-size: 0.26rem;
     padding: 0rem 0rem 0.1rem;
     float: right;
 }
@@ -592,7 +592,7 @@ bottom:0px;
 }
 .classify-fast-pop .weui-dialog .weui-dialog__bd p {
         color: #888;
-    font-size: .2rem;
+    font-size: .26rem;
     margin-top: .2rem;
     letter-spacing: 0.01rem;
 }

+ 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,

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

@@ -638,6 +638,8 @@ $(function () {
         $('.optional').remove()
         init();
         $(".tips_d_text").hide();
+        $(".btns .reset-btn").prop("disabled",false);
+        $(".btns .save-btn").prop("disabled",false);
     })
 
     // 7.锚点跳转
@@ -658,8 +660,20 @@ $(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){
+		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("已选择"+selectedCityLength+"个市,建议购买“全省”");
 			$(".tips_d_text").show();
 		}else{

+ 17 - 0
src/web/staticres/wxswordfish/share.js

@@ -195,6 +195,23 @@ function initShare(signature,openid,isentry,activecode,nickname,avatar,id){
 					// 用户取消分享后执行的回调函数
 				}
 			});
+			wx.getLocation({
+			  	type: 'wgs84', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
+			  	success: function (res) {
+			    	var latitude = res.latitude; // 纬度,浮点数,范围为90 ~ -90
+			    	var longitude = res.longitude; // 经度,浮点数,范围为180 ~ -180。
+					//生成地理位置
+                    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);
+						if(window.location.pathname.indexOf("/jylab/mainSearch")>-1){
+							SuperSearch.getHomeList(addComp.city);
+						}
+                    });
+			  }
+			});
 	    });
 		wx.error(function(res){
 		    // config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。

+ 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()
             })
             

+ 39 - 24
src/web/templates/weixin/search/mainSearch.html

@@ -19,10 +19,11 @@
 <script src="{{Msg "seo" "cdn"}}/js/rem.js?v={{Msg "seo" "version"}}"></script>
 <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"}}"></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"}}1022"></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"}}">
@@ -65,7 +66,7 @@
 	$(function(){
 		//dev2.8.5
         var swiper1 = new Swiper('#swiper1',{
-            autoplay: 5000,
+            autoplay: 3000,
             effect: 'fade',
             pagination: '.swiper-pagination',
             paginationClickable: true,
@@ -281,7 +282,7 @@
 	<div class="home">
         <div class="top">
             <div class="home_search">
-                <div class="home_search_left">
+                <div class="home_search_left inp-search">
                     <img class="icon_search" src="/images/search/home_search.png" alt="">
                     <span>示例:税务局 软件</span>
                 </div>
@@ -292,14 +293,28 @@
             <div class="home_banner">
                 <div class="swiper-container lunbo" id="swiper1">
                     <div class="swiper-wrapper">
-                        <div class="swiper-slide"><a href="#"><img src="/images/search/banner_1.png" alt=""></a></div>
-                        <div class="swiper-slide"><a href="#"><img src="/images/search/banner_2.png" alt=""></a></div>
-                        <div class="swiper-slide"><a href="#"><img src="/images/search/banner_3.png" alt=""></a></div>
+						<!--轮播广告-->
                     </div>
                     <div class="swiper-pagination custorm_dot"></div>
                 </div>
             </div>
         </div>
+		{{$s_top:=(Ad "jy-wxsearch-home-top" -1)}}
+		<script>
+			var ADTopList={{$s_top}}
+			if (ADTopList!=null){
+				var adhtml = '';
+				for(var i=0;i<ADTopList.length;i++){
+					adhtml+='<div class="swiper-slide">'
+						+'<a href="'+ADTopList[i]["s_link"]+'">'
+						+'<img src="'+ADTopList[i]["s_pic"]+'" alt="">'
+						+'</a></div>'
+				}
+				if(adhtml!=""){
+					$(".home_banner .swiper-wrapper").html(adhtml);
+				}
+			}
+		</script>
         <!-- 导航菜单 -->
         <div class="home_tab">
             <div class="tab_container">
@@ -365,20 +380,20 @@
 	<!--2.8.5  end-->
 	<!--<div onclick="window.location.href='/supportJy'" style="font-size:15px;background-color: #FFB900;line-height: 40px;z-index: 99;color: #fff;border-radius: 3px;bottom: 80px;right: 10px;left:10px;position: fixed;"><img src="/images/search/laba.png" style="width: 23px;margin:0px 10px;">好几天没有推送消息了,真相是......</div>-->
 	<!--头部-->
-		<div class="search-header">
+	<div class="search-header hide">
 		<!--搜索-->
-			<div class="search-tontrol">
-				<div>
-					<input class="inp-search" type="text" name="" value="" maxlength="50" placeholder="示例:税务局 软件" readonly/>
-				</div>
-				<!--点击关闭-->
-				<span id="seaClose" class="close"></span>
-				<a class="rightHref">
-				</a>
+		<div class="search-tontrol">
+			<div>
+				<input class="inp-search" type="text" name="" value="" maxlength="50" placeholder="示例:税务局 软件" readonly/>
 			</div>
+			<!--点击关闭-->
+			<span id="seaClose" class="close"></span>
+			<a class="rightHref">
+			</a>
 		</div>
+	</div>
 
-	<section class="content">
+	<section class="content hide">
 		<ul>
 			<li>
 				<a>
@@ -1089,23 +1104,23 @@
             SuperSearch.init(true,true,true);
         });
 		//点击帮助
-	    $(".rightHref").click(function(){
+	    $(".home_search_right").click(function(){
 	        window.open("http://mp.weixin.qq.com/mp/homepage?__biz=MzIyNTM1NDUyNw==&hid=2&sn=379fc869080a36d9d0798a3d4fb9a63a#wechat_redirect");
 			event.stopPropagation();
 	    });
 	    //数据导出页面
-	    $(".content ul li a:eq(1)").on('click', function () {
+	    $(".tab_container  a:eq(1)").on('click', function () {
 			window.location.href='/front/wx_dataExport/toSieve';
 	    });
+	    //剑鱼标讯
+	    $(".tab_container a:eq(2)").on('click', function () {
+			window.location.href='/swordfish/historypush';
+	    });
 	    //APP下载跳转到关于剑鱼标讯
-	    $(".content ul li a:eq(2)").on('click', function () {
+	    $(".tab_container a:eq(3)").on('click', function () {
 			// window.location.href='https://www.jianyu360.com/jyapp/free/download/normal?source=weixinAutoRpl';
 			window.location.href='/swordfish/about?flag=1&come=1';
 	    });
-		//拉新 2019-10-21 拉新活动结束 注释
-	    //$(".content ul li a:eq(3)").on('click', function () {
-		//	window.location.href='https://mp.weixin.qq.com/s/ACvQRxKeLYl_DuPuvvqIXQ';
-	    //});
 	//});
 	function checkIsOpen(){
 		$(".content ul li a:eq(0)").unbind("tap");
@@ -1115,7 +1130,7 @@
 	    $.post("/jylab/supsearch/getstatus?t="+new Date().getTime(),function(result){
 			onceFlag_tablepro=result.tablepro;
 			//中标企业搜索跳转
-		    $(".content ul li a:eq(0)").on("tap",function(){
+		    $(".tab_container a:eq(0)").on("tap",function(){
 				EntSearch.clearSessionStorage();
 				EntSearch.init(true,true,true);
 		    });	  

+ 3 - 6
src/web/templates/weixin/vipsubscribe/choose_area.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html style="height: 100%">
 
 <head>
     <meta charset="utf-8">
@@ -15,7 +15,7 @@
     <link rel="stylesheet" href="/vipsubscribe/css/choose_area.css?v={{Msg "seo" "version"}}">
 </head>
 
-<body>
+<body style="height: 100%">
 <div id="choose_area">
     <div class="result">
         <!-- 首次购买 显示"已选择" -----  升级订阅显示"已新增" -->
@@ -609,7 +609,6 @@
             let pHeight = $('.result_text').height()
             let minHeight = $('.result_text').css('min-height')
             let rows = Math.round(Math.round(pHeight) / parseFloat(minHeight));
-            $(".select-area-box .area-list").css("margin-top", $('.result_text').height() + 25);
             console.log("高度:" + pHeight, "最小高度" + minHeight, "行数:" + rows)
             if (rows == 1) {
                 $('.packup').hide()
@@ -636,14 +635,12 @@
                 $(".result").css("padding-bottom", "0.3rem")
                 $(this).hide();
                 $('.packup').show()
-                $(".select-area-box .area-list").css("margin-top", $('.result_text').height() + 25);
             })
             $('.packup').click(function () {
                 $(".result").css("padding-bottom", "0.2rem")
                 $('.result_text').addClass('line_two')
                 $(this).hide();
                 $('.detail').show()
-                $(".select-area-box .area-list").css("margin-top", $('.result_text').height() + 25);
             })
             $("body").on('click', '.slide a', function () {
                 var s = $(this).html()
@@ -716,7 +713,7 @@
                     }
                 } else {
                     $(this).parent('div').siblings('.tab').children().children('.checkbox').prop(
-                        'checked', false)
+                        'checked', false).removeClass('half');
                 }
                 AreaChoose.isAllSelected()
                 AreaChoose.getResult($(this).parent('div').siblings('.tab').find('.province').text()) //出入选择的省份

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

@@ -138,7 +138,7 @@
                     <strong class="weui-dialog__title">快速导入</strong>
                 </div>
                 <div class="weui-dialog__bd">
-                    快速导入可将免费版招标订阅内所设置的关键词及其排除词一并导入至“未分类"关键词分类内,无需再次手动输入,简化您的订阅过程。
+                    快速导入可将免费版招标订阅内所设置的关键词及其排除词一并导入至“未分类"关键词分类内,无需再次手动输入,简化您的订阅过程。
 					<p style="color:#888;">注:地区与行业分类以VIP订阅设置内为准,不做导入。</p>
                 </div>
                 <div class="weui-dialog__ft">
@@ -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({
@@ -722,7 +720,7 @@
 		    var agent = navigator.userAgent.toLowerCase();
 		    var dialog = $('.classify-fast-pop .weui-dialog')
 		    if( /iphone|ipod|ipad|ios/.test(agent) ){
-		        dialog.css({ 'top': '30%' })
+		        dialog.css({ 'top': '40%' })
 		    } else {
 		        dialog.css({ 'top': '50%' })
 		    }

+ 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();

+ 9 - 2
src/web/templates/weixin/vipsubscribe/vip_purchase.html

@@ -190,7 +190,7 @@
                             </label>
                             <div class="number_box" id="number_box_month" data-numbox-step="1" data-numbox-min="1"
                                  data-numbox-max="12">
-                                <button class="weui-btn weui-btn_plain-default" type="button">
+                                <button class="weui-btn weui-btn_plain-default" type="button" disabled>
                                     <div class="jy_icon decrease"></div>
                                 </button>
                                 <span class="month_number">1</span>
@@ -433,6 +433,9 @@
 
                 if (!$.isEmptyObject(this.areaSelect) && !this.areaSelect["全国"] && !this.areaSelect["一个省"]) { //选择有行业信息 且不是全国
                     var tipTxt = "已选择 ";
+                    {{if eq .T.orderType 5 }}
+                    tipTxt = "已购买 ";
+                    {{end}}
                     if (provinceArr.length > 0) tipTxt += provinceArr.length + " 个省级区域";
                     if (cityArr.length > 0) {
                         if (provinceArr.length > 0) tipTxt += "、";
@@ -467,7 +470,11 @@
                     $(".choose_industry").val(data.join(" "));
                 }*/
                 if (this.industrySelect.length > 0 && this.industrySelect[0] != "全部行业" && this.industrySelect[0] != "一个行业") { //选择有行业信息
-                    $(".choose_industry").val("已选择 " + this.industrySelect.length + " 个行业");
+                    var tipTxt = "已选择 ";
+                    {{if eq .T.orderType 5 }}
+                    tipTxt = "已购买 ";
+                    {{end}}
+                    $(".choose_industry").val(tipTxt+ this.industrySelect.length + " 个行业");
                 } else if (this.industrySelect.length > 0 && this.industrySelect[0] == "全部行业") {
                     $(".choose_industry").val("全部行业");
                 } else {

+ 6 - 0
src/web/templates/weixin/vipsubscribe/vip_upgrade.html

@@ -295,6 +295,7 @@
 						},500)*/
 						checkPaySuccess(ordercode);
 					}
+				});
   			}   
 		}catch(e){
 		  console.log(e)
@@ -641,6 +642,9 @@
 				$("#area").attr("placeholder", areaHtml);
 			}else{
 				areaHtml = "已新增 "+ vipSubSelectArea.province +" 个省级区域、"+ cityLen +" 个地市";
+				if(Number(vipSubSelectArea.province) === 0 && Number(cityLen) === 0){
+					areaHtml = "请选择升级区域";
+				}
 				$("#area").attr("placeholder", areaHtml);
 			}
 	    }
@@ -1231,6 +1235,8 @@
 		    					if(cityLen > cityCount){
 					    			let reduce = cityLen - cityCount;
 					    			areasObj[province] = citys.slice(0, -reduce);
+					    		}else{
+					    			areasObj[province] = citys;
 					    		}
 		    				}
 		    			}