Browse Source

Merge branch 'dev2.8.5' of ssh://192.168.3.207:10022/qmx/jy into dev2.8.5

wcj 5 years ago
parent
commit
185c873b91
28 changed files with 251 additions and 128 deletions
  1. 1 0
      src/jfw/modules/subscribepay/src/a/init.go
  2. 2 2
      src/jfw/modules/subscribepay/src/service/afterPay.go
  3. 1 1
      src/jfw/modules/subscribepay/src/service/vipSubscribeTrial.go
  4. 1 0
      src/jfw/modules/subscribepay/src/util/vrew.go
  5. 1 0
      src/jfw/public/historypush.go
  6. 7 0
      src/web/staticres/vipsubscribe/css/addition_exclusive_word.css
  7. 8 0
      src/web/staticres/vipsubscribe/css/keyWord.css
  8. 1 1
      src/web/staticres/vipsubscribe/css/subscribe_list.css
  9. 4 3
      src/web/staticres/vipsubscribe/css/vip_index.css
  10. 34 6
      src/web/staticres/vipsubscribe/js/additionWord.js
  11. 35 7
      src/web/staticres/vipsubscribe/js/exclusiveWord.js
  12. 20 14
      src/web/staticres/vipsubscribe/js/keyWord.js
  13. 16 13
      src/web/templates/weixin/historypush.html
  14. 1 0
      src/web/templates/weixin/resultpreview.html
  15. 6 1
      src/web/templates/weixin/vipsubscribe/additionWord.html
  16. 26 6
      src/web/templates/weixin/vipsubscribe/choose_area.html
  17. 1 1
      src/web/templates/weixin/vipsubscribe/choose_industry.html
  18. 1 1
      src/web/templates/weixin/vipsubscribe/edit_subscribe.html
  19. 5 0
      src/web/templates/weixin/vipsubscribe/exclusiveWord.html
  20. 25 15
      src/web/templates/weixin/vipsubscribe/keyWord.html
  21. 7 7
      src/web/templates/weixin/vipsubscribe/messageType.html
  22. 1 0
      src/web/templates/weixin/vipsubscribe/trial_info.html
  23. 6 2
      src/web/templates/weixin/vipsubscribe/vip_index.html
  24. 20 27
      src/web/templates/weixin/vipsubscribe/vip_introduce.html
  25. 9 11
      src/web/templates/weixin/vipsubscribe/vip_purchase.html
  26. 1 1
      src/web/templates/weixin/vipsubscribe/vip_seniorset.html
  27. 2 2
      src/web/templates/weixin/vipsubscribe/vip_upgrade.html
  28. 9 7
      src/web/templates/weixin/wxkeyset/index.html

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

@@ -20,6 +20,7 @@ func init() {
 	xweb.RootApp().AppConfig.ReloadTemplates = true
 	xweb.RootApp().AppConfig.SessionTimeout = 7 * 24 * time.Hour
 	xweb.RootApp().Logger.SetOutputLevel(1) //输出日志,改为4则不输出任何日志
+	xweb.RootApp().AppConfig.StaticDir = "web/staticres"
 	//
 	xweb.AddRouter("/subscribepay", &service.AfterPay{})
 	xweb.AddRouter("/subscribepay", &service.TrialOrder{})       //试用&订单

+ 2 - 2
src/jfw/modules/subscribepay/src/service/afterPay.go

@@ -202,7 +202,7 @@ func (a *AfterPay) GetUserInfo() error {
 				buyClass += v.(string) + "、"
 			}
 			if buyClass == "" {
-				(*data)["a_buyerclass"] = "全"
+				(*data)["a_buyerclass"] = "全行业"
 			} else {
 				(*data)["a_buyerclass"] = strings.TrimRight(buyClass, "、")
 			}
@@ -214,7 +214,7 @@ func (a *AfterPay) GetUserInfo() error {
 			//订阅周期
 			var cycle = ""
 			if i_vip_status == 1 {
-				cycle = "7天"
+				cycle = "试用7天"
 			} else {
 				var _start = strings.Split(qutil.FormatDateWithObj(&_starttime, qutil.Date_Short_Layout), "-")
 				var _end = strings.Split(qutil.FormatDateWithObj(&_endtime, qutil.Date_Short_Layout), "-")

+ 1 - 1
src/jfw/modules/subscribepay/src/service/vipSubscribeTrial.go

@@ -114,7 +114,7 @@ func (t *TrialOrder) SendPhoneCaptcha() {
 		}
 		imgcode_sess := qutil.ObjToString(t.GetSession("subvip_trial_imgCode"))
 		if !captcha.VerifyString(imgcode_sess, imgcode_req) || imgcode_req == "" {
-			return false, "验证码不正确"
+			return false, "图形验证码不正确"
 		}
 		//获取上次发送验证码时间
 		lastSend := qutil.Int64All(t.GetSession("subvip_trial_lastSend"))

+ 1 - 0
src/jfw/modules/subscribepay/src/util/vrew.go

@@ -258,6 +258,7 @@ func MergeKws(userId string) {
 			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)
 			}

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

@@ -428,6 +428,7 @@ func (h *historyPush) MakeHistoryDatas(userId, field string) (bool, []map[string
 	allquery = fmt.Sprintf(allquery, fmt.Sprint(time.Now().AddDate(0, 0, -7).Unix()))
 	allquery = ``
 	keys, list := PushView(userId, allquery, field, 1, 50)
+	log.Println(list)
 	if list == nil || len(*list) == 0 {
 		return true, nil
 	}

+ 7 - 0
src/web/staticres/vipsubscribe/css/addition_exclusive_word.css

@@ -339,3 +339,10 @@
 .weui-dialog input {
   caret-color: #2cb7ca;
 }
+.addKeyWord  i.icon-tianjia{
+	    position: fixed;
+    bottom: 0px;
+    left: 50%;
+    margin-left: -25px;
+    width: 50px;
+}

+ 8 - 0
src/web/staticres/vipsubscribe/css/keyWord.css

@@ -444,3 +444,11 @@
 .classify-edit-pop .weui-dialog .weui-dialog__ft:after {
   border: none;
 }
+
+.addKeyWord  i.icon-tianjia{
+	    position: fixed;
+    bottom: .5rem;
+    left: 50%;
+    margin-left: -25px;
+    width: 50px;
+}

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

@@ -182,7 +182,7 @@
 }
 
 .filter_tab .tab_left .time {
-  margin-right: .15rem;
+  margin-right: .25rem;
 }
 
 .filter_tab .tab_left .time_box,

+ 4 - 3
src/web/staticres/vipsubscribe/css/vip_index.css

@@ -486,6 +486,7 @@
   left: .15rem;
   color: #34355A;
   background-color: #FFDAB1;
+    padding: .02rem .03rem 0.01rem .03rem;
 }
 
 .vip_index .content .vip_info .s_left .already {
@@ -552,7 +553,7 @@
 .vip_index .content .subscribe_info .s_info_top .s_i_item {
   display: flex;
   position: relative;
-  line-height: 1.4;
+  line-height: 1.8;
   z-index: 2;
 }
 
@@ -588,8 +589,8 @@
 }
 
 .vip_index .content .subscribe_info .s_info_bottom {
-  height: .53rem;
-  line-height: .53rem;
+  height: .68rem;
+  line-height: .68rem;
   font-size: .24rem;
   text-align: center;
   border-top: 1px solid #CFAD89;

+ 34 - 6
src/web/staticres/vipsubscribe/js/additionWord.js

@@ -50,6 +50,14 @@ $(function(){
         var timestamp = new Date().getTime();//动态生成不同的id,因为id唯一不能重复,所以 用时间戳 代替  防止重复
         var keyWord = $('.addkeyWord input.enterOne').val();
         _addindex = -1;
+		if(addkws_arr[keyWord]!=undefined){
+            weui.toast('您设置的附加词已存在,请调整后再添加。', {
+                duration: 2000,
+                className: 'custom-toast',
+                callback: function () { console.log('close') }
+            });
+			return
+		}
         //保存新附加词
         _addkws = keyWord;
         saveSession();
@@ -126,6 +134,14 @@ $(function(){
             });
         }else{
             _addindex = $(".showKeyWord li").length - $(this).parent().parent('li').index() - 1;
+			if(addkws_arr[keyWord]!=undefined&&addkws_arr[keyWord]!=_addindex){
+	            weui.toast('您设置的排除词已存在,请调整后再添加。', {
+	                duration: 2000,
+	                className: 'custom-toast',
+	                callback: function () { console.log('close') }
+	            });
+				return
+			}
             _addkws = keyWord;
             saveSession();
             $(this).parent().siblings().find('.key').text(keyWord)
@@ -133,11 +149,23 @@ $(function(){
         }
     })
 
+    
     //防止键盘把当前输入框给挡住
-    $('input[type="text"],textarea').focus(function () {
-        var target = this;
-        setTimeout(function(){
-            target.scrollIntoViewIfNeeded();
-        },400);
-    });
+    var u = navigator.userAgent;
+	var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
+	var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
+	if(isAndroid){
+		//防止键盘把当前输入框给挡住
+	    window.addEventListener('resize', function () {
+	      	if (document.activeElement.tagName == 'INPUT' || document.activeElement.tagName == 'TEXTAREA') {
+	          		window.setTimeout(function () {
+	         	document.activeElement.scrollIntoViewIfNeeded();
+	            }, 0);
+	        }
+	    })
+	}
+	(/iphone|ipod|ipad/i.test(navigator.appVersion)) && document.addEventListener('blur', (e) => {
+	    // 这里加了个类型判断,因为a等元素也会触发blur事件
+	    ['input', 'textarea'].includes(e.target.localName) && document.body.scrollIntoView(false)
+	}, true)
 })

+ 35 - 7
src/web/staticres/vipsubscribe/js/exclusiveWord.js

@@ -64,6 +64,14 @@ $(function(){
         _notindex = -1;
         //保存新附加词
         _notkws = keyWord;
+		if(notkws_arr[keyWord]!=undefined){
+            weui.toast('您设置的附加词已存在,请调整后再添加。', {
+                duration: 2000,
+                className: 'custom-toast',
+                callback: function () { console.log('close') }
+            });
+			return
+		}
         saveSession();
         var html = `<li>
                         <div class="one">
@@ -138,6 +146,14 @@ $(function(){
                 callback: function () { console.log('close') }
             });
         }else{
+			if(notkws_arr[keyWord]!=undefined&&notkws_arr[keyWord]!=_notindex){
+	            weui.toast('您设置的排除词已存在,请调整后再添加。', {
+	                duration: 2000,
+	                className: 'custom-toast',
+	                callback: function () { console.log('close') }
+	            });
+				return
+			}
             $this.parent().siblings().find('.key').text(keyWord);
             $this.parent().hide().siblings().show();
             $('.addKeyWord').show();
@@ -147,11 +163,23 @@ $(function(){
         }
     })
 
-    // 防止键盘把当前输入框给挡住
-    $('input[type="text"],textarea').focus(function () {
-        var target = this;
-        setTimeout(function(){
-            target.scrollIntoViewIfNeeded();
-        },400);
-    });
+    
+    //防止键盘把当前输入框给挡住
+    var u = navigator.userAgent;
+	var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
+	var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
+	if(isAndroid){
+		//防止键盘把当前输入框给挡住
+	    window.addEventListener('resize', function () {
+	      	if (document.activeElement.tagName == 'INPUT' || document.activeElement.tagName == 'TEXTAREA') {
+	          		window.setTimeout(function () {
+	         	document.activeElement.scrollIntoViewIfNeeded();
+	            }, 0);
+	        }
+	    })
+	}
+	(/iphone|ipod|ipad/i.test(navigator.appVersion)) && document.addEventListener('blur', (e) => {
+	    // 这里加了个类型判断,因为a等元素也会触发blur事件
+	    ['input', 'textarea'].includes(e.target.localName) && document.body.scrollIntoView(false)
+	}, true)
 })

+ 20 - 14
src/web/staticres/vipsubscribe/js/keyWord.js

@@ -87,11 +87,10 @@ var reloadFunc = function(){
                                 +'</span>'
                 }
                 html +=`</div>
-                        <button class="editKeyWord"><i class="iconfont icon-xiugai"></i> 修改</button>
+                        <button class="editKeyWord"  dataIndex=`+kws_index+`><i class="iconfont icon-xiugai"></i> 修改</button>
                         </div>
                         <div class="modify">
-                        <textarea  name=""  rows="1"  placeholder="" maxlength="20">${keyWord}</textarea>
-                                `
+                        <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{
@@ -102,10 +101,7 @@ var reloadFunc = function(){
             }else{
                 html +=`<button class="addAdjunctWord" onClick="tonotkey(this)">添加 排除词</button>`
             }
-                html +=`<button class="deleteKey">删除</button>
-                                <button class="ascertainKey" onclick="saveK(this,1)">确定</button>
-                            </div>
-                        </li>`
+                html +=`<button class="deleteKey">删除</button><button class="ascertainKey" dataIndex=`+kws_index+` onclick="saveK(this)">确定</button></div></li>`
             $('.showKeyWord > ul').prepend(html);
             // 添加完成隐藏输入框
             $(".enter.addkeyWord").hide();
@@ -216,13 +212,23 @@ var reloadFunc = function(){
     // })
     
     //防止键盘把当前输入框给挡住
-    $('input[type="text"],textarea').focus(function () {
-        var target = this;
-        setTimeout(function(){
-            target.scrollIntoViewIfNeeded();
-        },400);
-    });
-
+    var u = navigator.userAgent;
+	var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
+	var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
+	if(isAndroid){
+		//防止键盘把当前输入框给挡住
+	    window.addEventListener('resize', function () {
+	      	if (document.activeElement.tagName == 'INPUT' || document.activeElement.tagName == 'TEXTAREA') {
+	          		window.setTimeout(function () {
+	         	document.activeElement.scrollIntoViewIfNeeded();
+	            }, 0);
+	        }
+	    })
+	}
+	(/iphone|ipod|ipad/i.test(navigator.appVersion)) && document.addEventListener('blur', (e) => {
+	    // 这里加了个类型判断,因为a等元素也会触发blur事件
+	    ['input', 'textarea'].includes(e.target.localName) && document.body.scrollIntoView(false)
+	}, true)
 
     // 显示关键词分类弹框
     $('.classify-r').on('click', function(){

+ 16 - 13
src/web/templates/weixin/historypush.html

@@ -80,6 +80,7 @@
 					isInTSguide=data.isInTSguide;
 					hasNextPage=data.hasNextPage;
 					firstPage = data.data;
+					isVipSub = data.isVipSub;
 					if(!firstPage.length>0 && !data.haskey){
 						if(sessionStorage&&(sessionStorage.keysetindexToHistory=="1"||sessionStorage.keysetindexToHistory=="2"||sessionStorage.keysetindexToHistory=="3")){
 							sessionStorage.removeItem("keysetindexToHistory");
@@ -93,16 +94,18 @@
 								},2000);
 							}
 						}else{
-							history.pushState({},"","");
-							if(data.isInTSguide){
-								if(localStorage){
-									localStorage.removeItem("tsGuide_status");
+							if(!isVipSub){
+								history.pushState({},"","");
+								if(data.isInTSguide){
+									if(localStorage){
+										localStorage.removeItem("tsGuide_status");
+									}
+									window.location.href='/front/tenderSubscribe/guide';
+								}else{
+									window.location.href='/wxkeyset/keyset/index';
 								}
-								window.location.href='/front/tenderSubscribe/guide';
-							}else{
-								window.location.href='/wxkeyset/keyset/index';
+								return
 							}
-							return
 						}
 					}
 					setTimeout(function(){
@@ -113,7 +116,6 @@
 						}
 						$(".tab_left .time").show();
 					},500)
-					isVipSub = data.isVipSub;
 					if(isVipSub){
 						if(!data.haskey){
 							$(".set_keyword").show();
@@ -125,7 +127,7 @@
 							$('.free7days_pic').append("<style>.free7days_pic:after{display:none}</style>");
 						}
 						if(parseInt(data.isExpire)!=0){
-							$(".isExpire").text(parseInt(isExpire));
+							$(".isExpire").text(parseInt(data.isExpire));
 							$(".renew_toast").show();
 						}
 						$(".vip_set").show();
@@ -424,7 +426,7 @@
 				} 
 				return   year+"-"+month+"-"+date; 
 			}else if(sl=="2"){
-				return   year+"/"+month+"/"+date; 
+				return   year+"."+month+"."+date; 
 			}else{
 				return   year+"<br>"+month+""+date; 
 			}
@@ -986,7 +988,7 @@
             	weui.datePicker({
             		id: '1',
             		start: 2000,
-            		end: new Date().getFullYear(),
+            		end: new Date(),
             		defaultValue:date.split('-'),
             		className: 'jymobile-datePicker',
             		onChange: function (result) {},
@@ -994,7 +996,7 @@
             			let year = result[0].value;
             			let month = result[1].value < 10 ? '0' + result[1].value : result[1].value;
             			let day = result[2].value < 10 ? '0' + result[2].value:result[2].value;
-            			let time_result = year + '/' + month + '/' + day;
+            			let time_result = year + '.' + month + '.' + day;
             			FTAGData(year + '-' + month + '-' + day)
             			$('.time_result').html(time_result)
             		}
@@ -1033,6 +1035,7 @@
             });
             // 选择地区
             $('#showArea').on('click', function (){
+				$(this).find("span").toggleClass("current");
             	$('.area_container').slideToggle();
             	$('.screen').toggle();
             	$(".subscribe").toggleClass('overClass');

+ 1 - 0
src/web/templates/weixin/resultpreview.html

@@ -6,6 +6,7 @@
 <link href="{{Msg "seo" "cdn"}}/css/dropload.css?v={{Msg "seo" "version"}}" rel="stylesheet">
 <link href="{{Msg "seo" "cdn"}}/css/wxlist.css?v={{Msg "seo" "version"}}" rel="stylesheet">
 {{include "/common/weixin.html"}}
+<script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/rem.js"></script>
 <script src="{{Msg "seo" "cdn"}}/js/jquery.js"></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>

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

@@ -75,6 +75,7 @@
         var addition_kws = []//附加词
         var _addkws = "";
         var _addindex = -1;
+		var addkws_arr = {}
         $(function() {
             if(sessionStorage&&sessionStorage.addition_kws!=undefined){
                 addition_kws = JSON.parse(sessionStorage.addition_kws);
@@ -89,6 +90,7 @@
             if (data.length>0){
                 var additionHtml = '';
                 for (var i = data.length - 1; i >= 0; i--) {
+					addkws_arr[data[i]]=i
                     additionHtml +='<li>'
                                     +'<div class="one">'
                                     +'<div>'
@@ -117,12 +119,15 @@
         function saveSession(t){
             if (_addkws!=""){
                 if(t!="D"){
-                    if(_addindex>0){
+                    if(_addindex>=0){
+						addkws_arr[_addkws] = _addindex;
                         addition_kws[_addindex] = _addkws
                     }else{
+						addkws_arr[_addkws] = addition_kws.length;
                         addition_kws.push(_addkws)
                     }
                 }else{
+					delete addkws_arr[_addkws];
                     addition_kws.splice(_addindex,1)
                 }
                 sessionStorage.addition_kws = JSON.stringify(addition_kws)

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

@@ -466,7 +466,7 @@
         getResult:function(){   /* 选中结果 */
           //如果选中所有,则转为全国
           if($(".city").length==$(".city.active").length){
-            $(".checkbox.other").trigger("click");
+            $(".checkbox.other").trigger("click");           
             return
           }
           this.selectObj = {};
@@ -477,14 +477,14 @@
           if ($('.other').is(':checked')) {
             // data.push(val)
             data =[{name:val,children:[]}] //全国
+            $(".tips_d_text").slideUp();
           }
           $(".tab_content").find(".city.active:not('[disabled]')").each(function () {
               var length = $(this).parent('.tab_content').find('.city').length; //省份下城市的length
               var activeLeng = $(this).parent('.tab_content').find('.city.active').length; //省份下选中城市的length
               let arr =[];
               // 判断省份下的城市是否等于选中的城市长度,相等就是全部选中
-              if (length == activeLeng) {
-                  $('.tips_btn .tips_d_text').hide()
+              if (length == activeLeng) {                  
                   // data.push($(this).parent('.tab_content').siblings('.tab:not(.whole)').children('.province').text().trim())
                   let province = $(this).parent('.tab_content').siblings('.tab:not(.whole)').children('.province').text().trim();
                   data.push({
@@ -524,14 +524,16 @@
               }
           })
           var html = '';
+          var selectProvince = 0;
+          var selectCityMax = 0;
           for (var i = 0; i < result.length; i++) {
               let children = result[i].children;
               if( children.length >0){
                   // 判断每个省份下选中的城市长度,当大于等于4的时候 弹出"选择全省更划算的弹窗"
                   let childrenArr=[];
-                  if (children.length >= 4 && !this.vipSubisTrial) {
-                      $('.tips_btn .tips_d_text').show()
-                  } 
+                  if(children.length>selectCityMax){
+                    selectCityMax = children.length;
+                  }
                   html += `${result[i].name}(`
                   for(var j = 0;j < children.length;j++){
                       childrenArr.push(children[j].name)
@@ -548,6 +550,8 @@
                   }
                   this.selectObj[result[i].name]=childrenArr;//
               }else{
+                  selectProvince++
+                 
                   if(i !=result.length -1){
                       html += `${result[i].name}、`
                   }else{
@@ -556,6 +560,22 @@
                   this.selectObj[result[i].name]=[];//
               }
           }
+          
+          //提示
+          if(!this.vipSubisTrial){
+            if(selectProvince>9){
+              $('.tips_btn .tips_d_text').text("已选择"+selectProvince+"个省,建议购买“全国”更划算哦~").slideDown()
+            }else{
+              if (selectCityMax > 3) {
+                $('.tips_btn .tips_d_text').text("已选择"+selectCityMax+"个市,建议购买“全省”更划算哦~").slideDown();
+              }else{
+                $(".tips_d_text").slideUp();
+              } 
+            }
+          }
+          
+          
+          
           console.log("this.selectObj:",this.selectObj)
           $('.result_name').append(html)
           AreaChoose.isOpen()

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

@@ -281,7 +281,7 @@
                 
                 // 显示隐藏优惠tips
                 if (selectedArr.length >= 4 && !vipSubisTrial) {
-                    $('.tips_btn .tips_d_text').slideDown()
+                    $('.tips_btn .tips_d_text').text("已选择"+selectedArr.length+"个行业,建议购买“全部行业”更划算哦~").slideDown()
                 } else {
                     $('.tips_btn .tips_d_text').slideUp()
                 }

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

@@ -114,7 +114,7 @@
           },
           initClick:function(){
             $(".edit_item").on("click",function(){
-               window.location.replace($(this).attr("data_href"));
+               window.location.href=$(this).attr("data_href");
             });
             //提交
           },

+ 5 - 0
src/web/templates/weixin/vipsubscribe/exclusiveWord.html

@@ -74,6 +74,7 @@
         var not_kws = []//附加词
         var _notkws = "";
         var _notindex = -1;
+		var notkws_arr = {}
         $(function() {
             if(sessionStorage&&sessionStorage.not_kws!=undefined){
                 not_kws = JSON.parse(sessionStorage.not_kws);
@@ -88,6 +89,7 @@
             if (data.length>0){
                 var additionHtml = '';
                 for (var i = data.length - 1; i >= 0; i--) {
+					notkws_arr[data[i]]=i
                     additionHtml +='<li>'
                                     +'<div class="one">'
                                     +'<div>'
@@ -117,11 +119,14 @@
             if (_notkws!=""){
                 if(t!="D"){
                     if(_notindex>0){
+						notkws_arr[_notkws] = _notindex;
                         not_kws[_notindex] = _notkws
                     }else{
+						notkws_arr[_notkws] = not_kws.length;
                         not_kws.push(_notkws)
                     }
                 }else{
+					delete notkws_arr[_notkws];
                     not_kws.splice(_notindex,1)
                 }
                 sessionStorage.not_kws = JSON.stringify(not_kws)

+ 25 - 15
src/web/templates/weixin/vipsubscribe/keyWord.html

@@ -101,10 +101,6 @@
       .classify-show-pop .weui-dialog .weui-dialog__ft:after {
             border: none;
       }
-      .keyWord .addKeyWord{
-            position: fixed;
-            bottom: 0;
-      }
       .all-classify-column{
             position: relative;
             padding-bottom: 1rem;
@@ -215,7 +211,7 @@
                     <strong class="weui-dialog__title">提示信息</strong>
                 </div>
                 <div class="weui-dialog__bd">
-                    关键词分类有利于关键词做整合管理<br>工作更高效!
+                    关键词分类有利于关键词做整合管理<br>工作更高效!
                 </div>
                 <div class="weui-dialog__ft">
                     <a href="javascript:;" class="dialog__btn dialog__btn_confirm">去设置</a> 
@@ -478,7 +474,19 @@
                 if(kws_tips==undefined){
                     kws_tips = 0;
                 }
-                $(".classify").attr("tips",Number(kws_tips));
+				if (kws_tips==0&&classify_name.indexOf("未分类")>-1){
+	                //第一次进来分类提示
+	                showMeg();
+					var param = {};
+                    param.classify_index = classify_index;
+                    param.kws_tips = 1;
+                    $.post("/subscribepay/afterPay/updateUserTips",param,function(r){
+                        if(r.flag){
+                            kws_tips = param.kws_tips;
+                            $(".classify").attr("tips",kws_tips);
+                        }
+                    })
+				}
                 for (var i = _keyArr.length - 1; i >= 0; i--) {
                     var ak_showClass = 'hide';//是否显示附加词个数
                     var nk_showClass = 'hide';//是否显示排除词个数
@@ -534,7 +542,7 @@
                                 +'<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>'
                                 +'<button class="deleteKey">删除</button>'
-                                +'<button class="ascertainKey" onclick="saveK(this,'+i+')">确定</button>'
+                                +'<button class="ascertainKey" dataIndex="'+i+'" onclick="saveK(this)">确定</button>'
                                 +'</div>'
                                 +'</li>'
                 }
@@ -548,7 +556,7 @@
         }
         //跳转附加词
         function toappendkey(th){
-			history.replaceState("","","/front/vipsubscribe/toSetKeyWordPage?page=211")
+			history.replaceState("","","/front/vipsubscribe/toSetKeyWordPage?page=221")
             if(!$('.enter.addkeyWord').is(':hidden')){
                 if($('.addkeyWord input.enterOne').val()==""){
                     return
@@ -566,7 +574,7 @@
         }
         //
         function tonotkey(th){
-			history.replaceState("","","/front/vipsubscribe/toSetKeyWordPage?page=211")
+			history.replaceState("","","/front/vipsubscribe/toSetKeyWordPage?page=221")
             if(!$('.enter.addkeyWord').is(':hidden')){
                 if($('.addkeyWord input.enterOne').val()==""){
                     return
@@ -613,10 +621,11 @@
             sessionStorage.removeItem("kws_arr");
         }
         //保存关键词
-        function saveK(th,i){
+        function saveK(th){
             var $this = $(th);
+			var yuan_index = $this.attr("dataIndex")
             kws_name = $(th).siblings('textarea').val();
-			if(kws_arr[kws_name]!=undefined&&kws_arr[kws_name]!=(kws_index+"-"+classify_index)){
+			if(kws_arr[kws_name]!=undefined&&kws_arr[kws_name]!=(yuan_index+"-"+classify_index)){
                 weui.toast('您设置的关键词已存在,请调整后再添加。', {
                     duration: 2000,
                     className: 'custom-toast',
@@ -632,6 +641,7 @@
                 });
             }else{
                 if(saveData('SK')){
+					$this.attr("dataindex",kws_index);
                     $this.parent().siblings().find('.key').text(kws_name)
                     $this.parent().hide().siblings().show()
                     $('.addKeyWord').show();
@@ -680,6 +690,7 @@
         function doSessionData(t){
             //删除关键词
             if(t!="DK"){
+				kws_arr[kws_name] = kws_index+"-"+classify_index
                 if(kws_index == ($(".showKeyWord li").length-1)){
                     //新加
                     var karr = {"key":kws_name.split(" "),"appendkey":addition_kws,"notkey":not_kws}
@@ -697,6 +708,7 @@
                     a_items[classify_index]["a_key"][kws_index]["notkey"]= not_kws
                 }
             }else{
+				delete kws_arr[kws_name];
                 if (a_items[classify_index]["a_key"].length==1){
                     a_items.splice(classify_index,1);
                 }else{
@@ -710,7 +722,7 @@
             not_kws = [];
         }
     </script>
-    <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/keyWord.js?v={{Msg "seo" "version"}}124"></script>
+    <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/keyWord.js?v={{Msg "seo" "version"}}"></script>
     <script>
         // 设置一条空记录,用户第一次进入添加关键词点击确定时候调用
         function setEmptyHistory() {
@@ -751,8 +763,6 @@
                 $(".enter.addkeyWord").find("input").val("");
                 $(".enter.addkeyWord").show();
                 $(".add-keyword-container .addNewKeyword").hide();
-                //第一次进来分类提示
-                showMeg();
             })
             // 通过判断是那个隐藏来判断是添加关键词还是添加新分类
             $(".addNewKeyword i").on('click', function () {
@@ -773,7 +783,7 @@
                 
                 // 显示添加关键词的输入框
                 $(".enter.addkeyWord").find(".btnChoose button").eq(0).html('添加 附加词');
-                $(".enter.addkeyWord").find(".btnChoose button").eq(1).html('添加 附加词');
+                $(".enter.addkeyWord").find(".btnChoose button").eq(1).html('添加 排除词');
                 $(".enter.addkeyWord").find("input").val("");
                 $(".enter.addkeyWord").show();
                 $('.enterOne').focus();

+ 7 - 7
src/web/templates/weixin/vipsubscribe/messageType.html

@@ -52,7 +52,7 @@
                 </li>
                 <li>
                     <dl>
-                        <dt  dataValue="招标">招标公告</dt>
+                        <dt>招标公告</dt>
                         <dd>招标</dd>
                         <dd>邀标</dd>
                         <dd>询价</dd>
@@ -60,24 +60,24 @@
                         <dd>单一</dd>
                         <dd>竞价</dd>
                         <dd>变更</dd>
+                        <dd>其它</dd>
                     </dl>
                 </li>
                 <li>
                     <dl>
-                        <dt dataValue="结果">招标结果</dt>
+                        <dt>招标结果</dt>
                         <dd>中标</dd>
                         <dd>成交</dd>
                         <dd>废标</dd>
                         <dd>流标</dd>
                     </dl>
                 </li>
-                <li>
+                <li style="border-bottom: 0px;">
                     <dl>
-                        <dt style="width:2rem;" dataValue="其它">招标信用信息</dt>
+                        <dt style="width:2rem;">招标信用信息</dt>
                         <dd>合同</dd>
                         <dd>验收</dd>
                         <dd>违规</dd>
-                        <dd>其它</dd>
                     </dl>
                 </li>
             </ul>
@@ -249,14 +249,14 @@
             $('.list ul li dd').each(function(index,dom){
                 // 如果有所有dd被选中,就设置标记为true
                 // 也就是说,有一个dd没被选中,就设置标记为false
-                if (!$(dom).hasClass('active')) {
+                if ($(dom).hasClass('active')) {
                     _f = false
                 } 
             })
             $('.list ul li dt').each(function(index,dom){
                 // 如果有所有dd被选中,就设置标记为true
                 // 也就是说,有一个dd没被选中,就设置标记为false
-                if (!$(dom).hasClass('active')) {
+                if ($(dom).hasClass('active')) {
                     _f = false
                 } 
             })

+ 1 - 0
src/web/templates/weixin/vipsubscribe/trial_info.html

@@ -136,6 +136,7 @@
                         className: 'custom-toast',
                       });
                     }
+                    $(".checkCode").attr("src","/subscribepay/trial/captcha?rnd="+Math.random()); //刷新验证码  
                   })
                 }
             })

+ 6 - 2
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"}}">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/vip_index.css?v={{Msg "seo" "version"}}1">
 </head>
 
 <body style="visibility:hidden;">
@@ -29,7 +29,7 @@
             <div class="vip_info">
                 <div class="service">
                     <div class="s_left">
-                        <span class="free7days_pic">已开通VIP订阅服务</span>
+                        <span class="free7days_pic"></span>
                         <!-- <div class="already">
                             <img src="/vipsubscribe/image/v.png?v={{Msg "seo" "version"}}" alt="">
                             <h4>已开通VIP订阅服务</h4>
@@ -220,8 +220,12 @@
                    		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>')
+							$('.free7days_pic').text("VIP订阅服务");
 	                        $('.free7days_pic').append("<style>.free7days_pic::after{display:inline-block}</style>");
 	                   }else{
+							$(".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){

+ 20 - 27
src/web/templates/weixin/vipsubscribe/vip_introduce.html

@@ -66,20 +66,11 @@
                             <tbody>
                                 <tr>
                                     <td>
-                                        <p class="miantitle">最多<em style="color: #2CB7CA">10</em>组关键词</p>
-                                    </td>
-                                    <td>
-                                        <p class="miantitle">最多<em style="color: #2CB7CA">300</em>组关键词</p>
-                                        <p class="subtitle">更多关键词,招标信息更全面</p>
-                                    </td>  
-                                </tr>
-                                <tr>
-                                    <td>
-                                        <p class="miantitle">每天最多接收<em style="color: #2CB7CA">150</em>条</p>
+                                        <p class="miantitle">匹配单次公告信息</p>
                                     </td>
                                     <td>
-                                        <p class="miantitle">每天最多接收<em style="color: #2CB7CA">2000</em>条</p>
-                                        <p class="subtitle">更多招标信息,重要项目不遗漏</p>
+                                        <p class="miantitle">匹配项目信息</p>
+                                        <p class="subtitle">根据你的订阅,为你推送所匹配项目后续的全部动态</p>
                                     </td>  
                                 </tr>
                                 <tr>
@@ -87,46 +78,48 @@
                                         <p class="miantitle">-</p>
                                     </td>
                                     <td>
-                                        <p class="miantitle">数据周报、月报</p>
-                                        <p class="subtitle">每周、每月推送你的订阅数据统计报告,帮助你全面掌握行业市场动态</p>
+                                        <p class="miantitle">按行业订阅</p>
+                                        <p class="subtitle">不知道如何设置关键词的时候,也可以按行业订阅</p>
                                     </td>  
                                 </tr>
                                 <tr>
                                     <td>
-                                        <p class="miantitle">订阅区域精确到省</p>
+                                        <p class="miantitle">最多<em style="color: #2CB7CA">10</em>组关键词</p>
                                     </td>
                                     <td>
-                                        <p class="miantitle">订阅区域精确到市</p>
-                                        <p class="subtitle">只看你最关注的招标信息</p>
+                                        <p class="miantitle">最多<em style="color: #2CB7CA">300</em>组关键词</p>
+                                        <p class="subtitle">更多关键词,招标信息更全面</p>
                                     </td>  
                                 </tr>
-                                <tr>
+                                 <tr>
                                     <td>
-                                        <p class="miantitle">-</p>
+                                        <p class="miantitle">仅支持标题匹配</p>
                                     </td>
                                     <td>
-                                        <p class="miantitle">按行业订阅</p>
-                                        <p class="subtitle">不知道如何设置关键词的时候,也可以按行业订阅</p>
+                                        <p class="miantitle">支持标题匹配+全文匹配</p>
+                                        <p class="subtitle">关键词匹配标题或全文 任你选</p>
                                     </td>  
                                 </tr>
                                 <tr>
                                     <td>
-                                        <p class="miantitle">仅支持标题匹配</p>
+                                        <p class="miantitle">订阅区域精确到省</p>
                                     </td>
                                     <td>
-                                        <p class="miantitle">支持标题匹配+全文匹配</p>
-                                        <p class="subtitle">关键词匹配标题或全文 任你选</p>
+                                        <p class="miantitle">订阅区域精确到市</p>
+                                        <p class="subtitle">只看你最关注的招标信息</p>
                                     </td>  
                                 </tr>
+                                <!--
                                 <tr>
                                     <td>
-                                        <p class="miantitle">匹配单次公告信息</p>
+                                        <p class="miantitle">-</p>
                                     </td>
                                     <td>
-                                        <p class="miantitle">匹配项目信息</p>
-                                        <p class="subtitle">根据你的订阅,为你推送所匹配项目后续的全部动态</p>
+                                        <p class="miantitle">数据周报、月报</p>
+                                        <p class="subtitle">每周、每月推送你的订阅数据统计报告,帮助你全面掌握行业市场动态</p>
                                     </td>  
                                 </tr>
+                                -->
                             </tbody>
                         </table>
                     </div>

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

@@ -304,14 +304,9 @@
   							setTimeout(function(){
   								window.location.replace("/front/vipsubscribe/toPaySuccessPage?orderCode="+ordercode);
   							},500)
-  						}else if(r.err_msg == "get_brand_wcpay_request:cancel"){               
-                alert("开发环境【支付跳转完成】")
-                try{
-  								window.location.replace("/front/vipsubscribe/toPaySuccessPage?orderCode="+ordercode);
-                }catch(e){
-                  alert(e)
-                }
-  						}else{
+  						}else if(r.err_msg == "get_brand_wcpay_request:cancel"){
+                console.log("支付已取消")
+						  }else{
                 weui.toast("系统异常,请稍微再试",{
                   duration: 2000,
                   className: 'custom-toast',
@@ -422,7 +417,10 @@
             tmp +="个月"
             $("#monthly").prop('checked', true);
             $(".number_box:eq(0)").addClass("active");
-            $("#number_box_month .month_number").text(this.timeSelect[0])
+            $("#number_box_month .month_number").text(this.timeSelect[0]);
+            if (this.timeSelect[0] >= 10) {
+                $('.profit_tips').text("已选择"+this.timeSelect[0]+"个月,建议“按年订阅”更换算哦~").show();
+            }
           }
           $(".info.choose_time").val(tmp);
         },
@@ -537,7 +535,7 @@
               var firstButton = $('#number_box_month button:first')
               var lastButton = $('#number_box_month button:last')
               if (currentNum >= 10) {
-                  $('.profit_tips').show()
+                  $('.profit_tips').text("已选择"+currentNum+"个月,建议“按年订阅”更换算哦~").show()
               } else {
                   $('.profit_tips').hide()
               }
@@ -596,7 +594,7 @@
               // console.log($(this).is(':checked'))
               let isChecked = $(this).is(':checked')
               // 按年订阅默认选择1年 
-              //let val = 1;
+              let val = 1;
               //$('.computed_price').html('¥' + Number(val) * 58)
               if (isChecked) {
                   $('#number_box_year span:eq(0)').addClass('active').siblings().removeClass('active')

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

@@ -1,6 +1,6 @@
 <html>
 <head>
-	<title>招标订阅</title>
+	<title>推送设置</title>
 	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
 	<link href="{{Msg "seo" "cdn"}}/mobiscroll/mobiscroll.min.css" rel="stylesheet">
 	<link href="{{Msg "seo" "cdn"}}/css/common.css?v={{Msg "seo" "version"}}" rel="stylesheet">

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

@@ -413,7 +413,7 @@
 			var bs = nowYears+"/"+as+"/1";
 			var effects = new Date(bs).getTime() /1000;
 			var a = nowYears+"."+as+".01";
-			$(".notnownow").text(a + " - " + endTime)
+			$(".notnownow").text(a + " - " + endTime.replace(/-/g, "."))
 			if(ends < effects){
 				$(".effect_next").hide();
 //				$(".box").css("height", "2.7rem");
@@ -854,7 +854,7 @@
 			    //
 			    var nowDate = data.now.replace(/-/g, ".");
 			    var a = nowDate+ " - " +endTime;
-			    $(".nownow").text(nowDate+ " - " +endTime)
+			    $(".nownow").text(nowDate+ " - " +endTime.replace(/-/g, "."))
 			    
 			}
         },false);

+ 9 - 7
src/web/templates/weixin/wxkeyset/index.html

@@ -11,7 +11,7 @@
 <script src="{{Msg "seo" "cdn"}}/js/common.js?v={{Msg "seo" "version"}}"></script>
 <!-- 2.8.5 -->
 <link rel="stylesheet" href="/vipsubscribe/iconfont/iconfont.css" />
-<script src="/vipsubscribe/js/rem.js"></script>
+<script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
 <style>
 ._header {
     position: fixed;
@@ -194,6 +194,7 @@ $(function(){
 	}).on('compositionend', function(){
 	    $(this).prop('comStart', false);
 	}).blur(function(){
+		$("#ten").css("margin-bottom","1rem");
 		$(".vip_banner").show();
 		isfocusing = false;
 		var thisClass = $(this);
@@ -222,6 +223,7 @@ $(function(){
 			}
 		},300);
 	}).focus(function(){
+		$("#ten").css("margin-bottom","");
 		$(".vip_banner").hide();
 		$(".header,.keyWordContent").addClass("absolute");
 		if(focusinputindex != $(this).parents(".keyWordGroup").index()){
@@ -690,12 +692,6 @@ function tointroducepage(){
 </script>
 </head>
 <body class="keysetpage">
-	<div class="header">
-		<!--<span class="header-title">订阅关键词<img class="help" src="/images/help-b.png"></span>-->
-		<span class="header-title">订阅关键词</span>
-		<span class="complate hide">完成</span>
-		<span class="seniorset" style="float: right;font-size: 15px;color: #686868;"><img src="{{Msg "seo" "cdn"}}/images/wxkeyset/set.png" style="width: 17px;margin-right: 4px;margin-top: -3px;">推送设置</span>
-	</div>
 	<div class="vip_banner" style="">
 		<div class="box">
 			<div class="left">
@@ -705,6 +701,12 @@ function tointroducepage(){
 			<a onclick="tointroducepage()" class="right">了解详情 &gt; </a>
 		</div>
 	</div>
+	<div class="header">
+		<!--<span class="header-title">订阅关键词<img class="help" src="/images/help-b.png"></span>-->
+		<span class="header-title">订阅关键词</span>
+		<span class="complate hide">完成</span>
+		<span class="seniorset" style="float: right;font-size: 15px;color: #686868;"><img src="{{Msg "seo" "cdn"}}/images/wxkeyset/set.png" style="width: 17px;margin-right: 4px;margin-top: -3px;">推送设置</span>
+	</div>
 	<div class="keyWordContent _margin_b">
 		<div class="keyWordGroup">
 			<lable>1</lable>