فهرست منبع

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

wangshan 9 سال پیش
والد
کامیت
e697f24fdd

+ 7 - 1
core/src/qfw/mobile/wxmenu.go

@@ -23,6 +23,9 @@ func init() {
 	se = util.SimpleEncrypt{Key: "topnet"}
 }
 func (m *Mobile) Guide(sign string) error {
+	if m.Session().Get("s_m_openid") == nil {
+		return m.Redirect("/swordfish/share/-1")
+	}
 	m.T["signature"] = GetSignature(m.Url())
 	m.T["shareid"] = cutil.FindMyShareId("topjy", m.Session().Get("s_m_openid").(string))
 	m.T["sign"] = sign
@@ -88,7 +91,7 @@ func (m *Mobile) Wxrssset() error {
 
 		return m.Render("/swordfish/wxrssset.html", &m.T)
 	} else {
-		return m.Render("_err.html")
+		return m.Redirect("/swordfish/share/-1")
 	}
 }
 
@@ -341,6 +344,9 @@ func (m *Mobile) WxpushListInfo(_id string) error {
 		mongodb.Update("message", `{"_id":"`+msgid+`"}`, `{"$set":{"i_status":1}}`, false, false)
 	}()
 	**/
+	if m.Session().Get("s_m_openid") == nil {
+		return m.Redirect("/swordfish/share/-1")
+	}
 	m.T["data"] = *mongodb.FindById("wxpush", _id, `{"s_content":1,"s_words":1,"a_visitedindex":1,"a_publishtime":1,"s_type":1}`)
 	m.T["_id"] = _id
 	m.T["signature"] = GetSignature(m.Url())

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

@@ -552,6 +552,14 @@ a:focus, a:hover{
 .ent-table td.ent-servicepaging{
 	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;
+}
 /**************变更信息**********************/
 .ent-alterinfo li{
 	width: 100%;

+ 8 - 2
core/src/web/staticres/js/entportrait.js

@@ -139,7 +139,7 @@ function ServiceList(){
 				}
 				var flag = typeof(r[i].s_isshow) != "undefined" && r[i].s_isshow != null && r[i].s_isshow.indexOf("3")>-1;
 				html += '<tr>'
-						+'<td rowspan="2" width="120"><img src="'+(r[i].s_images==""?"null":r[i].s_images)+'" onerror="this.src=\'/images/services/default.png\'"></td>'
+						+'<td rowspan="2" width="130"><img src="'+(r[i].s_images==""?"null":r[i].s_images)+'" onerror="this.src=\'/images/services/default.png\'"></td>'
 						+'<td class="b-com-name">';
 				if(flag){
 					html += '<a href="/market/detail/'+r[i]._id+'.html">';
@@ -156,11 +156,17 @@ function ServiceList(){
 					html += '<td>&nbsp;</td><td>&nbsp;</td>';
 				}
 				html += '</tr><tr>'
-					+'<td>'+r[i].s_introduction+'</td>'
+					+'<td colspan="3"><div class="ent-serviceintroduction"><div>'+r[i].s_introduction+'</div></div></td>'
 					+'</tr>';
 			}
 			$("#serviceListPaging").parent().prevAll().remove();
 			$("#serviceListPaging").parent().before(html);
+			$(".ent-serviceintroduction").each(function(){
+				console.info($(this).height() +"------"+ $(this).children("div").height());
+				if($(this).height() < $(this).children("div").height()){
+					$(this).parent().append("......");
+				}
+			});
 		});
 	});
 }

+ 2 - 2
core/src/web/staticres/wxent/qfw-frontenterprise.js

@@ -310,7 +310,7 @@ if(!$gs){
 if($relationlen>0 ){
   //try{
 	var zoomlevel=1;
-	var w = parseInt($("#gx").css("width").replace("px","")) - 80;
+	var w = parseInt($("#gx").css("width").replace("px","")) - 20;
 	$("#infovis").css("width",w+"px");
 	var h = $("#infovis").height();
 	if($(".controlls").length>0){
@@ -999,7 +999,7 @@ var drag = force.drag()
 	//重绘
 	function redraw(){
 		if(force!=undefined){
-			var w = parseInt($("#gx").css("width").replace("px","")) - 80;
+			var w = parseInt($("#gx").css("width").replace("px","")) - 20;
 			var h = parseInt($("#gx").css("height").replace("px",""))-10;
 			d3.select("svg").attr("width", w).attr("height", h);
 			force.size([w,h]).resume();

BIN
core/src/web/staticres/wxswordfish/images/index.png


+ 1 - 1
core/src/web/templates/common/head.html

@@ -12,7 +12,7 @@
 		       	<ul class="text-center" id="head-navbar-ul">
 			        <li><img src="/images/nav-fwsc.png" class="visible-xs-inline"><a href="/market/0/list.html">服务市场</a></li>
 					<li class="hidden-xs"><img src="/images/nav-jy.png" class="visible-xs-inline"><a href="/front/swordfish">剑鱼</a></li>
-		            <li><img src="/images/nav-qysq.png" class="visible-xs-inline"><a href="/wx/search/enterprise/ent.html">企业社区</a></li>
+		            <li><img src="/images/nav-qysq.png" class="visible-xs-inline"><a href="/search/enterprise/ent.html">企业社区</a></li>
 		            <li><img src="/images/nav-zcfg.png" class="visible-xs-inline"><a href="/front/content_zcfg_list.html">政策法规</a></li>
 		            <li><img src="/images/nav-xwzx.png" class="visible-xs-inline"><a href="/front/content_qykb_list.html">新闻资讯</a></li>
 					<li class="hidden-xs"><img src="/images/nav-wgw.png" class="visible-xs-inline"><a href="/front/wsite.html">微官网</a></li>

+ 3 - 0
core/src/web/templates/swordfish/wxindex.html

@@ -8,6 +8,9 @@
 <script src="/js/jquery.js"></script>
 <script src="/wxswordfish/share.js"></script>
 <script src="/swiper/swiper.min.js"></script>
+<script>
+	initShare({{.T.signature}},{{.T.shareid}});
+</script>
 </head>
 <body>
 <div class="swiper-container">

+ 1 - 0
core/src/web/templates/swordfish/wxpush.html

@@ -7,6 +7,7 @@
 <script src="/js/jquery.js"></script>
 <script src="/wxswordfish/share.js"></script>
 <script>
+initShare({{.T.signature}},{{.T.shareid}});
 $(function(){
 	var hm = document.createElement("script");
 	hm.src = "//hm.baidu.com/hm.js?ed198b177e527bb53684db20bb390e77";

+ 1 - 0
core/src/web/templates/swordfish/wxrssset.html

@@ -11,6 +11,7 @@
 <script src="/wxswordfish/main.js"></script>
 <script>
 	var msgset= {{.T.msgset}};
+	initShare({{.T.signature}},{{.T.shareid}});
 </script>
 </head>
 <body>

+ 28 - 8
core/src/web/templates/swordfish/wxshareguide.html

@@ -8,12 +8,16 @@
 <script src="/js/jquery.js"></script>
 <script src="/wxswordfish/share.js"></script>
 <script src="/swiper/swiper.min.js"></script>
+<script>
+	initShare({{.T.signature}},{{.T.shareid}});
+</script>
 </head>
 <body>
 <div class="swiper-container">
     <div class="swiper-wrapper">
         <div class="swiper-slide">
 			<img src="/wxswordfish/images/share-cj.jpg" 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">
@@ -35,30 +39,30 @@
    	<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="history.go(-1);">
+		<img src="/wxswordfish/images/index.png" class="jumpGuide" onclick="backToIndex()">
 	</div>
 </div>
-<img id="QRcode" style="position:absolute;z-index: 2;" src="/front/weixinshare/{{.T.shareid}}" >
 <script type="text/javascript">
+var mySwiper = null;
+var currentIndex = 0;
 $(function(){
 	initShare({{.T.signature}},{{.T.shareid}});
 	var width = $(window).width();
 	var height = $(window).height();
-	var defaultHeight = 480;
+	var defaultHeight = 416;
 	var max = 750;
 	if(width > max){
 		width = max;
 	}
 	width = width*0.48;
-	var top = 380;
+	var top = 330;
 	if(height > defaultHeight){
-		top = 380 / defaultHeight * height;
+		top = top / defaultHeight * height;
 	}
-	$("#QRcode").css({"width":width,"top": top-width,"left":"50%","margin-left": -(width/2)});
+	$("#QRcode").css({"width":width,"height":width,"top": top-width,"left":"50%","margin-left": -(width/2)});
 	$(".bottom-toolbar,.feedback-dialog").remove();
-	var currentIndex = 0;
 	var flag = true;
-	var mySwiper = new Swiper('.swiper-container', {
+	mySwiper = new Swiper('.swiper-container', {
 		loop: true,
         pagination: '.swiper-pagination',
         paginationClickable: false,
@@ -112,6 +116,22 @@ $(function(){
 		$(".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>

+ 0 - 2
core/src/web/templates/swordfish/wxtoolbar.html

@@ -102,8 +102,6 @@ $(function(){
 			$("html,body").removeClass("overflow-hidden");
 		}
 	});
-	//
-	initShare({{.T.signature}},{{.T.shareid}});
 });
 //意见反馈
 function Feedback(){

+ 8 - 2
spider2/src/server/web/templates/index.html

@@ -75,18 +75,24 @@
 								<!-- <td><input type="checkbox" name="spider" /></td>-->
 								<td><a href="/load/{{$v.Code}}">{{$v.Name}}</a></td>
 								<td align="center">
-									{{if eq $v.Status 3}}
+									{{ if eq $v.IsOnline false}}
+									<span class="u-stop">已掉线</span>
+									{{else if eq $v.Status 3}}
 									<span class="u-stop">未启动</span>
 									{{else if eq $v.Status 1}}
 									<span class="u-process">运行中</span>
 									{{end}}
 								</td>
 								<td align="center">
+								{{if eq $v.IsOnline true}}
 									{{if eq $v.Status 3 }}
 									<a title="启动" href="/acton/{{$v.Code}}"><i class="glyphicon glyphicon-play"></i></a>
-									{{else}}
+									{{else }}
 									<a title="停止" href="/actoff/{{$v.Code}}"><i class="glyphicon glyphicon-stop" ></i></a>
 									{{end}}
+								{{else}}
+									<a title="掉线" >无法操作</a>
+								{{end}}
 								</td>
 							</tr>			
 							{{end}}