Ver código fonte

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

zhangxinlei1996 5 anos atrás
pai
commit
a00b4dd88b

+ 6 - 21
src/jfw/modules/subscribepay/src/util/vrew.go

@@ -234,34 +234,19 @@ func getKeyWordArrFromDbResult(a_items []interface{}) (arr []ViewKeyWord) {
 //初始化vip订阅关键词
 func MergeKws(userId string) {
 	defer qutil.Catch()
-	if userId == "" {
+	if userId == "" { //11-11 取消此操作
 		return
 	}
 	data, ok := MQFW.FindById("user", userId, `{"o_jy":1,"o_vipjy":1}`)
-	var o_jy map[string]interface{}
 	var o_vipjy map[string]interface{}
 	if ok && data != nil && len(*data) > 0 {
 		o_vipjy, _ = (*data)["o_vipjy"].(map[string]interface{})
 		a_items, _ := o_vipjy["a_items"].([]interface{})
-		o_jy, _ = (*data)["o_jy"].(map[string]interface{})
-		a_key, _ := o_jy["a_key"].([]interface{})
-		if a_items == nil && len(a_key) > 0 { //首次
-			var o_kws = make(map[string]interface{})
-			var _key = make([]map[string]interface{}, len(a_key))
-			o_kws["s_item"] = "未分类"
-			for k, v := range a_key {
-				keyarr := v.(map[string]interface{})
-				_key[k] = map[string]interface{}{"key": keyarr["key"].([]interface{})}
-			}
-			o_kws["a_key"] = _key
-			o_kws["i_tips"] = 0
-			if o_kws != nil && len(o_kws) > 0 {
-				a := MQFW.UpdateById("user", userId, bson.M{
-					"$push": bson.M{"o_vipjy.a_items": o_kws},
-					"$set":  bson.M{"o_vipjy.i_matchway": 1, "o_vipjy.i_ratemode": 1, "o_vipjy.i_wxpush": 1, "o_vipjy.i_projectmatch": 0, "o_vipjy.l_modifydate": time.Now().Unix()},
-				})
-				log.Println(a)
-			}
+		if a_items == nil { //首次
+			a := MQFW.UpdateById("user", userId, bson.M{
+				"$set": bson.M{"o_vipjy.i_matchway": 1, "o_vipjy.i_ratemode": 1, "o_vipjy.i_wxpush": 1, "o_vipjy.i_projectmatch": 0, "o_vipjy.a_infotype": []string{}, "o_vipjy.a_items": []string{}, "o_vipjy.l_modifydate": time.Now().Unix()},
+			})
+			log.Println(a)
 		}
 	}
 }

+ 2 - 1
src/web/staticres/css/wxkeyset.css

@@ -66,7 +66,8 @@ html.hidden,body.hidden,.keysetpage .keyWordContent.adjustment{
 	position: absolute;
     left: 0px;
     right: 0px;
-    top: 0px;
+/*    top: 0px;*/
+    top: 47px;
 	z-index: 1;
 }
 .keysetpage .keyWordContent.adjustment{

+ 11 - 0
src/web/staticres/vipsubscribe/css/messageType.css

@@ -118,3 +118,14 @@ body .industry .resetOne button:first-child {
   background: #fff;
   color: #2cb7ca;
 }
+/*----*/
+.result {
+    position: fixed;
+    padding: .2rem .3rem;
+    font-size: .26rem;
+    text-align: justify;
+    width: 100%;
+    background: rgba(245,244,249,1);
+    z-index: 999;
+	    top: 0px;
+}

+ 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, .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, .open_remind .remind_box {
   display: flex;
   align-items: center;
   justify-content: space-between;
@@ -498,3 +498,27 @@ text-decoration: none;
   border-radius: .32rem;
   text-align: center;
 }
+
+.nv_renew_toast > div {
+  padding: .15rem .3rem;
+  color: #fff;
+  font-size: .26rem;
+}
+
+.nv_renew_toast > div i {
+  font-size: .32rem;
+}
+
+.nv_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;
+}
+.nv_renew_toast > div {
+  background-color: #FE737A;
+}

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

@@ -246,8 +246,8 @@
 }
 
 .custom-dialog .weui-dialog__hd {
-  background: #F5F4F9;
-  padding: .17rem 0;
+  background: #fff;
+  padding:  0.38rem 0 0;
   color: #000;
   font-size: .34rem;
   text-align: center;
@@ -726,4 +726,33 @@ i.icon-wenhao{
     color: #2CB7CA;
 /*    padding-top: .05rem;*/
     margin-left: .2rem;
+}
+
+.vip_index .footer .nv_renew_toast {
+  width: 100%;
+}
+
+.vip_index .footer .nv_renew_toast div {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: .15rem .3rem;
+  color: #fff;
+  font-size: .26rem;
+  background-color: #FE737A;
+}
+
+.vip_index .footer .nv_renew_toast div i {
+  font-size: .32rem;
+}
+
+.vip_index .footer .nv_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;
 }

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

@@ -66,6 +66,10 @@ var reloadFunc = function(){
                 callback: function () { console.log('close') }
             });
         }else if (saveData("SK")){
+            // 设置状态 首次添加关键词
+            if(a_items.length==0){
+                setEmptyHistory();
+            }
             //
             doSessionData();
             $(".add-keyword-container .addNewKeyword").show();
@@ -112,10 +116,6 @@ var reloadFunc = function(){
             var buttonDOM = $('.enter.addkeyWord .btn button')[0]
             buttonDOM.style.opacity = .5
             buttonDOM.setAttribute("disabled", true)
-            // 设置状态 首次添加关键词
-            if(a_items.length==0){
-                setEmptyHistory();
-            }
             //保存关键词 查看关键词数量 未分类 超过20 100提示
             if(classify_name.indexOf("未分类")>-1){
                 if((kws_tips==0&&$(".showKeyWord li").length>=20)||(kws_tips==20&&$(".showKeyWord li").length>=100)){

+ 24 - 4
src/web/templates/weixin/historypush.html

@@ -125,10 +125,14 @@
 						}
 						if(parseInt(data.isOnTail)!=1){
 							$('.free7days_pic').append("<style>.free7days_pic:after{display:none}</style>");
-						}
-						if(parseInt(data.isExpire)!=0){
-							$(".isExpire").text(parseInt(data.isExpire));
-							$(".renew_toast").show();
+							if(parseInt(data.isExpire)!=0){
+								$(".isExpire").text(parseInt(data.isExpire));
+								$(".renew_toast").show();
+							}
+						}else{
+							if(parseInt(data.isExpire)!=0){
+								$(".nv_renew_toast").show();
+							}
 						}
 						$(".vip_set").show();
 						$(".tab_left .area").show();
@@ -611,6 +615,11 @@
 			setSessionStorage();
 			window.location.href="/weixin/pay/renewPayPage";
 		}
+		//购买
+		function topay(){
+			setSessionStorage();
+			window.location.href="/weixin/pay/vipsubscribe_new";
+		}
 	</script>
 	<style type="text/css">
 		.findnull{
@@ -851,6 +860,14 @@
       			<a onclick="torepay()">去续费</a>
       		</div>
       	</div>
+      	<!-- 试用用户 到期 去购买 提醒 -->
+      	<div class="nv_renew_toast" style="display: none;">
+      		<div>
+      			<i class="icon iconfont" id="nv_close_renew">&#xe61a;</i>
+      			<span>VIP订阅服务试用已过期,请及时购买!</span>
+      			<a onclick="topay()">去购买</a>
+      		</div>
+      	</div>
       	<!-- 设置关键词 -->
       	<div class="set_keyword" style="display: none;">
       		<div>
@@ -1135,6 +1152,9 @@
             $('#close_renew').on('click',() =>{
             	$('.renew_toast').hide()
             })
+            $('#nv_close_renew').on('click',() =>{
+            	$('.nv_renew_toast').hide()
+            })
             
         })
     </script>

+ 24 - 8
src/web/templates/weixin/vipsubscribe/choose_area_upgrade.html

@@ -362,7 +362,7 @@
         </div>
         <div class="tips_btn">
             <div class="tips_discount">
-                <div class="tips_d_money" style="display: block">&yen;38</div>
+                <!--<div class="tips_d_money" style="display: block">&yen;38</div>-->
                 <div class="tips_d_text citys">已选择4个市,建议购买“全省”更划算哦~</div>
                 <div class="tips_d_text all">已选择10个省,建议购买“全国”更划算哦~</div>
             </div>
@@ -558,6 +558,10 @@
                       children:cityArr
                   })
               }
+              if(activeLeng > 0){
+              	$(".tips_btn .btns .reset-btn").removeAttr("disabled");
+              	$(".tips_btn .btns .save-btn").removeAttr("disabled");
+              }
           })
           //数组对象去重
           let obj = {};
@@ -646,16 +650,18 @@
           })
           // 如果循环结束仍为true说明 没有全部都被选中
           if (_f) {
-              $('.other').prop('checked', true);
+//            $('.other').prop('checked', true);
+				$(".tips_btn .btns .reset-btn").attr("disabled","disabled");
+        		$(".tips_btn .btns .save-btn").attr("disabled","disabled");
           }
         },
         getNationwide:function(){/*默认选中全国 */
-          $('.other').prop('checked', true);
-          $('.tab_content').slideUp(500)
-          $('.tab span i').css({
-              "display":"inline-block",
-              "transform":"rotate(0)"
-          });
+//        $('.other').prop('checked', true);
+//        $('.tab_content').slideUp(500)
+//        $('.tab span i').css({
+//            "display":"inline-block",
+//            "transform":"rotate(0)"
+//        });
         },
         isOpen:function(){
           let pHeight = $('.result_text').height()
@@ -780,6 +786,7 @@
                 $(".other").trigger("click");
               }
             })
+            //
         },
         reset:function(){
            var checked = $(".other").is(':checked');
@@ -840,6 +847,15 @@
 		    return false;
 		}
 	    //
+	    if($(".result_name").text()===""){
+	    	$(".tips_btn .btns .reset-btn").attr("disabled","disabled");
+        	$(".tips_btn .btns .save-btn").attr("disabled","disabled");
+	    }
+	    
+	    if(sessionStorage.vipSubSelectArea!==undefined && sessionStorage.vipSubSelectArea!==""){
+	    	$(".tips_btn .btns .reset-btn").removeAttr("disabled");
+            $(".tips_btn .btns .save-btn").removeAttr("disabled");
+	    }
 
     </script>
 </body>

+ 11 - 7
src/web/templates/weixin/vipsubscribe/choose_industry_upgrade.html

@@ -34,7 +34,7 @@
                         <li class="list_item" id="all">
                             <div class="item_label"></div>
                             <div class="item_industry_list">
-                                <button class="industry_item active">全部行业</button>
+                                <button class="industry_item">全部行业</button>
                             </div>
                         </li>
                         <li class="list_item" id="A">
@@ -241,7 +241,7 @@
             </div>
             <div class="tips_btn">
                 <div class="tips_discount">
-                    <div class="tips_d_money" style="display: block">&yen;38</div>
+                    <!--<div class="tips_d_money" style="display: block">&yen;38</div>-->
                     <div class="tips_d_text">已选择4个行业,建议购买“全部行业”更划算哦~</div>
                 </div>
                 <div class="btns">
@@ -251,7 +251,7 @@
             </div>
         </main>
         <script src="/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
-        <script src="/vipsubscribe/js/fastclick.js?v={{Msg "seo" "version"}}"></script>
+        <!--<script src="/vipsubscribe/js/fastclick.js?v={{Msg "seo" "version"}}"></script>-->
         <script src="/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
         <script src="/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
         <script>
@@ -303,9 +303,11 @@
                 $('.result .result_name').text(selectedStr)
 
                 if (selectedArr.length === 0) {
-                    var allButton = $('#all button')
-                    allButton.trigger('click')
-                    $('.result .result_name').text(allButton.text())
+//                  var allButton = $('#all button')
+//                  allButton.trigger('click')
+//                  $('.result .result_name').text(allButton.text())
+					$(".tips_btn .btns .save-btn").attr("disabled","disabled");
+					$(".tips_btn .btns .reset-btn").attr("disabled","disabled");
                 }
                 if (selectedArr.length === buttons.length - 1) {
                     // 除全部行业外所有按钮都被选中了
@@ -320,7 +322,9 @@
                 $($('.industry_item')).each(function (index, dom) {
                 	if(canclick){
                 		if (v!="全部行业"){
-	                      $('#all').children().children('button').removeClass('active');
+	                      	$('#all').children().children('button').removeClass('active');
+	                      	$(".tips_btn .btns .save-btn").removeAttr("disabled","disabled");
+							$(".tips_btn .btns .reset-btn").removeAttr("disabled","disabled");
 	                    }
                 		if (v == $(dom).text()) {
 	                       $(dom).addClass("active").attr({"disabled":!canclick})

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

@@ -279,7 +279,7 @@
 					if(a_items.length==0){
 		                window.history.go(-1)
 		            }
-		            var loading = weui.loading('loading...', {
+		            var loading = weui.loading('', {
 		                className: 'custom-classname'
 		            })
 		            $('.classify-show-pop').hide();
@@ -539,7 +539,6 @@
                         kwsHtml +='<div class="modify" style="display: none;">'
                     }
 					var p = kws_arr[_keyArr[i]["key"].join(" ")].split("-")[0]
-					console.log("p:"+p)
                     kwsHtml +='<textarea name="" rows="1" placeholder="" maxlength="20">'+_keyArr[i]["key"].join(" ")+'</textarea>'
                                 +'<button class="addAdjunctWord" onclick="toappendkey(this)">'+ak_remark+' 附加词 <i class="appendkey '+ak_showClass+'">('+appendkeylth+')</i></button>'
                                 +'<button class="addExclusion" onclick="tonotkey(this)">'+nk_remark+' 排除词 <i class="notkey '+nk_showClass+'">('+notkeylth+')</i></button>'
@@ -694,7 +693,6 @@
             //删除关键词
             if(t!="DK"){
 				kws_arr[kws_name] = kws_index+"-"+classify_index
-				console.log(kws_index,"----",$(".showKeyWord li").length)
                 if(kws_index == $(".showKeyWord li").length){
                     //新加
                     var karr = {"key":kws_name.split(" "),"appendkey":addition_kws,"notkey":not_kws}
@@ -794,11 +792,11 @@
             })
 
             // 点击分类目录的每一项,进入对应列表
-            $('.classify-list').on('click', '.classify-item-r', function() {
+            $('.classify-list').on('click', '.classify-item', function() {
                 // 添加一条空历史记录
                 history.pushState({id:1}, "","");
-                classify_name = $(this).parent('div').find('.classify-item-l').text();
-                classify_index = $(this).parent().parent("li.classify-item").index()
+                classify_name = $(this).find('.classify-item-l').text();
+                classify_index = $(this).index()
                 //展示此关键词信息
                 toSetKws();
             })

+ 85 - 11
src/web/templates/weixin/vipsubscribe/messageType.html

@@ -5,11 +5,12 @@
     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
     <title>信息类型</title>
-    <link rel="stylesheet" href="/vipsubscribe/css/base.css">
-    <link rel="stylesheet" href="/vipsubscribe/iconfont/iconfont.css">
-    <link rel="stylesheet" href="/vipsubscribe/css/messageType.css">
-    <link rel="stylesheet" href="/css/common.css">
-    <script src="/vipsubscribe/js/rem.js"></script>
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/messageType.css?v={{Msg "seo" "version"}}">    
+	<link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/css/common.css?v={{Msg "seo" "version"}}">
+    <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
     <style type="text/css">
         body .industry .resetOne{
             position: fixed;
@@ -25,7 +26,11 @@
     </style>
 </head>
 <body>
-
+	<div class="result">
+        <p class="result_text line_two">
+          已选择:<span class="result_name"></span>
+        </p>
+    </div>
     <div class="easypopup" id="nijianTip">
         <div class="easypopup-alert">
             <div class="easypopup-content">
@@ -89,19 +94,52 @@
         </div>
 
     </div>
-    <script src="/js/jquery-3.2.1.min.js?v=1412"></script>
-    <script src="/js/common.js"></script>
-    <script>           
+    <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?v={{Msg "seo" "version"}}"></script>
+    <script src="{{Msg "seo" "cdn"}}/js/common.js?v={{Msg "seo" "version"}}"></script>
+    <script>      
+		var hasZBGG = ""
+		var hasZBJG = ""
+		var hasZBXYXX = ""
+		var hasStr = ""     
         function hasActive(){
             var arr = "";
+			hasZBGG = ""
+			hasZBJG = ""
+			hasZBXYXX = ""
+			hasStr = ""  
             $(".list ul li dl dd").each(function(index){
                 if($(this).hasClass('active')){
                     arr = arr + "," + $(this).text()
+					if($(this).prevAll("dt").text()=="招标公告"){
+						if(hasZBGG!=""){
+							hasZBGG+="、"
+						}
+						hasZBGG += $(this).text()
+					}
+					if($(this).prevAll("dt").text()=="招标结果"){
+						if(hasZBJG!=""){
+							hasZBJG+="、"
+						}
+						hasZBJG += $(this).text()
+					}
+					if($(this).prevAll("dt").text()=="招标信用信息"){
+						if(hasZBXYXX!=""){
+							hasZBXYXX+="、"
+						}
+						hasZBXYXX += $(this).text()
+					}
                 }
             })
             $(".list ul li dl dt").each(function(index){
                 if($(this).hasClass('active')&&($(this).text()=="招标预告"||$(this).text()=="拟建项目")){
                     arr = arr + "," + $(this).attr("dataValue")
+					if($(this).text()=="招标预告"||$(this).text()=="拟建项目"){
+						if (hasStr!=""){
+							hasStr += " "
+						}
+						hasStr += $(this).text();
+					}
                 }
             })
             return arr.substr(1)
@@ -127,6 +165,34 @@
                 })
             }
         }
+		//
+		function getChecked(){
+			hasActive();
+			if (hasZBGG!=""||hasZBJG!=""|hasZBXYXX!=""){
+				if(hasStr != ""){
+					hasStr +=" "
+				}
+				if(hasZBGG!=""){
+					hasStr+=" 招标公告 ("+hasZBGG+")"
+				}
+				if(hasZBJG!=""){
+					hasStr+=" 招标结果 ("+hasZBJG+")"
+				}
+				if(hasZBXYXX!=""){
+					hasStr+=" 招标信用信息 ("+hasZBXYXX+")"
+				}
+			}
+			if(hasStr!=""){
+				$(".result_name").text(hasStr);
+			}else{
+				$(".result_name").text("全部");
+			}
+			
+	        weui.loading().hide();
+			$(".result").css("visibility","");
+          	$(".industry").css("margin-top",$('.result_text').height()+25);
+			$(".industry").css("visibility","");
+		}
         //
         isLockButton (false);
         // 传入false为锁定确认按钮
@@ -134,16 +200,19 @@
             var button = $('.reset').siblings()[0]
             if (flag) {
                 // true,解锁button
-                $(button).css({ opacity: 1}).removeAttr('disabled')
+                $(button).css({"background": "#2cb7ca"}).removeAttr('disabled')
             } else {
                 // false, 锁定button
-                $(button).css({ opacity: 0.5 }).attr('disabled', true)
+                $(button).css({"background": "#95DBE4"}).attr('disabled', true)
             }
         }
         //
         var njTipEasyPopup = null;
         //是否 修改
         $(function(){
+	        weui.loading();
+			$(".result").css("visibility","hidden");
+			$(".industry").css("visibility","hidden");
             //获取用户设置信息类型
             $.post("/subscribepay/afterPay/getUserInfo",{},function(r){
                 if(r.userData){
@@ -159,6 +228,7 @@
                 }else{
                     $('.all span').addClass('active');
                 }
+				getChecked();
             })
             //
             $(".sure").on("click",function(){
@@ -183,6 +253,7 @@
                     $('.list ul li dl dt').removeClass('active')
                     $('.list ul li dl dd').removeClass('active')
                 }
+				getChecked();
             })
             $(".list ul li dl dt").on("click", function(){
                 isLockButton (true);
@@ -195,6 +266,7 @@
                     $('.all span').removeClass('active')
                 }
                 isAllSelected ()
+				getChecked();
             })
             $(".list ul li dl dd").on('click',function(){
                 isLockButton (true);
@@ -209,6 +281,7 @@
                 // 决定dt是否被选中
                 isDtSelected (this)
                 isAllSelected ()
+				getChecked();
             })
 
             $('.reset').on('click',function(){
@@ -216,6 +289,7 @@
                 $('.all span').addClass('active')
                 $('.list ul li dl dt').removeClass('active')
                 $('.list ul li dl dd').removeClass('active')
+				getChecked();
             })
         })
 

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

@@ -55,7 +55,7 @@
             </div>
 		</div>
 		<script src="/vipsubscribe/js/jquery-2.1.4.js"></script>
-    	<script src="/vipsubscribe/js/fastclick.js?v={{Msg "seo" "version"}}"></script>
+    	<!--<script src="/vipsubscribe/js/fastclick.js?v={{Msg "seo" "version"}}"></script>-->
     	<script src="/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
     	<script src="/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
 		<script type="text/javascript">
@@ -85,10 +85,10 @@
 			    			}
 			    		}
 			    	}
+			    	areaHtml = areaArr.toString().replace(/,/g, "、");
 			    	if(checkObj(area)){
 						areaHtml = "全国";
 					}
-			    	areaHtml = areaArr.toString().replace(/,/g, "、");
 			    	$('.area-list').text(areaHtml);
 			    }
 			    if(buyerclass !== "" && buyerclass !== undefined){

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

@@ -69,7 +69,7 @@
                     <a href="javascript:;">
                         <span class="label">支付方式</span>
                         <span class="info choose_way">微信支付</span>
-                        <i class="iconfont icon-arrow choose_way"></i>
+                        <!--<i class="iconfont icon-arrow choose_way"></i>-->
                     </a>
                 </div>
             </div>

+ 35 - 21
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"}}1">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/vip_index.css?v={{Msg "seo" "version"}}2">
 </head>
 
 <body style="visibility:hidden;">
@@ -123,6 +123,14 @@
                     <a href="/weixin/pay/renewPayPage">去续费</a>
                 </div>
             </div>
+            <!-- 试用用户-去购买提醒 -->
+            <div class="nv_renew_toast" style="display: none;">
+                <div>
+                    <i class="icon iconfont" id="nv_close_renew">&#xe61a;</i>
+                    <span>VIP订阅服务试用即将过期,请及时购买!</span>
+                    <a href="/weixin/pay/vipsubscribe_new">去购买</a>
+                </div>
+            </div>
             <!-- 升级 续费 -->
             <div class="tabbar">
                 <a href="/weixin/pay/toUpgradePage" class="update_btn">升级</a>
@@ -134,7 +142,7 @@
             <div class="weui-mask weui-animate-fade-in"></div>
             <div class="weui-dialog weui-animate-fade-in">
                 <div class="weui-dialog__hd"><strong class="weui-dialog__title" style="font-weight: bold;">项目匹配</strong></div>
-                <div class="weui-dialog__bd" style="line-height: .4rem;padding: .37rem .3rem;font-size: 14px;text-align: left;color: #686868;">开启后,系统将根据你订阅的关键词自动匹配出相关联的项目,并将相关联项目的后续动态在VIP订阅内一并推送。</div>
+                <div class="weui-dialog__bd" style="line-height: .4rem;padding: .37rem .45rem;font-size: 14px;text-align: left;color: #686868;">开启后,系统将根据你订阅的关键词自动匹配出相关联的项目,并将相关联项目的后续动态在VIP订阅内一并推送。</div>
                 <div class="weui-dialog__ft" style="border-top: 1px solid #eee;padding-bottom: .2rem;padding-top: .2rem;"> 
                     <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary" style="background: #fff;color: #2CB7CA;text-align: center;margin-right: unset;">我知道了</a>
                 </div>
@@ -142,7 +150,7 @@
         </div>
     </div>
     <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
-    <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/fastclick.js?v={{Msg "seo" "version"}}"></script>
+<!--    <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/fastclick.js?v={{Msg "seo" "version"}}"></script>-->
     <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
 	{{include "/common/weixin.html"}}
 	<script src="{{Msg "seo" "cdn"}}/wxswordfish/share.js?v={{Msg "seo" "version"}}11"></script>
@@ -158,7 +166,6 @@
 				}
 			});
 			//
-			let isChecked = false; //是否开通项目匹配
 			if(!isinitpage){
             	getuserinfo();
 			}
@@ -169,17 +176,11 @@
                     $('.custom-dialog').hide()
                 })
 			})
-            if (isChecked === true) {
-                $('.switch').addClass('checked')
-            } else {
-                $('.switch').removeClass('checked')
-            }
             $('.switch').on('click', function (e) {
                 console.log($(this).hasClass('checked'))
                 let that = this;
                 let hasChecked = $(this).hasClass('checked');
                 if (hasChecked == false) {
-                    isChecked = true;
                     $(that).addClass('checked');
                     weui.toast('项目匹配已开启',{
                         duration: 3000,
@@ -187,7 +188,6 @@
                     })
 					setprojectmatch(1);
                 } else {
-                    isChecked = false;
                     $(that).removeClass('checked');
                     $('.custom-dialog').hide()
                     // $('#auto_renew').hide(500);
@@ -202,6 +202,11 @@
             $('#close_renew').on('click', () => {
                 $('.renew_toast').hide()
             })
+            $('#nv_close_renew').on('click', () => {
+                $('.nv_renew_toast').hide();
+				$(".tabbar").html('<a style="width: 100%;color: #fff;background: #2CB7CA;" href="/weixin/pay/vipsubscribe_new" class="update_btn">去购买</a>');
+				$(".tabbar").show();
+            })
         })
 		//
 		function getuserinfo(){
@@ -220,29 +225,38 @@
                    		var _vipstatus = _userData["i_vip_status"];
                    		// console.log(_userData)
 	                   if(_vipstatus&&_vipstatus=="1"){
-							$(".tabbar").html('<a style="width: 100%;color: #fff;background: #2CB7CA;" href="/weixin/pay/vipsubscribe_new" class="update_btn">去购买</a>')
+							if(parseInt(_vipData["expRemind"])>0){
+	                            $(".to_expired").show();
+	                            $(".nv_renew_toast").show();
+								$(".tabbar").hide();
+	                        }else{
+	                            $(".to_expired").hide();
+								$(".tabbar").html('<a style="width: 100%;color: #fff;background: #2CB7CA;" href="/weixin/pay/vipsubscribe_new" class="update_btn">去购买</a>')
+	                        }
 							$('.free7days_pic').text("VIP订阅服务");
 	                        $('.free7days_pic').append("<style>.free7days_pic::after{display:inline-block}</style>");
 	                   }else{
+							if(parseInt(_vipData["expRemind"])>0){
+	                            $(".to_expired").show();
+	                            $(".renew_day").text(parseInt(_vipData["expRemind"]))
+	                            $(".renew_toast").show();
+	                        }else{
+	                            $(".to_expired").hide();
+	                        }
 							$(".tabbar").html('<a href="/weixin/pay/toUpgradePage" class="update_btn">升级</a><a href="/weixin/pay/renewPayPage" class="renew_btn">续费</a>')
 							$('.free7days_pic').text("已开通VIP订阅服务");
 	                        $('.free7days_pic').append("<style>.free7days_pic::after{display:none}</style>");
 	                   }
 	                   if(_vipData){
 	                   		if(Number(_vipData["i_projectmatch"])==1){
-								isChecked = true;
-							}
+								$('.switch').addClass('checked')
+							}else{
+				                $('.switch').removeClass('checked')
+				            }
 	                        $("._area").text(_vipData["o_area"]);
 	                        $("._buyerClass").text(_vipData["a_buyerclass"]);
 	                        $("._cycleCount").text(_vipData["cycle"]);
 	                        $("._activeDate").text(_userData["l_vip_starttime"]+" - "+_userData["l_vip_endtime"]);
-	                        if(parseInt(_vipData["expRemind"])>0){
-	                            $(".to_expired").show();
-	                            $(".renew_day").text(parseInt(_vipData["expRemind"]))
-	                            $(".renew_toast").show();
-	                        }else{
-	                            $(".to_expired").hide();
-	                        }
 	                        if(_vipData["a_infotype"]==""){
 	                            _vipData["a_infotype"]="全部类型"
 	                        }

+ 41 - 22
src/web/templates/weixin/vipsubscribe/vip_upgrade.html

@@ -75,7 +75,7 @@
                     <a href="javascript:;">
                         <span class="label">支付方式</span>
                         <span class="info choose_way">微信支付</span>
-                        <i class="iconfont icon-arrow choose_way"></i>
+                        <!--<i class="iconfont icon-arrow choose_way"></i>-->
                     </a>
                 </div>
                 <div class="vip_rules">
@@ -743,20 +743,6 @@
 //	    	$("#payType").text(payHtml);
 //	    }
 
-//	    if(cycleunit !== "" && cycleunit !== undefined){
-//	    	if(cycleunit === 1){
-//	    		dateName = cyclecount + " 年";
-//	    	}else if(cycleunit === 2){
-//	    		dateName = cyclecount + " 个月";
-//	    	}
-//	    	$(".item_cycle .label_for").text(dateName);
-//	    }
-//	    if(startTime !== "" && endTime !== ""){
-//	    	var start = startTime.replace(/-/g, ".");
-//	    	var end = endTime.replace(/-/g, ".");
-//	    	dateHtml = start + " - " + end;
-//	    	$(".item_validity .label_for").text(dateHtml);
-//	    }
 		if(sessionStorage.upgrade_cyclecount!==undefined&&sessionStorage.upgrade_cycleunit!==undefined){
 	 		var cycleunit = sessionStorage.upgrade_cycleunit;
 	 		var cyclecount = sessionStorage.upgrade_cyclecount;
@@ -786,12 +772,7 @@
 	 		$('.choose_item.lengthen .info').text("不延长");
 	 		$(".computed_price").hide();
 	 	}
-	 	if(sessionStorage.upgrade_price!==""&&sessionStorage.upgrade_price!==undefined){
-	 		$(".computed_price").html(sessionStorage.upgrade_price);
-	 	}
-	 	if(sessionStorage.upgrade_finally_price!==""&&sessionStorage.upgrade_finally_price!==undefined){
-	    	$(".finally_price").html(sessionStorage.renew_finally_price);
-	 	}
+	 	
 //	 	if(sessionStorage.vipSubSelectArea!==""&&sessionStorage.vipSubSelectArea!==undefined&&)
 	 	
 	 	//
@@ -949,6 +930,16 @@
 			    	}
 			    }
 			}
+			
+			for (var x = 0; x < industrysArr.length; x++) {
+	            for (var j =x+1; j <industrysArr.length; ) {
+	                if (industrysArr[x] === industrysArr[j]){
+	                    industrysArr.splice(j, 1);
+	                }
+	                else j++;
+	            }
+	       	}
+			
 			console.log("industrysArr",industrysArr);
 			if(sessionStorage.effectiveDate !== ""&&sessionStorage.effectiveDate!==undefined){
 				let eff = sessionStorage.effectiveDate;
@@ -1001,9 +992,16 @@
 			if(nowUpgrade == 0){
 				nowUpgrade = 1;
 			}
+			if(sessionStorage.upgrade_cyclecount !== undefined && sessionStorage.upgrade_cycleunit !== undefined){
+				if(sessionStorage.upgrade_cycleunit === "1"){
+					nowUpgrade = nowUpgrade + 12*Number(sessionStorage.upgrade_cyclecount);
+				}else if(sessionStorage.upgrade_cycleunit === "2"){
+					nowUpgrade = nowUpgrade + Number(sessionStorage.upgrade_cyclecount);
+				}
+			}
 			//
 			var nowUpgradeYear = 0;
-			if(nowUpgrade >= 12){
+			if(nowUpgrade >= 12 && nowUpgrade < 24){
 				nowUpgradeYear = Math.floor(nowUpgrade / 12);
 				nowUpgrade = nowUpgrade - 12;
 			}else if(nowUpgrade >= 24){
@@ -1064,6 +1062,17 @@
 			}
 			console.log("completeMonth",completeMonth)
 			console.log("completeYear",completeYear)
+			if(sessionStorage.upgrade_cyclecount !== undefined && sessionStorage.upgrade_cycleunit !== undefined){
+				if(sessionStorage.upgrade_cycleunit === "1"){
+					let price = (Number(sessionStorage.upgrade_cyclecount)*completeYear).toFixed(1);
+					sessionStorage.upgrade_price = "¥"+price;
+					sessionStorage.proPrice = price;
+				}else if(sessionStorage.upgrade_cycleunit === "2"){
+					let price = (Number(sessionStorage.upgrade_cyclecount)*completeMonth).toFixed(1);
+					sessionStorage.upgrade_price = "¥"+price;
+					sessionStorage.proPrice = price;
+				}
+			}
 			var cPrice = 0;
   			if(price>0){
   				var cPrice = (price - oldPrice).toFixed(1);
@@ -1074,12 +1083,22 @@
 				console.log("proprice",proPrice);
 				cPrice = (Number(cPrice) + Number(proPrice)).toFixed(1);
 			}
+			if(cPrice < 0){
+				cPrice = 0;
+			}
 			$(".finally_price").html("¥"+cPrice);
 			if (cPrice>0){
 				$(".save_upgrade").removeAttr('disabled');
 			}
         }
         FinallyPrice();
+        //
+        if(sessionStorage.upgrade_price!==""&&sessionStorage.upgrade_price!==undefined){
+	 		$(".computed_price").html(sessionStorage.upgrade_price);
+	 	}
+	 	if(sessionStorage.upgrade_finally_price!==""&&sessionStorage.upgrade_finally_price!==undefined){
+	    	$(".finally_price").html(sessionStorage.renew_finally_price);
+	 	}
         
         //
         $(".save_upgrade").on("click", function(){

+ 17 - 5
src/web/templates/weixin/wxkeyset/index.html

@@ -138,6 +138,11 @@ $(function(){
 		if(!r || !r["a_key"]){
 			return;
 		}
+		if (r["a_key"].length>=10){
+			$(".open_remind").show();
+		}else{
+			$(".open_remind").hide();
+		}
 		for(var i=0;i<r["a_key"].length;i++){
 			var a_key = r["a_key"][i];
 			var key = a_key["key"];
@@ -194,8 +199,9 @@ $(function(){
 	}).on('compositionend', function(){
 	    $(this).prop('comStart', false);
 	}).blur(function(){
-		$("#ten").css("margin-bottom","1rem");
-		$(".vip_banner").show();
+		if(myArray.length>=10){
+			$("#ten").css("margin-bottom","1rem");
+		}
 		isfocusing = false;
 		var thisClass = $(this);
 		$(".keyword").attr("readonly",false);
@@ -218,13 +224,17 @@ $(function(){
 			$(".keyWordContent").removeClass('adjustment');
 			$(".keyWordGroup").show();
 			var valueArray = getKeyWords();
+			if (valueArray.length>=10){
+				$(".open_remind").show();
+			}else{
+				$(".open_remind").hide();
+			}
 			if(valueArray.length >= 1&&!disflag&&surpriseflag==""){
 				surswitch();
 			}
 		},300);
 	}).focus(function(){
 		$("#ten").css("margin-bottom","");
-		$(".vip_banner").hide();
 		$(".header,.keyWordContent").addClass("absolute");
 		if(focusinputindex != $(this).parents(".keyWordGroup").index()){
 			istiped = false;
@@ -292,7 +302,9 @@ $(function(){
     }
 	//
 	if(isIOS){
-		$("#ten").css("margin-bottom","1rem");
+		if(myArray.length>=10){
+			$("#ten").css("margin-bottom","1rem");
+		}
 	}
 });
 //
@@ -844,7 +856,7 @@ function tointroducepage(){
 		<span>您订阅的关键词包含特殊符号,可能会收不到推送信息。查看<a href="http://mp.weixin.qq.com/s/2u1rBaTZ7T_o8k7TbuM_fw">订阅帮助页面</a></span>
 	</div>
 	<div  class="msg_alert">
-		<div class="open_remind">
+		<div class="open_remind" style="display:none;">
             <div class="remind_box">
 				<i class="icon iconfont" id="close_set"></i>
                 <div class="remind_text">