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

Merge branch 'release' into dev2.5.1

wcj 6 жил өмнө
parent
commit
175d8cc188
23 өөрчлөгдсөн 484 нэмэгдсэн , 126 устгасан
  1. 14 4
      src/jfw/modules/app/src/config.json
  2. 10 1
      src/jfw/modules/app/src/jfw/front/front.go
  3. 12 5
      src/jfw/modules/app/src/jfw/front/login.go
  4. 89 1
      src/jfw/modules/app/src/jfw/front/me.go
  5. 6 0
      src/jfw/modules/app/src/jfw/front/search.go
  6. 14 17
      src/jfw/modules/app/src/web/staticres/jyapp/js/common.js
  7. 10 3
      src/jfw/modules/app/src/web/staticres/jyapp/js/wxEntsesearch.js
  8. 68 59
      src/jfw/modules/app/src/web/staticres/jyapp/js/wxSupersearch.js
  9. 2 4
      src/jfw/modules/app/src/web/staticres/jyapp/wxtsguide/main.js
  10. 2 2
      src/jfw/modules/app/src/web/templates/me/login.html
  11. 10 1
      src/jfw/modules/app/src/web/templates/me/set.html
  12. 20 2
      src/jfw/modules/app/src/web/templates/weixin/jylab/lab-cjss.html
  13. 1 1
      src/jfw/modules/app/src/web/templates/weixin/jylab/lab-gzqy.html
  14. 1 1
      src/jfw/modules/app/src/web/templates/weixin/jylab/lab-index.html
  15. 20 1
      src/jfw/modules/app/src/web/templates/weixin/jylab/lab-sjdc.html
  16. 22 2
      src/jfw/modules/app/src/web/templates/weixin/jylab/lab-zbqy.html
  17. 20 2
      src/jfw/modules/app/src/web/templates/weixin/jylab/lab-zndy.html
  18. 34 8
      src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html
  19. 43 1
      src/jfw/modules/app/src/web/templates/weixin/wxkeyset/index.html
  20. 21 2
      src/web/templates/weixin/jylab/lab-cjss.html
  21. 19 1
      src/web/templates/weixin/jylab/lab-sjdc.html
  22. 21 2
      src/web/templates/weixin/jylab/lab-zbqy.html
  23. 25 6
      src/web/templates/weixin/search/mainSearch.html

+ 14 - 4
src/jfw/modules/app/src/config.json

@@ -6,8 +6,8 @@
     "influxdb": "jy_logs",
     "elasticsearch": "http://192.168.3.18:9800",
     "elasticPoolSize": 30,
-    "redisaddrs": "other=192.168.3.18:2379,push=192.168.3.18:2379,sso=192.168.3.18:2379,session=192.168.3.18:2379",
-    "webport": "8010",
+    "redisaddrs": "other=192.168.3.18:2379,push=192.168.3.18:2379,sso=192.168.3.18:2379,session=192.168.3.18:3379",
+    "webport": "8081",
     "weixinrpc": "127.0.0.1:8083",
     "cassandra": [
         "192.168.3.207"
@@ -81,8 +81,8 @@
         ],
         "msg": "f 开关状态:%s //-2 从配置文件重置,-1 关闭,1 打开<br><br>c 并发数:%d //-2 不限制并发数,-1 无条件直接限制,>0 限制并发数<br><br>t 个人查询限制时间:%ds //-1 不限制<br><br>p 限制页数:%d"
     },
-	"share": {
-        "forceShareEnabled" : true,
+    "share": {
+        "forceShareEnabled": false,
         "onlineDate": "2018-08-20 00:00:00",
         "regDaysForNewUser": 5,
         "shareIntervalDays": 7,
@@ -90,5 +90,15 @@
         "endHour": 17,
         "shareTimesUpperLimitR": 4000,
         "shareTimesUpperLimitIrr": 1000
+    },
+    "appPushServiceRpc": "127.0.0.1:5566",
+    "appPower": {
+        "grayflag": false,
+        "openids": [
+            "ocXeA0jceF8KRunDkwf9egT4bKI8",
+            "ocXeA0nBnaRZhKEZYhMBGvd4NvH0",
+            "ocXeA0rBxfsr_4GzysQFzF3Cf81U",
+            "15737190152"
+        ]
     }
 }

+ 10 - 1
src/jfw/modules/app/src/jfw/front/front.go

@@ -4,6 +4,7 @@ import (
 	"fmt"
 	"jfw/config"
 	"jfw/forceShare"
+	jylabutil "jfw/jylabutil"
 	"jfw/limitsearch"
 	"jfw/tools"
 	"log"
@@ -64,7 +65,8 @@ type Front struct {
 	//修改强制分享主动分享状态和时间
 	updateShareStatus xweb.Mapper `xweb:"/jyapp/share/updateShareStatus"`
 	//隐私政策url
-	privacy xweb.Mapper `xweb:"/jyapp/free/privacy"`
+	privacy   xweb.Mapper `xweb:"/jyapp/free/privacy"`
+	changePro xweb.Mapper `xweb:"/jyapp/jylab/changePro"` //修改提示信息状态
 }
 
 var sewx util.SimpleEncrypt //微信的加密方法
@@ -575,3 +577,10 @@ func (s *Front) UpdateShareStatus() error {
 	s.ServeJson(map[string]interface{}{})
 	return nil
 }
+func (s *Front) ChangePro() {
+	defer util.Catch()
+	openid := s.GetSession("openid")
+	if openid != nil {
+		jylabutil.UpdateAuthory(openid.(string), "i_tablepro", 1)
+	}
+}

+ 12 - 5
src/jfw/modules/app/src/jfw/front/login.go

@@ -606,25 +606,31 @@ func (l *Login) UpdateRid() {
 			return ""
 		}
 		jpushid, _ := (*user)["s_jpushid"].(string)
-		if jpushid != "" {
+		if jpushid == rid {
 			return "exists"
 		}
 		l.SetSession("s_jpushid", rid)
+		phoneType := l.GetString("phoneType")
 		mongodb.Update("user", map[string]interface{}{
 			"s_m_openid": openid,
 			"i_appid":    2,
 		}, map[string]interface{}{
-			"$set":  map[string]interface{}{"s_jpushid": rid},
+			"$set": map[string]interface{}{
+				"s_jpushid":     rid,
+				"s_appponetype": phoneType,
+			},
 			"$pull": map[string]interface{}{"a_jpushid": rid},
 		}, false, false)
 		mongodb.Update("follow_project", map[string]interface{}{"s_openid": openid}, map[string]interface{}{
 			"$set": map[string]interface{}{
-				"s_jpushid": rid,
+				"s_jpushid":     rid,
+				"s_appponetype": phoneType,
 			},
 		}, false, true)
 		mongodb.Update("jylab_followent", map[string]interface{}{"s_openid": openid}, map[string]interface{}{
 			"$set": map[string]interface{}{
-				"s_jpushid": rid,
+				"s_jpushid":     rid,
+				"s_appponetype": phoneType,
 			},
 		}, false, true)
 		return createSign(openid, rid, "更新极光id后", qutil.IntAll(l.GetSession("i_type")))
@@ -887,13 +893,14 @@ func checkRepeatLogin(user *map[string]interface{}, rid string) {
 		//
 		go func() {
 			phoneType := qutil.ObjToString((*user)["s_appponetype"])
-			log.Println("极光推送,踢出下线", phoneType, s_m_openid, jpushid)
+			log.Println("踢人下线", phoneType, s_m_openid, jpushid)
 			signOutContent, _ := jgpush.Jgconfig.Title["signOut"].(string)
 			if phoneType == "HUAWEI" {
 				jyutil.AppPushServiceCall(map[string]interface{}{
 					"type":        "signOut",
 					"content":     signOutContent,
 					"deviceToken": jpushid,
+					"phoneType":   "HUAWEI",
 				})
 			} else {
 				options := jgpush.Jgconfig.Config.Options

+ 89 - 1
src/jfw/modules/app/src/jfw/front/me.go

@@ -2,8 +2,12 @@ package front
 
 import (
 	"jfw/config"
+	"log"
 	qutil "qfw/util"
+	"qfw/util/redis"
+	"strconv"
 	"strings"
+	"sync"
 
 	"github.com/go-xweb/xweb"
 )
@@ -20,6 +24,7 @@ type Me struct {
 	noticeDetail xweb.Mapper `xweb:"/jyapp/free/notice/detail/(.*)"` //通知
 	checkUpdate  xweb.Mapper `xweb:"/jyapp/free/checkUpdate"`        //检查是否更新
 	download     xweb.Mapper `xweb:"/jyapp/free/download/(weixin|normal)"`
+	updateMes    xweb.Mapper `xweb:"/jyapp/free/updateMes"` //修改检查是否更新配置文件
 }
 
 func init() {
@@ -110,7 +115,90 @@ func (l *Me) Updatepwd() error {
 	})
 	return nil
 }
+
+//
+var graylock = &sync.Mutex{}
+
 func (l *Me) CheckUpdate() error {
-	l.ServeJson(config.Sysconfig["update"])
+	defer qutil.Catch()
+	graylock.Lock()
+	defer graylock.Unlock()
+	powerarr, _ := config.Sysconfig["appPower"].(map[string]interface{})
+	var grayflag = powerarr["grayflag"].(bool)
+	var usertoken = l.GetString("token")
+	updata := config.Sysconfig["update"].(map[string]interface{})
+	updata["userflag"] = false
+	u, s := analySign("", usertoken)
+	if s == 1 {
+		if grayflag {
+			gray_str, err := redis.Exists("session", "grayusers_"+u.OpenId)
+			if err == nil {
+				updata["userflag"] = gray_str
+			}
+		} else {
+			updata["userflag"] = true
+		}
+	}
+	l.ServeJson(updata)
+	return nil
+}
+
+//
+
+func (l *Me) UpdateMes() error {
+	defer qutil.Catch()
+	openid, _ := l.GetSession("s_m_openid").(string)
+	powerarr, _ := config.Sysconfig["appPower"].(map[string]interface{})
+	openids := qutil.ObjArrToStringArr(powerarr["openids"].([]interface{}))
+	exitsflag := false
+	for _, v := range openids {
+		if v == openid {
+			exitsflag = true
+			break
+		}
+	}
+	if openid != "" && exitsflag {
+		rectype := l.GetString("rtp")
+		switch rectype {
+		case "U": //更新app版本信息
+			version := l.GetString("version")
+			updateflag, _ := l.GetBool("forceflag")
+			var updata = make(map[string]interface{})
+			updata = *qutil.ObjToMap(config.Sysconfig["update"])
+			if updata != nil {
+				updata["version"] = version
+				updata["mustupdate"] = updateflag
+				qutil.WriteSysConfig("../config.json", updata)
+			}
+			l.ServeJson(config.Sysconfig["update"])
+		case "S": //修改灰色发布内容
+			grayflag, _ := l.GetBool("grayflag") //灰色发布标识 true 进行灰色发布 false 进行正式发布
+			powerarr["grayflag"] = grayflag
+			qutil.WriteSysConfig("../config.json", powerarr["grayflag"])
+			graystr := l.GetString("grayusers")
+			var ok = false
+			if graystr != "" && len(strings.Split(graystr, ",")) > 0 {
+				var i = 0
+				for k, v := range strings.Split(graystr, ",") {
+					ok = redis.Put("session", "grayusers_"+v, strconv.Itoa(k), -1)
+					if ok {
+						i = i + 1
+					} else {
+						log.Println("lostuser:", v)
+					}
+				}
+				if i == len(strings.Split(graystr, ",")) {
+					ok = true
+				}
+			}
+			mes := map[string]interface{}{
+				"添加结果:": ok,
+				"修改权限:": powerarr,
+			}
+			l.ServeJson(mes)
+		}
+	} else {
+		l.ServeJson("无权限更新!")
+	}
 	return nil
 }

+ 6 - 0
src/jfw/modules/app/src/jfw/front/search.go

@@ -42,17 +42,23 @@ func (p *Search) Getstatus() error {
 	var entstatus bool
 	var tablepro bool
 	var dataexportstatus bool
+	var smartstatus bool
+	var followent bool
 	if p.GetSession("openid") != nil {
 		supstatus = jylabutil.IsAuthorized(p.GetSession("openid").(string), "i_supersearch")
 		entstatus = jylabutil.IsAuthorized(p.GetSession("openid").(string), "i_entsesearch")
 		tablepro = jylabutil.IsAuthorized(p.GetSession("openid").(string), "i_tablepro")
 		dataexportstatus = jylabutil.IsAuthorized(p.GetSession("openid").(string), "i_dataexport")
+		smartstatus = jylabutil.IsAuthorized(p.GetSession("openid").(string), "i_smartset")
+		followent = jylabutil.IsAuthorized(p.GetSession("openid").(string), "i_followent")
 	}
 	p.ServeJson(map[string]interface{}{
 		"supstatus":        supstatus,
 		"entstatus":        entstatus,
 		"tablepro":         tablepro,
 		"dataexportstatus": dataexportstatus,
+		"smartstatus":      smartstatus,
+		"followent":        followent,
 	})
 	return nil
 }

+ 14 - 17
src/jfw/modules/app/src/web/staticres/jyapp/js/common.js

@@ -247,35 +247,32 @@ function loginSuccess(result){
 			if(typeof(result.openid) != "undefined"){
 				sessionStorage.openid = result.openid;
 			}
-			//setTimeout(function(){
-				JyObj.loginSuccess("");
-			//},100)
+			JyObj.loginSuccess("");
 			window.history.back();
 		}else{
-			//setTimeout(function(){
-				JyObj.loginSuccess("S");//提示app定位搜索菜单
-			//},100)
-			window.location.href = "/jyapp/jylab/mainSearch";
+			JyObj.loginSuccess("S");//提示app定位搜索菜单
+			//window.location.href = "/jyapp/jylab/mainSearch";
+			location.replace("/jyapp/jylab/mainSearch");
 		}
 		return
 	}
 	//
 	var callBackUrl = getUrlParam("url",decodeURIComponent);
 	if(callBackUrl != null){
-		//setTimeout(function(){
-			JyObj.loginSuccess("");
-		//},100)
-		window.location.href = callBackUrl;
+		JyObj.loginSuccess("");
+		//window.location.href = callBackUrl;
+		location.replace(callBackUrl);
 		return
 	}
 	//
 	if(sessionStorage){
 		sessionStorage.mainSearchReload = "1";
 	}
-	//setTimeout(function(){
+	setTimeout(function(){
 		JyObj.loginSuccess("S");
-	//},100)
-	window.location.href = "/jyapp/jylab/mainSearch";
+	},100)
+	//window.location.href = "/jyapp/jylab/mainSearch";
+	//location.replace("/jyapp/jylab/mainSearch");
 }
 //
 $(function(){
@@ -301,13 +298,13 @@ $(function(){
 		$target.trigger("tap");
     });
 	$(".app-layout-header .app-back").unbind("tap").on("tap",function(){
-		if (!mySysIsIos()){
-			JyObj.backUrl("");
-		}
 		try{
 			afterClickBack();
 		}catch(e){}
 		//可以自定义返回url,不过是跳转的方式
+		if (history.length==1&&document.URL.indexOf("/jyapp/jylab/mainSearch")>-1){//无历史浏览记录,且在搜索页面
+			window.location.href = "/jyapp/jylab/mainSearch";
+		}
 		if(typeof(backUrl) != "undefined" && backUrl != null){
 			if(typeof(backUrl) == "string"){
 				window.location.href = backUrl;

+ 10 - 3
src/jfw/modules/app/src/web/staticres/jyapp/js/wxEntsesearch.js

@@ -4,7 +4,7 @@ var EntSearch = {
     noMoreCache: false,
 	dropload: null,
 	requesting: false,
-    noDataCache: false,//是否有列表数据
+    noDataCache: null,//是否有列表数据
     reqParam: {
         "searchname": "",
         "money_from": "",
@@ -327,7 +327,7 @@ var EntSearch = {
 	resetPage: function(flag){
 		this.requesting = false;
 		this.noMoreCache = false;
-		this.noDataCache = false;
+		this.noDataCache = null;
 		this.reqParam = {
             "searchname": "",
             "money_from": "",
@@ -390,9 +390,16 @@ var EntSearch = {
 		if(!sessionStorage){
 			return;
 		}
+		if(sessionStorage.entSearch_noDataCache=="null"){
+			EntSearch.noDataCache = null;
+        	$("#entsearchPage #set_search").addClass("hidden");
+        	$("#entsearchPage #wrapper").addClass("hidden");
+        	$("#entsearchPage .tip_m").addClass("hidden");
+			return
+		}
 		$("#entsearchPage #wrapper tbody tr").remove();
 		if(sessionStorage.entSearch_noDataCache=="true"){
-            EntSearch.noDataCache = false;
+            EntSearch.noDataCache = true;
             EntSearch.hasNoData();
 		}else if(sessionStorage.entSearch_listCache) {
             EntSearch.noMoreCache = sessionStorage.entSearch_noMoreCache;

+ 68 - 59
src/jfw/modules/app/src/web/staticres/jyapp/js/wxSupersearch.js

@@ -233,7 +233,9 @@ var SuperSearch = {
 		////
 		SuperSearch.njTipEasyPopup = new EasyPopup("nijianTip");
 		$("#supersearchPage .q-mark").on("tap",function(){
-			SuperSearch.njTipEasyPopup.show();
+			setTimeout(function(){
+				SuperSearch.njTipEasyPopup.show();
+			},500);
 		});
 		//金额点击事件
 		$("#supersearchPage .money-dialog .btn").on("tap",function(){
@@ -678,6 +680,7 @@ var SuperSearch = {
 		sessionStorage.removeItem("superSearch_limitFlag");
 		sessionStorage.removeItem("superSearch_maxprice");
 		sessionStorage.removeItem("superSearch_minprice");
+		sessionStorage.removeItem("superSearch_showNull");
 	},
 	//js 方法
 	resetSx: function(){         //清除筛选
@@ -966,7 +969,7 @@ var SuperSearch = {
 		var ListHtml='';
 		var TableHtml='';
 		for(var i=0;i<list.length;i++){
-			if(pageNum==1&&i==5&&!SuperSearch.advertIsClose&&$("#advertscript").length>0){
+			if(pageNum==1&&i==5&&!SuperSearch.advertIsClose){
 				ListHtml+='<div class="adv-wxsearch-center" id="E1"></div>'
 			}
 			var index = (pageNum-1)*pageSize+i+1;
@@ -1168,7 +1171,7 @@ var SuperSearch = {
 			}
 		}
 	
-		if(pageNum==1&&list.length<6&&!SuperSearch.advertIsClose&&$("#advertscript").length>0){
+		if(pageNum==1&&list.length<6&&!SuperSearch.advertIsClose){
 			ListHtml+='<div class="adv-wxsearch-center" id="E1">E1</div>'
 		}
 		html["ListHtml"]=ListHtml;
@@ -1501,74 +1504,80 @@ var SuperSearch = {
 			}
 			sessionStorage.superSearch_allSearchModel_isshow=$("#supersearchPage #allSearchModel").is(":visible");
 			sessionStorage.superSearch_limitFlag=SuperSearch.limitFlag;
+			sessionStorage.superSearch_showNull=SuperSearch.showNull;				
 	    }
 	},
 	setUpLastPage: function() {
 		if(!sessionStorage){
 			return;
 		}
-	    $("#supersearchPage .clearInpt").addClass("hidden");
-	    if(sessionStorage.superSearch_limitFlag=="true"){
-			SuperSearch.limitFlag = true;
+		if(sessionStorage.superSearch_showNull == "null"){
+			SuperSearch.showNull = null;
+			$("#supersearchPage .selLable").addClass("hidden");
 		}else{
-			SuperSearch.limitFlag = false;
-		}
-		//页面数据
-	    if(sessionStorage.superSearch_listContent==""){
-			SuperSearch.hasNoData();
-			$("#supersearchPage #hasNoData_tiptext>font").hide();
-			if(sessionStorage.superSearch_hasNoData_tiptext=="-1"){
-				$("#supersearchPage #hasNoData_tiptext>font:eq(1)").show();
-			}else if(sessionStorage.superSearch_hasNoData_tiptext=="-2"){
-				$("#supersearchPage #hasNoData_tiptext>font:eq(2)").show();
+		    $("#supersearchPage .clearInpt").addClass("hidden");
+		    if(sessionStorage.superSearch_limitFlag=="true"){
+				SuperSearch.limitFlag = true;
+			}else{
+				SuperSearch.limitFlag = false;
+			}
+			//页面数据
+		    if(sessionStorage.superSearch_listContent==""){
+				SuperSearch.hasNoData();
+				$("#supersearchPage #hasNoData_tiptext>font").hide();
+				if(sessionStorage.superSearch_hasNoData_tiptext=="-1"){
+					$("#supersearchPage #hasNoData_tiptext>font:eq(1)").show();
+				}else if(sessionStorage.superSearch_hasNoData_tiptext=="-2"){
+					$("#supersearchPage #hasNoData_tiptext>font:eq(2)").show();
+				}else{
+					$("#supersearchPage #hasNoData_tiptext>font:eq(0)").show();
+				}
+				if(sessionStorage.superSearch_allSearchModel_isshow=="true"){
+					$("#supersearchPage #allSearchModel").show();
+				}else{
+					$("#supersearchPage #allSearchModel").hide();
+				}
+		    }else{
+				SuperSearch.noMoreCache = sessionStorage.superSearch_noMoreCache;
+				SuperSearch.showNull = false;
+				var ListContent=$(sessionStorage.superSearch_listContent);
+				ListContent.on("tap", function(event){
+				    var h = $(this).find("a.bt").attr("s");
+				    var sid = $(this).find("a.bt").attr("sid");
+				    var sds = SuperSearch.s_words.replace(/\+/g,"+");
+					var industry = $(this).find(".industry").text();
+				    SuperSearch.myredirect(h,sid,sds,industry);
+				});
+				$("#supersearchPage #list").html(ListContent);
+				SuperSearch.initDropload(SuperSearch.noMoreCache!="true",sessionStorage.superSearch_pageNum);
+				var TableContent=$(sessionStorage.superSearch_tableContent);
+				TableContent.on("tap",function(event){
+				    var h =  $(this).attr("s");
+				    var sid = $(this).attr("sid");
+				    var sds = SuperSearch.s_words.replace(/\+/g,"+");
+					var industry = $(this).attr("i");
+				    SuperSearch.myredirect(h,sid,sds,industry);
+				});
+				$("#supersearchPage #table .data .content").html(TableContent);
+		    }
+			SuperSearch.appendInterceptWord(sessionStorage.superSearch_interceptWord);
+			if(sessionStorage.superSearch_advertIsClose == "false"){
+				SuperSearch.advertIsClose = false;
 			}else{
-				$("#supersearchPage #hasNoData_tiptext>font:eq(0)").show();
+				SuperSearch.advertIsClose = true;
 			}
-			if(sessionStorage.superSearch_allSearchModel_isshow=="true"){
-				$("#supersearchPage #allSearchModel").show();
+			if(sessionStorage.superSearch_dyDiv == "false"){
+				SuperSearch.dyDiv = false;
 			}else{
-				$("#supersearchPage #allSearchModel").hide();
+				SuperSearch.dyDiv = true;
 			}
-	    }else{
-			SuperSearch.noMoreCache = sessionStorage.superSearch_noMoreCache;
-			SuperSearch.showNull = false;
-			var ListContent=$(sessionStorage.superSearch_listContent);
-			ListContent.on("tap", function(event){
-			    var h = $(this).find("a.bt").attr("s");
-			    var sid = $(this).find("a.bt").attr("sid");
-			    var sds = SuperSearch.s_words.replace(/\+/g,"+");
-				var industry = $(this).find(".industry").text();
-			    SuperSearch.myredirect(h,sid,sds,industry);
-			});
-			$("#supersearchPage #list").html(ListContent);
-			SuperSearch.initDropload(SuperSearch.noMoreCache!="true",sessionStorage.superSearch_pageNum);
-			var TableContent=$(sessionStorage.superSearch_tableContent);
-			TableContent.on("tap",function(event){
-			    var h =  $(this).attr("s");
-			    var sid = $(this).attr("sid");
-			    var sds = SuperSearch.s_words.replace(/\+/g,"+");
-				var industry = $(this).attr("i");
-			    SuperSearch.myredirect(h,sid,sds,industry);
-			});
-			$("#supersearchPage #table .data .content").html(TableContent);
-	    }
-		SuperSearch.appendInterceptWord(sessionStorage.superSearch_interceptWord);
-		if(sessionStorage.superSearch_advertIsClose == "false"){
-			SuperSearch.advertIsClose = false;
-		}else{
-			SuperSearch.advertIsClose = true;
-		}
-		if(sessionStorage.superSearch_dyDiv == "false"){
-			SuperSearch.dyDiv = false;
-		}else{
-			SuperSearch.dyDiv = true;
+			var superSearch_yScroll = sessionStorage.superSearch_yScroll;
+			var superSearch_xScroll = sessionStorage.superSearch_xScroll;
+			setTimeout(function(){
+			    $("body").scrollTop(superSearch_yScroll);
+			    $("#supersearchPage #table .data").scrollLeft(superSearch_xScroll);
+			},50);
 		}
-		var superSearch_yScroll = sessionStorage.superSearch_yScroll;
-		var superSearch_xScroll = sessionStorage.superSearch_xScroll;
-		setTimeout(function(){
-		    $("body").scrollTop(superSearch_yScroll);
-		    $("#supersearchPage #table .data").scrollLeft(superSearch_xScroll);
-		},50);
 	    //筛选时间
 	    var ptime= sessionStorage.superSearch_publishtime;
 	    if(typeof(ptime) != "undefined" && ptime != ""){

+ 2 - 4
src/jfw/modules/app/src/web/staticres/jyapp/wxtsguide/main.js

@@ -63,12 +63,10 @@ var Guide = {
 			localStorage.removeItem("tsGuide_step");
 		}
 		$.post("/jyapp/tenderSubscribe/guide",{reqType: "over"},function(){
-			window.location.href = "/jyapp/wxkeyset/keyset/index";
 			if (!mySysIsIos()){
-				setTimeout(function(){
-					JyObj.finishGuide();
-				},100);
+				JyObj.finishGuide();
 			}
+			window.location.href = "/jyapp/wxkeyset/keyset/index";
 		});
 	},
 	//下一步

+ 2 - 2
src/jfw/modules/app/src/web/templates/me/login.html

@@ -92,9 +92,9 @@
 					//setTimeout(function(){
 						JyObj.backUrl("H");
 					//},100);
-					window.location.href = "/jyapp/jylab/mainSearch";
+					//window.location.href = "/jyapp/jylab/mainSearch";
 				}else{
-					JyObj.backUrl("");
+					//JyObj.backUrl("");
 					window.history.back();
 				}
 			});

+ 10 - 1
src/jfw/modules/app/src/web/templates/me/set.html

@@ -77,7 +77,7 @@
 			</div>
 		    <!--退出登录end-->
 			<!--版本号start-->
-			<div class="version" style="color: #888;font-size: 0.26rem;position: absolute;bottom: 0.2rem;text-align: center;width: 100%;">{{Msg "seo" "appVersion"}}</div>
+			<div class="version" style="color: #888;font-size: 0.26rem;position: absolute;bottom: 0.2rem;text-align: center;width: 100%;"></div>
 		    <!--版本号end-->
 			
 			<!--分享好友弹窗-->
@@ -118,6 +118,15 @@
 		}
 	 </script>
 	<script type="text/javascript">
+		$(function(){
+			var version = "";
+			setTimeout(function(){
+				version = JyObj.getVersion();
+				if(version!=""){
+					$(".version").text("当前版本:"+version);
+				}
+			},100)
+		})
 		$("#updatepwd").click(function(){
 			setLiActive(this);
 			window.location.href = "/jyapp/updatepwd";

+ 20 - 2
src/jfw/modules/app/src/web/templates/weixin/jylab/lab-cjss.html

@@ -33,9 +33,9 @@
 				<!--开关-->
 				<div class="weui-cells weui-cells_form title">
 					<div class="weui-cell weui-cell_switch titleInner">
-						<div class="weui-cell__bd">超级搜索 <a href="javascript:jumpTo();" id="searchuse" class="{{ if .T.switchstatus}}{{if ne .T.switchstatus true}}hidden{{end}}{{else}}hidden{{end}}">使用</a></div>
+						<div class="weui-cell__bd">超级搜索 <a href="javascript:jumpTo();" id="searchuse" class="hidden">使用</a></div>
 						<div class="weui-cell__ft">
-							<a id="check" class="weui-switch titleInput{{ if .T.switchstatus}}{{if eq .T.switchstatus true}} checked{{end}}{{end}}" style="display: block;"></a>
+							<a id="check" class="weui-switch titleInput" style="display: hidden;"></a>
 						</div>
 					</div>
 				</div>
@@ -139,6 +139,23 @@
 			}else{
 				$("#searchuse").addClass("hidden");
 			}
+		//
+			$.ajax({
+		        type:'post',
+		        url:'/jyapp/jylab/supsearch/getstatus',
+		        async:false,
+		        dataType:'json', 
+		        success:function(r){
+						if(r&&r.supstatus){
+							$("#check").addClass("checked");
+							$("#searchuse").removeClass("hidden");
+						}else{
+							$("#check").removeClass("checked");
+							$("#searchuse").addClass("hidden");
+						}
+						$("#check").css({"display":"block"});
+					}
+				})
 		})
 
         //行为采集 1-打开开关 2-点赞
@@ -175,6 +192,7 @@
 					sessionStorage.searchpageName = value;
 					window.history.back();
 				}else{
+					sessionStorage.searchpageName = "lab_search_back";
 					window.location.href = "/jyapp/jylab/mainSearch?v=s";
 				}
 			}else{

+ 1 - 1
src/jfw/modules/app/src/web/templates/weixin/jylab/lab-gzqy.html

@@ -162,7 +162,7 @@
 		$(function(){
 			$.ajax({
 		        type:'post',
-		        url:'/jylab/supsearch/getstatus',
+		        url:'/jyapp/jylab/supsearch/getstatus',
 		        async:false,
 		        dataType:'json', 
 		        success:function(r){

+ 1 - 1
src/jfw/modules/app/src/web/templates/weixin/jylab/lab-index.html

@@ -69,7 +69,7 @@ body{
 <!--	{{include "/common/footer.html"}}-->
 </body>
 <script>
-    var s_openid = {{.T.s_m_openid}};
+    var s_openid = {{session "s_m_openid"}};
 	//接收到新的推送
 	function afterReceiveNewMsg(){
 		showRedSpotOnMy();

+ 20 - 1
src/jfw/modules/app/src/web/templates/weixin/jylab/lab-sjdc.html

@@ -35,7 +35,7 @@
 					<div class="weui-cell weui-cell_switch titleInner">
 						<div class="weui-cell__bd">订阅数据导出</div>
 						<div class="weui-cell__ft">
-							<a id="check" class="weui-switch titleInput{{ if .T.switchstatus}}{{if eq .T.switchstatus true}} checked{{end}}{{end}}" style="display: block;"></a>
+							<a id="check" class="weui-switch titleInput" style="display: hidden;"></a>
 						</div>
 					</div>
 				</div>
@@ -156,6 +156,25 @@
 				});
             }
         }
+		//
+		$(function(){
+			$.ajax({
+		        type:'post',
+		        url:'/jyapp/jylab/supsearch/getstatus',
+		        async:false,
+		        dataType:'json', 
+		        success:function(r){
+						if(r&&r.dataexportstatus){
+							$("#check").addClass("checked");
+							$("#searchuse").removeClass("hidden");
+						}else{
+							$("#check").removeClass("checked");
+							$("#searchuse").addClass("hidden");
+						}
+						$("#check").css({"display":"block"});
+					}
+				})
+		})
 	</script>
 
 </html>

+ 22 - 2
src/jfw/modules/app/src/web/templates/weixin/jylab/lab-zbqy.html

@@ -33,9 +33,9 @@
 				<!--开关-->
 				<div class="weui-cells weui-cells_form title">
 					<div class="weui-cell weui-cell_switch titleInner">
-						<div class="weui-cell__bd">中标企业搜索<a href="javascript:jumpTo();" id="searchuse" class="{{ if .T.switchstatus}}{{if ne .T.switchstatus true}}hidden{{end}}{{else}}hidden{{end}}">使用</a></div>
+						<div class="weui-cell__bd">中标企业搜索<a href="javascript:jumpTo();" id="searchuse" class="hidden">使用</a></div>
 						<div class="weui-cell__ft">
-							<a id="check" class="weui-switch titleInput{{ if .T.switchstatus}}{{if eq .T.switchstatus true}} checked{{end}}{{end}}" style="display: block;"></a>
+							<a id="check" class="weui-switch titleInput" style="display: hidden;"></a>
 						</div>
 					</div>
 				</div>
@@ -147,12 +147,32 @@
 					sessionStorage.searchpageName = value;
 					window.history.back();
 				}else{
+					sessionStorage.searchpageName = "lab_ent_back";
 					window.location.href = "/jyapp/jylab/mainSearch?v=e";
 				}
 			}else{
 				window.location.href = "/jyapp/jylab/mainSearch?v=e";
 			}
 		}
+		//
+		$(function(){
+			$.ajax({
+		        type:'post',
+		        url:'/jyapp/jylab/supsearch/getstatus',
+		        async:false,
+		        dataType:'json', 
+		        success:function(r){
+						if(r&&r.entstatus){
+							$("#check").addClass("checked");
+							$("#searchuse").removeClass("hidden");
+						}else{
+							$("#check").removeClass("checked");
+							$("#searchuse").addClass("hidden");
+						}
+						$("#check").css({"display":"block"});
+					}
+				})
+		})
 	</script>
 
 </html>

+ 20 - 2
src/jfw/modules/app/src/web/templates/weixin/jylab/lab-zndy.html

@@ -35,7 +35,7 @@
 					<div class="weui-cell weui-cell_switch titleInner">
 						<div class="weui-cell__bd">智能订阅模式</div>
 						<div class="weui-cell__ft">
-							<a id="check" class="weui-switch titleInput{{ if .T.switchstatus}}{{if eq .T.switchstatus true}} checked{{end}}{{end}}" style="display: block;"></a>
+							<a id="check" class="weui-switch titleInput" style="display: hidden;"></a>
 						</div>
 					</div>
 				</div>
@@ -166,7 +166,25 @@
 				});
             }
         }
-		
+		//
+		$(function(){
+			$.ajax({
+		        type:'post',
+		        url:'/jyapp/jylab/supsearch/getstatus',
+		        async:false,
+		        dataType:'json', 
+		        success:function(r){
+						if(r&&r.smartstatus){
+							$("#check").addClass("checked");
+							$("#searchuse").removeClass("hidden");
+						}else{
+							$("#check").removeClass("checked");
+							$("#searchuse").addClass("hidden");
+						}
+						$("#check").css({"display":"block"});
+					}
+				})
+		})
 	</script>
 
 </html>

+ 34 - 8
src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html

@@ -19,7 +19,7 @@
 <script src="/jyapp/mobiscroll/mobiscroll.min.js"></script>
 <script src="/jyapp/js/dropload.js?v={{Msg "seo" "version"}}"></script>
 <script type="text/javascript" src="/jyapp/js/wxEntsesearch.js?v={{Msg "seo" "version"}}"></script>
-<script type="text/javascript" src="/jyapp/js/wxSupersearch.js?v={{Msg "seo" "version"}}1314"></script>
+<script type="text/javascript" src="/jyapp/js/wxSupersearch.js?v={{Msg "seo" "version"}}"></script>
 <title>搜索</title>
 <script type="text/javascript">
 	var s_openid = {{session "s_m_openid"}};
@@ -538,7 +538,7 @@
 	var random=Math.floor(Math.random()*ADList.length)
 	var AD=ADList[random]
 	var ADHtml="<span class=\"closeadv-bg\"></span>"
-	+"<img src=\"/images/wxqc.png\" class=\"closeadv\" onclick=\"SuperSearch.closeadv(this)\">";
+	+"<img src=\"/jyapp/images/wxqc.png\" class=\"closeadv\" onclick=\"SuperSearch.closeadv(this)\">";
 	if(AD.s_pic){
 		if(AD.s_link){
 			if (AD.s_link.indexOf("w2b")>-1||AD.s_link.indexOf("jianyu360")>-1){
@@ -629,8 +629,21 @@
             window.event.returnValue = false;
 			//超级搜索
 			if(SuperSearch.isMyPage){
+				var max=$("#supersearchPage .maxMrice").val(),min=$("#supersearchPage .minMrice").val();
+		        if(Number(max)<Number(min)&&max!=""&&min!=""){
+		            $("#supersearchPage .maxMrice").val(min);
+		            $("#supersearchPage .minMrice").val(max);
+				}
 				SuperSearch.formSubmit("N");
 			}else if(EntSearch.isMyPage){//企业搜索
+				var money_from = $.trim($("#entsearchPage #money_from").val());
+	            var money_to = $.trim($("#entsearchPage #money_to").val());
+	            var from = parseFloat(money_from);
+	            var to = parseFloat(money_to);
+	            if(from>to){
+	                $("#entsearchPage #money_from").val(money_to);
+	                $("#entsearchPage #money_to").val(money_from);
+				}
 	            EntSearch.formSubmit();
 			}
         }
@@ -672,13 +685,20 @@
 	    $(".rightHref").on("click",function(){
 			JyObj.openExternalLink('http://mp.weixin.qq.com/mp/homepage?__biz=MzIyNTM1NDUyNw==&hid=3&sn=badf2d7da08654c58b58169e773f58f0#wechat_redirect','使用帮助')
 	    });
-		var pageType = getUrlParam("v");
-		if(pageType == "s"){
-			SuperSearch.init(true,false,false);
-		}else if(pageType == "e"){
-			EntSearch.init(true,false,false);
-		}
+		//var pageType = getUrlParam("v");
+		//if(pageType == "s"){
+		//	SuperSearch.init(true,false,false);
+		//}else if(pageType == "e"){
+		//	EntSearch.init(true,false,false);
+		//}
 	});
+	function beforeOpenPushMessage(result){
+		if(SuperSearch.isMyPage){
+			SuperSearch.setSessionStorage();
+		}else if(EntSearch.isMyPage){
+			EntSearch.setSessionStorage();
+		}
+	}
 	function checkIsOpen(){
 		$(".content ul li a:eq(0)").unbind("tap");
 		$(".content ul li a:eq(1)").unbind("tap");
@@ -728,6 +748,12 @@
 			}else if(sessionStorage.searchpageName == "entSearch_back"){
 				EntSearch.init(true,false,true);
 				initFlag = 4;
+			}else if(sessionStorage.searchpageName == "lab_search_back"){
+				SuperSearch.init(true,false,false);
+				initFlag = 5;
+			}else if(sessionStorage.searchpageName == "lab_ent_back"){
+				EntSearch.init(true,false,false);
+				initFlag = 6;
 			}
 		}
 	}

+ 43 - 1
src/jfw/modules/app/src/web/templates/weixin/wxkeyset/index.html

@@ -131,6 +131,7 @@ $(function(){
 				return;
 			}
 			$(".header,.keyWordContent").removeClass("absolute");
+			keysswith(thisClass.val(),thisClass.parents(".keyWordGroup").index());
 			thisClass.parents(".keyWordGroup").nextAll(".keyWordGroup").show();
 			$(".brace").hide();
 			$(".complate").addClass("hide");
@@ -233,6 +234,48 @@ function removesurp(){
 		disflagtwo = false;
 	}
 }
+function keysswith(lastkey,lastnum){
+	var swithint = 0;
+	var swithflag = false;
+	if(lastkey!=""){
+		$(".keyWordGroup").each(function(i){
+			var keyval = $(this).find(".keyword").val();
+			swithint = i;
+			if(keyval==""&&!swithflag){
+				swithflag = true;
+				if(lastnum!=lastkey&&swithint<=lastnum){
+					$(this).find(".keyword").val(lastkey);
+					$(this).addClass("hasinput");
+					return swithflag;
+				}else{
+					return false;
+				}
+			}
+			if(swithflag&&(swithint==lastnum)){
+				$(this).find(".keyword").val("");
+				$(this).removeClass("hasinput");
+				return false;
+			}
+		})
+	}else{
+		$(".keyWordGroup").each(function(i){
+			if(i>lastnum){
+				var keyay = $(this).find(".keyword").val();
+				var keycn = $(this).attr("class");
+				$(this).prev(".keyWordGroup").find(".keyword").val(keyay);
+				if(keyay!=""){
+					$(this).prev(".keyWordGroup").attr("class",keycn);
+				}else{
+					$(this).prev(".keyWordGroup").attr("class","keyWordGroup");
+				}
+				if(i==9){
+					$(this).find(".keyword").val("");
+					$(this).attr("class","keyWordGroup");
+				}
+			}
+		})
+	}
+}
 //
 function surswitch(){
 	$("#surprise").fadeOut("normal");
@@ -603,7 +646,6 @@ function hideTip() {
     localStorage.hasTopMsg="false";
 }
 function afterKeyboardShow(){
-	alert("1111")
 	$(".app-layout-footer").hide();
 }
 function afterKeyboardHide(){

+ 21 - 2
src/web/templates/weixin/jylab/lab-cjss.html

@@ -33,9 +33,9 @@
 			<!--开关-->
 			<div class="weui-cells weui-cells_form title">
 				<div class="weui-cell weui-cell_switch titleInner">
-					<div class="weui-cell__bd">超级搜索 <a href="javascript:jumpTo();" id="searchuse" class="{{ if .T.switchstatus}}{{if ne .T.switchstatus true}}hidden{{end}}{{else}}hidden{{end}}">使用</a></div>
+					<div class="weui-cell__bd">超级搜索 <a href="javascript:jumpTo();" id="searchuse" class="hidden">使用</a></div>
 					<div class="weui-cell__ft">
-						<a id="check" class="weui-switch titleInput{{ if .T.switchstatus}}{{if eq .T.switchstatus true}} checked{{end}}{{end}}" style="display: block;"></a>
+						<a id="check" class="weui-switch titleInput" style="display: hidden;"></a>
 					</div>
 				</div>
 			</div>
@@ -144,12 +144,31 @@
 					sessionStorage.searchpageName = value;
 					window.history.back();
 				}else{
+					sessionStorage.searchpageName = "lab_search_back";
 					window.location.href = "/jylab/mainSearch?v=s";
 				}
 			}else{
 				window.location.href = "/jylab/mainSearch?v=s";
 			}
 		}
+		$(function(){
+			$.ajax({
+		        type:'post',
+		        url:'/jylab/supsearch/getstatus',
+		        async:false,
+		        dataType:'json', 
+		        success:function(r){
+						if(r&&r.supstatus){
+							$("#check").addClass("checked");
+							$("#searchuse").removeClass("hidden");
+						}else{
+							$("#check").removeClass("checked");
+							$("#searchuse").addClass("hidden");
+						}
+						$("#check").css({"display":"block"});
+					}
+				})
+		})
 	</script>
 </body>
 </html>

+ 19 - 1
src/web/templates/weixin/jylab/lab-sjdc.html

@@ -35,7 +35,7 @@
 				<div class="weui-cell weui-cell_switch titleInner">
 					<div class="weui-cell__bd">订阅数据导出</div>
 					<div class="weui-cell__ft">
-						<a id="check" class="weui-switch titleInput{{ if .T.switchstatus}}{{if eq .T.switchstatus true}} checked{{end}}{{end}}" style="display: block;"></a>
+						<a id="check" class="weui-switch titleInput" style="display: hidden;"></a>
 					</div>
 				</div>
 			</div>
@@ -129,6 +129,24 @@
 				});
             }
         }
+		$(function(){
+			$.ajax({
+		        type:'post',
+		        url:'/jylab/supsearch/getstatus',
+		        async:false,
+		        dataType:'json', 
+		        success:function(r){
+						if(r&&r.dataexportstatus){
+							$("#check").addClass("checked");
+							$("#searchuse").removeClass("hidden");
+						}else{
+							$("#check").removeClass("checked");
+							$("#searchuse").addClass("hidden");
+						}
+						$("#check").css({"display":"block"});
+					}
+				})
+		})
 	</script>
 </body>
 </html>

+ 21 - 2
src/web/templates/weixin/jylab/lab-zbqy.html

@@ -33,9 +33,9 @@
 			<!--开关-->
 			<div class="weui-cells weui-cells_form title">
 				<div class="weui-cell weui-cell_switch titleInner">
-					<div class="weui-cell__bd">中标企业搜索<a href="javascript:jumpTo();" id="searchuse" class="{{ if .T.switchstatus}}{{if ne .T.switchstatus true}}hidden{{end}}{{else}}hidden{{end}}">使用</a></div>
+					<div class="weui-cell__bd">中标企业搜索<a href="javascript:jumpTo();" id="searchuse" class="hidden">使用</a></div>
 					<div class="weui-cell__ft">
-						<a id="check" class="weui-switch titleInput{{ if .T.switchstatus}}{{if eq .T.switchstatus true}} checked{{end}}{{end}}" style="display: block;"></a>
+						<a id="check" class="weui-switch titleInput" style="display: hidden;"></a>
 					</div>
 				</div>
 			</div>
@@ -119,12 +119,31 @@
 					sessionStorage.searchpageName = value;
 					window.history.back();
 				}else{
+					sessionStorage.searchpageName = "lab_ent_back";
 					window.location.href = "/jylab/mainSearch?v=e";
 				}
 			}else{
 				window.location.href = "/jylab/mainSearch?v=e";
 			}
 		}
+		$(function(){
+			$.ajax({
+		        type:'post',
+		        url:'/jylab/supsearch/getstatus',
+		        async:false,
+		        dataType:'json', 
+		        success:function(r){
+						if(r&&r.entstatus){
+							$("#check").addClass("checked");
+							$("#searchuse").removeClass("hidden");
+						}else{
+							$("#check").removeClass("checked");
+							$("#searchuse").addClass("hidden");
+						}
+						$("#check").css({"display":"block"});
+					}
+				})
+		})
 	</script>
 </body>
 </html>

+ 25 - 6
src/web/templates/weixin/search/mainSearch.html

@@ -583,8 +583,21 @@
             window.event.returnValue = false;
 			//超级搜索
 			if(SuperSearch.isMyPage){
+				var max=$("#supersearchPage .maxMrice").val(),min=$("#supersearchPage .minMrice").val();
+		        if(Number(max)<Number(min)&&max!=""&&min!=""){
+		            $("#supersearchPage .maxMrice").val(min);
+		            $("#supersearchPage .minMrice").val(max);
+				}
 				SuperSearch.formSubmit("N");
 			}else if(EntSearch.isMyPage){//企业搜索
+				var money_from = $.trim($("#entsearchPage #money_from").val());
+	            var money_to = $.trim($("#entsearchPage #money_to").val());
+	            var from = parseFloat(money_from);
+	            var to = parseFloat(money_to);
+	            if(from>to){
+	                $("#entsearchPage #money_from").val(money_to);
+	                $("#entsearchPage #money_to").val(money_from);
+				}
 	            EntSearch.formSubmit();
 			}
         }
@@ -629,12 +642,12 @@
 	    $(".rightHref").click(function(){
 	        window.open("http://mp.weixin.qq.com/mp/homepage?__biz=MzIyNTM1NDUyNw==&hid=2&sn=379fc869080a36d9d0798a3d4fb9a63a#wechat_redirect");
 	    });
-		var pageType = getUrlParam("v");
-		if(pageType == "s"){
-			SuperSearch.init(true,false,false);
-		}else if(pageType == "e"){
-			EntSearch.init(true,false,false);
-		}
+		//var pageType = getUrlParam("v");
+		//if(pageType == "s"){
+		//	SuperSearch.init(true,false,false);
+		//}else if(pageType == "e"){
+		//	EntSearch.init(true,false,false);
+		//}
 	//});
 	function checkIsOpen(){
 		$(".content ul li a:eq(0)").unbind("tap");
@@ -678,6 +691,12 @@
 			}else if(sessionStorage.searchpageName == "entSearch_back"){
 				EntSearch.init(true,false,true);
 				initFlag = 4;
+			}else if(sessionStorage.searchpageName == "lab_search_back"){
+				SuperSearch.init(true,false,false);
+				initFlag = 5;
+			}else if(sessionStorage.searchpageName == "lab_ent_back"){
+				EntSearch.init(true,false,false);
+				initFlag = 6;
 			}
 		}
 	}