Pārlūkot izejas kodu

Merge branch 'develop' of 192.168.3.17:zhanghongbo/qfw into develop

wangshan 9 gadi atpakaļ
vecāks
revīzija
d1a0006f75

+ 0 - 3
core/src/web/staticres/css/entcommunity.css

@@ -553,9 +553,6 @@ a:focus, a:hover{
 	padding-bottom: 0px !important;
 }
 .ent-serviceintroduction{
-	height: 60px;
-	overflow: hidden;
-	text-overflow: ellipsis;
 	word-wrap: break-word;
 	word-break: break-all;
 	white-space: normal !important;

+ 3 - 3
core/src/web/staticres/js/entportrait.js

@@ -156,17 +156,17 @@ function ServiceList(){
 					html += '<td>&nbsp;</td><td>&nbsp;</td>';
 				}
 				html += '</tr><tr>'
-					+'<td colspan="3"><div class="ent-serviceintroduction"><div>'+r[i].s_introduction+'</div></div></td>'
+					+'<td colspan="3"><div class="ent-serviceintroduction">'+r[i].s_introduction+'</div></td>'
 					+'</tr>';
 			}
 			$("#serviceListPaging").parent().prevAll().remove();
 			$("#serviceListPaging").parent().before(html);
-			$(".ent-serviceintroduction").each(function(){
+			/*$(".ent-serviceintroduction").each(function(){
 				console.info($(this).height() +"------"+ $(this).children("div").height());
 				if($(this).height() < $(this).children("div").height()){
 					$(this).parent().append("......");
 				}
-			});
+			});*/
 		});
 	});
 }

BIN
core/src/web/staticres/wxswordfish/images/guide-0.png


+ 125 - 22
core/src/web/templates/swordfish/wxshare.html

@@ -1,34 +1,137 @@
-<html >
+<html>
 <head>
-<title>企明星-剑鱼</title>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
-<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0" user-scalable="no" />
-<meta name="renderer" content="webkit">
-<link href="/css/bootstrap.min.css" rel="stylesheet">
-
+<title>企明星-剑鱼-演示</title>
+<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+<link href="/wxswordfish/style.css" rel="stylesheet">
+<link href="/swiper/swiper.min.css" rel="stylesheet">
 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
 <script src="/js/jquery.js"></script>
-<script src="/js/bootstrap.min.js"></script>
-
 <script src="/wxswordfish/share.js"></script>
+<script src="/swiper/swiper.min.js"></script>
 <script>
 	initShare({{.T.signature}},{{.T.shareid}});
 </script>
 </head>
-<body style="margin:0px; background-color:#C5F7FE;">
-<img src="/wxswordfish/images/share-cj.jpg" class="img-responsive" alt="Cinque Terre">
-<img id="img2" style="position:absolute;" class="img-responsive" src="/front/weixinshare/{{.T.shareid}}" >
-</body>
-<script>
+<body>
+<div class="swiper-container">
+    <div class="swiper-wrapper">
+        <div class="swiper-slide">
+			<img src="/wxswordfish/images/guide-0.png" alt="Cinque Terre">
+			<img id="QRcode" style="position:absolute;z-index: 2;" src="/front/weixinshare/{{.T.shareid}}" >
+		</div>
+       	<div class="swiper-slide">
+			<img src="/wxswordfish/images/guide-2.png">
+		</div>
+       	<div class="swiper-slide">
+			<img src="/wxswordfish/images/guide-3.png">
+		</div>
+		<div class="swiper-slide">
+			<img src="/wxswordfish/images/guide-4.png">
+		</div>
+		<div class="swiper-slide">
+			<img src="/wxswordfish/images/guide-5.png">
+		</div>
+		<div class="swiper-slide">
+			<img src="/wxswordfish/images/guide-0.png">
+		</div>
+    </div>
+    <!-- 如果需要分页器 -->
+   	<div class="swiper-pagination"></div>
+	<div class="guide-bottom">
+		<img class="arrow-up" src="/wxswordfish/images/up.png">
+		<img src="/wxswordfish/images/index.png" class="jumpGuide" onclick="backToIndex()">
+	</div>
+</div>
+<script type="text/javascript">
+var mySwiper = null;
+var currentIndex = 0;
 $(function(){
-	var width=$(window).width();
-	var max=750
-	if(width>max){
-		width=max
+	initShare({{.T.signature}},{{.T.shareid}});
+	var width = $(window).width();
+	var height = $(window).height();
+	var defaultHeight = 416;
+	var max = 750;
+	if(width > max){
+		width = max;
 	}
-	$("#img2").css({"width":width*0.48,"top":width*0.78,"left":width*0.26})
-	
-})
+	width = width*0.48;
+	var top = 330;
+	if(height > defaultHeight){
+		top = top / defaultHeight * height;
+	}
+	$("#QRcode").css({"width":width,"height":width,"top": top-width,"left":"50%","margin-left": -(width/2)});
+	$(".bottom-toolbar,.feedback-dialog").remove();
+	var flag = true;
+	mySwiper = new Swiper('.swiper-container', {
+		loop: true,
+        pagination: '.swiper-pagination',
+        paginationClickable: false,
+        direction: 'vertical',
+		touchMoveStopPropagation: false,
+		virtualTranslate: true,
+		onInit: function(swiper){
+			$("[data-swiper-slide-index='5']>img").attr("src","/wxswordfish/images/guide-6.png");
+		},
+		onSlideChangeStart: function(swiper){
+			if(flag){
+				flag = false;
+				return;
+			}
+			var prevSlide = $(swiper.slides[swiper.previousIndex]);
+			prevSlide.addClass("slide-active");
+			var activeSlide = $(swiper.slides[swiper.activeIndex]);
+			if(currentIndex == 0 && swiper.activeIndex == 0){
+				activeSlide.addClass("slide-down");
+			}else{
+				if(currentIndex > swiper.activeIndex){
+					activeSlide.addClass("slide-down");
+				}else if(currentIndex < swiper.activeIndex){
+					activeSlide.addClass("slide-up");
+				}
+			}
+			currentIndex = swiper.activeIndex;
+			if(currentIndex == 7){
+				currentIndex = 0;
+			}
+			if(swiper.isEnd || swiper.activeIndex == 1){
+				$("#QRcode").show();
+			}else{
+				$("#QRcode").hide();
+			}
+			activeSlide.one("webkitAnimationEnd",function(){
+				$(this).removeClass("slide-up").removeClass("slide-down");
+				prevSlide.removeClass("slide-active");
+			});
+		}
+    });
+	/*
+	var imgHeight = 1159;
+	var imgWidth = 750;
+	var width = document.body.clientWidth;
+	var height = document.body.clientHeight;
+	if(imgWidth > width){
+		var h = width / imgWidth * imgHeight;
+		$(".swiper-slide img").css({width: width,height: h,marginTop: -(h / 2)});
+	}else if(imgHeight > height){
+		$(".swiper-slide img").css({width: height / imgHeight * imgWidth,height: height,marginTop: -(height / 2)});
+	}*/
+});
+function backToIndex(){
+	if(mySwiper == null || mySwiper.activeIndex == 1){
+		return;
+	}
+	currentIndex = 1;
+	var prevSlide = $(mySwiper.slides[mySwiper.activeIndex]);
+	prevSlide.addClass("slide-active");
+	var activeSlide = $(mySwiper.slides[1]);
+	activeSlide.addClass("slide-down");
+	activeSlide.one("webkitAnimationEnd",function(){
+		$(this).removeClass("slide-up").removeClass("slide-down");
+		prevSlide.removeClass("slide-active");
+		mySwiper.slideTo(1, 1000, false);
+		$("#QRcode").show();
+	});
+}
 </script>
+</body>
 </html>

+ 34 - 0
core/src/web/templates/swordfish/wxshare_copy.html

@@ -0,0 +1,34 @@
+<html >
+<head>
+<title>企明星-剑鱼</title>
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
+<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0" user-scalable="no" />
+<meta name="renderer" content="webkit">
+<link href="/css/bootstrap.min.css" rel="stylesheet">
+
+<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
+<script src="/js/jquery.js"></script>
+<script src="/js/bootstrap.min.js"></script>
+
+<script src="/wxswordfish/share.js"></script>
+<script>
+	initShare({{.T.signature}},{{.T.shareid}});
+</script>
+</head>
+<body style="margin:0px; background-color:#C5F7FE;">
+<img src="/wxswordfish/images/share-cj.jpg" class="img-responsive" alt="Cinque Terre">
+<img id="img2" style="position:absolute;" class="img-responsive" src="/front/weixinshare/{{.T.shareid}}" >
+</body>
+<script>
+$(function(){
+	var width=$(window).width();
+	var max=750
+	if(width>max){
+		width=max
+	}
+	$("#img2").css({"width":width*0.48,"top":width*0.78,"left":width*0.26})
+	
+})
+</script>
+</html>

+ 25 - 0
df

@@ -0,0 +1,25 @@
+diff --cc core/src/timetask.json
+index 0eba9db,8be7bc9..0000000
+--- a/core/src/timetask.json
++++ b/core/src/timetask.json
+@@@ -1,1 -1,1 +1,5 @@@
+- {"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-01-28 09:39:35"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-01-28 09:39:35"}},"marketisstart":true,"marketrate":300}
+ -{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-01-28 12:54:36"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-01-28 12:54:36"}},"marketisstart":true,"marketrate":300}
+++<<<<<<< HEAD
+++{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-01-28 09:39:35"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-01-28 09:39:35"}},"marketisstart":true,"marketrate":300}
+++=======
+++{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-01-28 12:54:36"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-01-28 12:54:36"}},"marketisstart":true,"marketrate":300}
+++>>>>>>> e697f24fdd22cbe16dc2ce282d2d1689a6e445a7
+diff --git a/common/src/qfw/util/sq/sq.go b/common/src/qfw/util/sq/sq.go
+index 96ac697..11e2d32 100644
+--- a/common/src/qfw/util/sq/sq.go
++++ b/common/src/qfw/util/sq/sq.go
+@@ -13,7 +13,7 @@ import (
+ const key string = "qmx20150708one_versionV1.0"
+ 
+ func init() {
+-	CheckSq()
++	//CheckSq()
+ }
+ 
+ func CheckSq() bool {

+ 8 - 2
spider2/src/client/ecps/ln/downcontent.go

@@ -24,7 +24,7 @@ func downloadContent(param map[string]interface{}) (bool, map[string]interface{}
 		return false, nil
 	}
 	//log.Println(query)
-	//query = "211200004026325"
+	//query = "210200400048103"
 	var checkcode string
 	reg, _ := regexp.Compile("(\\d{4})")
 	var cookies []*http.Cookie
@@ -86,14 +86,20 @@ func downloadContent(param map[string]interface{}) (bool, map[string]interface{}
 	doc, _ := goquery.NewDocumentFromReader(bytes.NewBuffer(listbs))
 	info := getListInfo(doc)
 	if info == nil || info["regno"] == nil {
+		log.Println(query, "无对应查询结果")
 		return false, nil
 	}
 	regno := info["regno"].(string)
 	if regno == "" {
 		return false, nil
 	}
-	pripid := info["pripid"].(string)
+	//查询结果不匹配,用来防止死循环
 	entname := info["entname"].(string)
+	if (entname != query) && (regno != query) {
+		log.Println(query, info, "查询结果不匹配")
+		return false, nil
+	}
+	pripid := info["pripid"].(string)
 	enttype := info["enttype"].(string)
 	optstate := info["optstate"].(string)
 

+ 1 - 1
spider2/src/client/ecps/ln/parse.go

@@ -113,7 +113,7 @@ func addJob(tmplist []interface{}) {
 			} else {
 				cm["query"] = tmp["Inv"]
 			}
-			if cm["query"] != nil && cm["query"] != "" && len(cm["query"].(string)) > 5 {
+			if cm["query"] != nil && cm["query"] != "" && len(cm["query"].(string)) > 6 {
 				//防止死循环
 				if cm["query"] == infoMap["CerNo"] || cm["query"] == infoMap["EntName"] {
 					continue

+ 1 - 3
spider2/src/client/ecps/ln/spider.go

@@ -87,16 +87,14 @@ func downList() {
 			if ent != nil {
 				log.Println(ent["EntName"], ent["RegNo"], ",根据配置频率跳过")
 				putLogs(":"+fmt.Sprint(ent["EntName"])+","+fmt.Sprint(ent["RegNo"])+",根据配置频率跳过", 1)
-
 				Lists.Remove(e)
 				continue
 			}
-			b, info := downloadContent(tmp)
 			Lists.Remove(e)
+			b, info := downloadContent(tmp)
 			if b {
 				log.Println("成功下载:", info["EntName"], info["RegNo"])
 				putLogs("成功下载:"+fmt.Sprint(info["EntName"])+","+fmt.Sprint(info["RegNo"]), 1)
-
 			} else {
 				log.Println("下载失败:", tmp)
 				putLogs("下载失败:"+fmt.Sprint(tmp), 1)