wangshan před 5 roky
rodič
revize
f000828475

+ 1 - 1
src/jfw/front/swordfish.go

@@ -35,7 +35,7 @@ const (
 	pc_maxPageNum     = 10 //招标搜索分页--最大页数
 	wx_maxPageNum     = 20
 	wx_pageSize       = 50
-	bidSearch_field_1 = `"_id","title","publishtime","toptype","subtype","type","area","s_subscopeclass"`
+	bidSearch_field_1 = `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass"`
 	bidSearch_field   = bidSearch_field_1 + `,"bidopentime","winner","buyer","bidamount","budget","projectname","projectcode","projectinfo"`
 	bidSearch_sort    = `{"publishtime":-1}`
 )

+ 2 - 1
src/jfw/public/historypush.go

@@ -449,12 +449,13 @@ func (h *historyPush) MakeHistoryDatas(userId, field string) (bool, []map[string
 	for k, v := range *list {
 		title := strings.Replace(v["title"].(string), "\n", "", -1)
 		area_check := util.ObjToString(v["area"])
+		city_check := util.ObjToString(v["city"])
 		if publishTitle[area_check+title] {
 			continue
 		} else {
 			publishTitle[area_check+title] = true
 		}
-		values = append(values, userId, util.ObjToString(v["_id"]), now.Unix(), keystr, area_check, "", 0, v["s_subscopeclass"])
+		values = append(values, userId, util.ObjToString(v["_id"]), now.Unix(), keystr, area_check, city_check, 0, v["s_subscopeclass"])
 		info := map[string]interface{}{
 			"area":             area_check,
 			"_id":              util.EncodeArticleId2ByCheck(util.ObjToString(v["_id"])),

+ 3 - 1
src/web/staticres/vipsubscribe/css/keyWord.css

@@ -468,4 +468,6 @@
     left: 50%;
     margin-left: -25px;
     width: 50px;
-}
+}
+.enter.addkeyWord{
+	margin-bottom: .2rem;

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

@@ -620,8 +620,8 @@
 .vip_index .content .subscribe_info .s_info_top .s_i_item .expand-box .icon-arrow {
   position: absolute;
   width: 1.14rem;
-  bottom: 0;
-  right: .1rem;
+  bottom: -0.08rem;
+  right: .05rem;
   text-align: right;
   font-size: .26rem;
   background: linear-gradient(90deg, rgba(255, 218, 177, 0) 0%, #ffdab1 100%);

+ 0 - 4
src/web/staticres/vipsubscribe/js/additionWord.js

@@ -174,8 +174,4 @@ $(function(){
 	        }
 	    })
 	}
-	(/iphone|ipod|ipad/i.test(navigator.appVersion)) && document.addEventListener('blur', (e) => {
-	    // 这里加了个类型判断,因为a等元素也会触发blur事件
-	    ['input', 'textarea'].includes(e.target.localName) && document.body.scrollIntoView(false)
-	}, true)
 })

+ 0 - 4
src/web/staticres/vipsubscribe/js/exclusiveWord.js

@@ -185,8 +185,4 @@ $(function(){
 	        }
 	    })
 	}
-	(/iphone|ipod|ipad/i.test(navigator.appVersion)) && document.addEventListener('blur', (e) => {
-	    // 这里加了个类型判断,因为a等元素也会触发blur事件
-	    ['input', 'textarea'].includes(e.target.localName) && document.body.scrollIntoView(false)
-	}, true)
 })

+ 118 - 116
src/web/staticres/vipsubscribe/js/keyWord.js

@@ -41,122 +41,124 @@ var reloadFunc = function(){
 
     // 添加 确认按钮的点击事件
     $('.content .addkeyWord .btn button:nth-child(2)').on('click', function () {
-        var keyWord = $('.addkeyWord input.enterOne').val();
-		if(keyWord==""){
-			return
-		}
-		if(kws_arr[keyWord]!=undefined){
-            weui.toast('您设置的关键词已存在,请调整后再添加。', {
-                duration: 2000,
-                className: 'custom-toast',
-                callback: function () { console.log('close') }
-            });
-			return
-		}
-        if(kws_name.length > 20){
-            weui.toast('关键词不能超过20字', {
-                duration: 2000,
-                className: 'custom-toast',
-                callback: function () { console.log('close') }
-            });
-        }
-        kws_name = keyWord;
-		kws_index = $(".showKeyWord li").length;
-        if(kws_index==0){
-            //分类首次添加关键词需重新获取分类索引
-            classify_index = a_items.length;
-        }
-		var _index = 0;
-		if($(".showKeyWord li").length>0){
-        	_index =  Number($(".showKeyWord li:first").find(".editKeyWord").attr("dataIndex")) + Number(1);
-		}
-        classify_name = $('.classify-r .classify-detail').text();
-        //保存关键词
-        kws_count = parseInt(kws_count) + 1;
-        if(kws_count>300){
-            weui.toast('您设置的关键词已超出最高上限,请调整后再添加。', {
-                duration: 2000,
-                className: 'custom-toast',
-                callback: function () { console.log('close') }
-            });
-        }else if (saveData("SK")){
-            // 设置状态 首次添加关键词
-            if(a_items.length==0){
-                setEmptyHistory();
-            }
-            //
-            doSessionData("",_index);
-            $(".add-keyword-container .addNewKeyword i").show();
-            //点击保存关键词,查看缓存中存的附加词 和排除词。
-            $(".kws_count").text(kws_count);
-            var html = `<li><div class="one"><div>
-                            <span>
-                                <strong> 关键词:</strong>
-                                <p class="key">${keyWord}</p>
-                            </span>`
-                if (addition_kws.length>0){
-                    html +='<span>'
-                                +'<strong> 附加词:</strong>'
-                                +'<p class="addition">'+addition_kws.join(" ")+'</p>'
-                                +'</span>'
-                }
-                if (not_kws.length>0){
-                    html +='<span>'
-                                +'<strong> 排除词:</strong>'
-                                +'<p class="notkey">'+not_kws.join(" ")+'</p>'
-                                +'</span>'
-                }
-                html +=`</div>
-                        <button class="editKeyWord"  dataIndex=`+_index+`><i class="iconfont icon-xiugai"></i> 修改</button>
-                        </div>
-                        <div class="modify">
-                        <textarea  name=""  rows="1"  placeholder="" maxlength="20">${keyWord}</textarea>`
-            if (addition_kws.length>0){
-                html +=`<button class="addAdjunctWord" onClick="toappendkey(this)">编辑 附加词<i>(`+addition_kws.length+`)</i></button>`
-            }else{
-                html +=`<button class="addAdjunctWord" onClick="toappendkey(this)">添加 附加词</button>`
-            }
-            if (not_kws.length>0){
-                html +=`<button class="addAdjunctWord" onClick="tonotkey(this)">编辑 排除词<i>(`+not_kws.length+`)</i></button>`
-            }else{
-                html +=`<button class="addAdjunctWord" onClick="tonotkey(this)">添加 排除词</button>`
-            }
-                html +=`<button class="deleteKey">删除</button><button class="ascertainKey" dataIndex=`+_index+` onclick="saveK(this)">确定</button></div></li>`
-            $('.showKeyWord > ul').prepend(html);
-            // 添加完成隐藏输入框
-            $(".enter.addkeyWord").hide();
-            // 还原状态
-            $('.enter.addkeyWord > input').val('')
-            //把kws_name,kws_index,addition_kws,not_kws初始化
-            kws_index = 0;
-            kws_name = "";
-            addition_kws = [];
-            not_kws = [];
-			//
-            var buttonDOM = $('.enter.addkeyWord .btn button')[1]
-            buttonDOM.style.opacity = .5
-            buttonDOM.setAttribute("disabled", true)
-            //保存关键词 查看关键词数量 未分类 超过20 100提示
-            if(classify_name.indexOf("未分类")>-1){
-                if((kws_tips==1&&$(".showKeyWord li").length>=20)||(kws_tips==20&&$(".showKeyWord li").length>=100)){
-                    //未分类 20个关键词提示,100个关键词提示
-                    showMeg();
-                    var param = {};
-                    param.classify_index = classify_index;
-                    if(kws_tips==1){
-                        param.kws_tips = 20;
-                    }else if(kws_tips==20){
-                        param.kws_tips = 100;
-                    }
-                    $.post("/subscribepay/afterPay/updateUserTips",param,function(r){
-                        if(r.flag){
-                            kws_tips = param.kws_tips;
-                            $(".classify").attr("tips",kws_tips);
-                        }
-                    })
-                }
-            }
-        }
+		setTimeout(function(){
+	        var keyWord = $('.addkeyWord input.enterOne').val();
+			if(keyWord==""){
+				return
+			}
+			if(kws_arr[keyWord]!=undefined){
+	            weui.toast('您设置的关键词已存在,请调整后再添加。', {
+	                duration: 2000,
+	                className: 'custom-toast',
+	                callback: function () { console.log('close') }
+	            });
+				return
+			}
+	        if(kws_name.length > 20){
+	            weui.toast('关键词不能超过20字', {
+	                duration: 2000,
+	                className: 'custom-toast',
+	                callback: function () { console.log('close') }
+	            });
+	        }
+	        kws_name = keyWord;
+			kws_index = $(".showKeyWord li").length;
+	        if(kws_index==0){
+	            //分类首次添加关键词需重新获取分类索引
+	            classify_index = a_items.length;
+	        }
+			var _index = 0;
+			if($(".showKeyWord li").length>0){
+	        	_index =  Number($(".showKeyWord li:first").find(".editKeyWord").attr("dataIndex")) + Number(1);
+			}
+	        classify_name = $('.classify-r .classify-detail').text();
+	        //保存关键词
+	        kws_count = parseInt(kws_count) + 1;
+	        if(kws_count>300){
+	            weui.toast('您设置的关键词已超出最高上限,请调整后再添加。', {
+	                duration: 2000,
+	                className: 'custom-toast',
+	                callback: function () { console.log('close') }
+	            });
+	        }else if (saveData("SK")){
+	            // 设置状态 首次添加关键词
+	            if(a_items.length==0){
+	                setEmptyHistory();
+	            }
+	            //
+	            doSessionData("",_index);
+	            $(".add-keyword-container .addNewKeyword i").show();
+	            //点击保存关键词,查看缓存中存的附加词 和排除词。
+	            $(".kws_count").text(kws_count);
+	            var html = `<li><div class="one"><div>
+	                            <span>
+	                                <strong> 关键词:</strong>
+	                                <p class="key">${keyWord}</p>
+	                            </span>`
+	                if (addition_kws.length>0){
+	                    html +='<span>'
+	                                +'<strong> 附加词:</strong>'
+	                                +'<p class="addition">'+addition_kws.join(" ")+'</p>'
+	                                +'</span>'
+	                }
+	                if (not_kws.length>0){
+	                    html +='<span>'
+	                                +'<strong> 排除词:</strong>'
+	                                +'<p class="notkey">'+not_kws.join(" ")+'</p>'
+	                                +'</span>'
+	                }
+	                html +=`</div>
+	                        <button class="editKeyWord"  dataIndex=`+_index+`><i class="iconfont icon-xiugai"></i> 修改</button>
+	                        </div>
+	                        <div class="modify">
+	                        <textarea  name=""  rows="1"  placeholder="" maxlength="20">${keyWord}</textarea>`
+	            if (addition_kws.length>0){
+	                html +=`<button class="addAdjunctWord" onClick="toappendkey(this)">编辑 附加词<i>(`+addition_kws.length+`)</i></button>`
+	            }else{
+	                html +=`<button class="addAdjunctWord" onClick="toappendkey(this)">添加 附加词</button>`
+	            }
+	            if (not_kws.length>0){
+	                html +=`<button class="addExclusion" onClick="tonotkey(this)">编辑 排除词<i>(`+not_kws.length+`)</i></button>`
+	            }else{
+	                html +=`<button class="addExclusion" onClick="tonotkey(this)">添加 排除词</button>`
+	            }
+	                html +=`<button class="deleteKey">删除</button><button class="ascertainKey" dataIndex=`+_index+` onclick="saveK(this)">确定</button></div></li>`
+	            $('.showKeyWord > ul').prepend(html);
+	            // 添加完成隐藏输入框
+	            $(".enter.addkeyWord").hide();
+	            // 还原状态
+	            $('.enter.addkeyWord > input').val('')
+	            //把kws_name,kws_index,addition_kws,not_kws初始化
+	            kws_index = 0;
+	            kws_name = "";
+	            addition_kws = [];
+	            not_kws = [];
+				//
+	            var buttonDOM = $('.enter.addkeyWord .btn button')[1]
+	            buttonDOM.style.opacity = .5
+	            buttonDOM.setAttribute("disabled", true)
+	            //保存关键词 查看关键词数量 未分类 超过20 100提示
+	            if(classify_name.indexOf("未分类")>-1){
+	                if((kws_tips==1&&$(".showKeyWord li").length>=20)||(kws_tips==20&&$(".showKeyWord li").length>=100)){
+	                    //未分类 20个关键词提示,100个关键词提示
+	                    showMeg();
+	                    var param = {};
+	                    param.classify_index = classify_index;
+	                    if(kws_tips==1){
+	                        param.kws_tips = 20;
+	                    }else if(kws_tips==20){
+	                        param.kws_tips = 100;
+	                    }
+	                    $.post("/subscribepay/afterPay/updateUserTips",param,function(r){
+	                        if(r.flag){
+	                            kws_tips = param.kws_tips;
+	                            $(".classify").attr("tips",kws_tips);
+	                        }
+	                    })
+	                }
+	            }
+	        }
+		},150)
     })
     // 编辑
     $(".showKeyWord").on('click', '.editKeyWord', function (e) {

+ 20 - 1
src/web/templates/weixin/dataExport/dataExport_previewData.html

@@ -135,6 +135,16 @@
 			    font-size: 16px;
 				text-align: center;
 			}
+			.noData_{
+				width: 200px;
+			    height: 50px;
+			    position: absolute;
+			    top: 40%;
+			    left: 50%;
+			    margin-left: -100px;
+			    font-size: 16px;
+				text-align: center;
+			}
 		</style>
 	</head>
 	<body>
@@ -154,6 +164,7 @@
 			<div class="sy">
 			</div>
 		</div>
+		<div class="noData_" style="display:none;">暂无数据</div>
 		<div class="noData" style="display:none;">今日已超出预览次数</div>
 		<script src="{{Msg "seo" "cdn"}}/wx_dataExport/js/zepto.js"></script>
 		<script>
@@ -239,9 +250,17 @@
 							}
 						});
 						makeP();
+					}else if(r.res.msg){
+						var msg = r.res.msg
+						if(msg=="超出预览次数"){
+							$(".tabs").css({"min-width":"0px","display": "none"});
+							$(".noData").show();
+							loading(false);
+							return
+						}
 					}else{
 						$(".tabs").css({"min-width":"0px","display": "none"});
-						$(".noData").show();
+						$(".noData_").show();
 						loading(false);
 					}
 				})

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

@@ -68,7 +68,7 @@
     </div>
     <script src="{{Msg "seo" "cdn"}}/js/jquery-3.2.1.min.js?v=1412"></script>
     <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/weui.min.js"></script>
-    <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/additionWord.js"></script>
+    <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/additionWord.js?v={{Msg "seo" "version"}}"></script>
 	{{include "/common/weixin.html"}}
 	<script src="{{Msg "seo" "cdn"}}/wxswordfish/share.js?v={{Msg "seo" "version"}}"></script>
     <script>

+ 53 - 48
src/web/templates/weixin/vipsubscribe/keyWord.html

@@ -636,52 +636,54 @@
         }
         //保存关键词
         function saveK(th){
-            var $this = $(th);
-            kws_name = $(th).siblings('textarea').val();
-			if(kws_name==""){
-                weui.toast('您设置的关键词不能为空,请调整后再添加。', {
-                    duration: 2000,
-                    className: 'custom-toast',
-                    callback: function () { console.log('close') }
-                });
-				return
-			}
-			var _index =  Number($this.attr("dataindex"));
-			if(kws_arr[kws_name]!=undefined&&kws_arr[kws_name]!=(_index+"-"+classify_index)){
-                weui.toast('您设置的关键词已存在,请调整后再添加。', {
-                    duration: 2000,
-                    className: 'custom-toast',
-                    callback: function () { console.log('close') }
-                });
-				return
-			}
-            if(kws_name.length > 20){
-                weui.toast('关键词不能超过20字', {
-                    duration: 2000,
-                    className: 'custom-toast',
-                    callback: function () { console.log('close') }
-                });
-            }else{
-                if(saveData('SK')){
-					//$this.attr("dataindex",kws_index);
-                    $this.parent().siblings().find('.key').text(kws_name)
-                    $this.parent().hide().siblings().show()
-                	$(".add-keyword-container .addNewKeyword i").show();
-                    //
-                    doSessionData("",_index);
-		            //把kws_name,kws_index,addition_kws,not_kws初始化
-		            kws_index = 0;
-		            kws_name = "";
-		            addition_kws = [];
-		            not_kws = [];
-                }else{
-		            weui.toast('保存出错,稍后再试', {
-		                duration: 2000,
-		                className: 'custom-toast',
-		                callback: function () { console.log('close') }
-		            });
-                }
-            }
+			setTimeout(function(){
+	            var $this = $(th);
+	            kws_name = $(th).siblings('textarea').val();
+				if(kws_name==""){
+	                weui.toast('您设置的关键词不能为空,请调整后再添加。', {
+	                    duration: 2000,
+	                    className: 'custom-toast',
+	                    callback: function () { console.log('close') }
+	                });
+					return
+				}
+				var _index =  Number($this.attr("dataindex"));
+				if(kws_arr[kws_name]!=undefined&&kws_arr[kws_name]!=(_index+"-"+classify_index)){
+	                weui.toast('您设置的关键词已存在,请调整后再添加。', {
+	                    duration: 2000,
+	                    className: 'custom-toast',
+	                    callback: function () { console.log('close') }
+	                });
+					return
+				}
+	            if(kws_name.length > 20){
+	                weui.toast('关键词不能超过20字', {
+	                    duration: 2000,
+	                    className: 'custom-toast',
+	                    callback: function () { console.log('close') }
+	                });
+	            }else{
+	                if(saveData('SK')){
+						//$this.attr("dataindex",kws_index);
+	                    $this.parent().siblings().find('.key').text(kws_name)
+	                    $this.parent().hide().siblings().show()
+	                	$(".add-keyword-container .addNewKeyword i").show();
+	                    //
+	                    doSessionData("",_index);
+			            //把kws_name,kws_index,addition_kws,not_kws初始化
+			            kws_index = 0;
+			            kws_name = "";
+			            addition_kws = [];
+			            not_kws = [];
+	                }else{
+			            weui.toast('保存出错,稍后再试', {
+			                duration: 2000,
+			                className: 'custom-toast',
+			                callback: function () { console.log('close') }
+			            });
+	                }
+	            }
+			},150)
         }
         //保存数据
         function saveData(actionType){
@@ -778,7 +780,7 @@
 		    $('input.classify-keyword').val(currentClassifyName).focus()
 		}
     </script>
-    <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/keyWord.js?v={{Msg "seo" "version"}}21"></script>
+    <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/keyWord.js?v={{Msg "seo" "version"}}23"></script>
     <script>
         // 设置一条空记录,用户第一次进入添加关键词点击确定时候调用
         function setEmptyHistory() {
@@ -842,6 +844,8 @@
                 // 显示添加关键词的输入框
                 $(".enter.addkeyWord").find(".btnChoose button").eq(0).html('添加 附加词');
                 $(".enter.addkeyWord").find(".btnChoose button").eq(1).html('添加 排除词');
+            	$(".enter.addkeyWord").find(".btn button").eq(1).css({"opacity":".5"});
+            	$(".enter.addkeyWord").find(".btn button").eq(1).attr("disabled", true);
                 $(".enter.addkeyWord").find("input").val("");
                 $(".enter.addkeyWord").show();
                 $('.enterOne').focus();
@@ -852,7 +856,8 @@
                 // 添加一条空历史记录
                 history.pushState({id:1}, "","");
                 classify_name = $(this).find('.classify-item-l').text();
-                classify_index = $(this).index()
+                classify_index = $(this).index();
+				kws_index = 0;
                 //展示此关键词信息
 				$(".add-keyword-container .addNewKeyword i").show();
                 toSetKws();

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

@@ -15,7 +15,7 @@
     <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}" />
     <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}" />
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/public.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/vip_index.css?v={{Msg "seo" "version"}}2">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/vip_index.css?v={{Msg "seo" "version"}}22">
 </head>
 
 <body style="visibility:hidden;">

+ 18 - 4
src/web/templates/weixin/vipsubscribe/vip_viewPage.html

@@ -160,6 +160,7 @@
 		//
 		function hasNoData(){
 			$(".listcontent").hide();
+			$(".findnull").css({ 'top': '20%' })
 			$(".findnull").css("display","block");
 			$(".tipHeader").hide();
 		}
@@ -288,6 +289,7 @@
 		
 		//
 		function appendListHtml(html,pageNum){
+			$(".tipHeader").show();
 			pageNumCache = pageNum;
 		    // 插入数据到页面,放到最后面
 		    var htmlObj = $(html[0]);
@@ -340,6 +342,7 @@
 	}
 	.findnull{
 		display:none;
+		position:relative;
 	}
 	body{
 		color: #333;
@@ -375,21 +378,32 @@
 		max-height: 45px;
 		overflow: hidden;
 	}
+	#back{
+		width: 200px;
+	    position: relative;
+	    left: 50%;
+	    margin-left: -100px;
+	    padding: .2rem .8rem;
+	    color: #2cb7ca;
+	    border: 1px solid #2cb7ca;
+	    border-radius: .6rem;
+	    margin-top: .4rem;
+	}
 </style>
 </head>
 <body>
-	<div class="tipHeader">根据您的设置,为您推荐的预览信息,点击标题可查看详情。</div>
+	<div class="tipHeader" style="display:none;">根据您的设置,为您推荐的预览信息,点击标题可查看详情。</div>
 	<div class="listcontent">
 		<div id="list"></div>
 	</div>
 
-	<span class="text-center findnull" style="margin-top: 5rem;">
+	<span class="text-center findnull">
 		<div>
 			<img style="width:150px;margin:50px 0 50px 0;" src="{{Msg "seo" "cdn"}}/images/wx/jysorry_1.png">
 		</div>
 		<span style="color:#1d1d1d;font-size:16px;">没有找到和你订阅设置内容有关的信息<br/></span>
-		<div onClick="window.history.go(-1)" style="width: 200px;position: relative;left: 50%;margin-left: -100px;" class="text-center">
-			<img style="width: 200px;margin-top: 25px;pointer-events: none;" src="{{Msg "seo" "cdn"}}/images/wx/jydyshz.png">
+		<div onClick="window.history.go(-2)" id="back" class="text-center">
+			返回修改VIP设置
 		</div>
 	</span>
 	{{include "/common/baiducc.html"}}

+ 1 - 2
src/web/templates/weixin/wxkeyset/index.html

@@ -698,10 +698,9 @@ function saveSeniorset(r){
 }
 //
 function tointroducepage(){
-	window.location.href = "/front/vipsubscribe/introducePage";
+	window.location.replace("/front/vipsubscribe/introducePage");
 }
 
-
 </script>
 </head>
 <body class="keysetpage">