Selaa lähdekoodia

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

wangshan 9 vuotta sitten
vanhempi
commit
2bfda37cea

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

@@ -10,7 +10,7 @@ type Mobile struct {
 	search         xweb.Mapper `xweb:"/ent/(.*)/search"`
 	detail         xweb.Mapper `xweb:"/ent/(.*)/detail/(.*)/(.*)"`
 	pageerror      xweb.Mapper `xweb:"/ent/(.*)/505"`
-	guide          xweb.Mapper `xweb:"/swordfish/guide"`
+	guide          xweb.Mapper `xweb:"/swordfish/guide/(.*)"`
 	share          xweb.Mapper `xweb:"/swordfish/share/([^.]*)"`
 	wxrssset       xweb.Mapper `xweb:"/swordfish/page"`
 	getMyCredit    xweb.Mapper `xweb:"/member/credit/getcredit"`

+ 8 - 4
core/src/qfw/mobile/wxmenu.go

@@ -22,11 +22,15 @@ var se util.SimpleEncrypt
 func init() {
 	se = util.SimpleEncrypt{Key: "topnet"}
 }
-
-func (m *Mobile) Guide() error {
+func (m *Mobile) Guide(sign string) error {
 	m.T["signature"] = GetSignature(m.Url())
 	m.T["shareid"] = cutil.FindMyShareId("topjy", m.Session().Get("s_m_openid").(string))
-	return m.Render("/swordfish/wxindex.html", &m.T)
+	m.T["sign"] = sign
+	if sign == "share" {
+		return m.Render("/swordfish/wxshareguide.html", &m.T)
+	} else {
+		return m.Render("/swordfish/wxindex.html", &m.T)
+	}
 }
 func (m *Mobile) Share(shareid string) error {
 	m.T["shareid"] = shareid
@@ -58,7 +62,7 @@ func (m *Mobile) Wxrssset() error {
 						"i_m_guide": 1,
 					},
 				}, false, false)
-				return m.Redirect("/swordfish/guide")
+				return m.Redirect("/swordfish/guide/first")
 			}
 			if (*userInfo)["o_msgset"] != nil {
 				for _, v := range (*userInfo)["o_msgset"].(map[string]interface{}) {

+ 3 - 3
core/src/web/staticres/css/dev-qfw.css

@@ -581,7 +581,7 @@ a{
 	border-left: 3px solid #FF5A5F;
 	width: 250px;
 	height: 45px;
-	margin:10px 0 10px 1px;
+	margin:1px 0 10px 1px;
 	line-height: 45px;
 	padding-left: 20px;
 	background: #FFF;
@@ -2365,8 +2365,7 @@ style="color:#D03102;margin-right:5px;"
 .b-head .b-loginbtn{
 	width: 40px;
 	height: 40px;
-	margin-top: 13px;
-	margin-right: 30px;
+	margin-right: 10px;
 }
 .b-head .headimg{
 	width: 40px;
@@ -2376,6 +2375,7 @@ style="color:#D03102;margin-right:5px;"
 .b-head .b-loginStatus{
 	padding: 0px 15px;
 	position: relative;
+	cursor: pointer;
 }
 .b-head .b-logined:hover{
 	background-color: #F7F9FB;

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


+ 1 - 2
core/src/web/staticres/wxswordfish/style.css

@@ -378,8 +378,7 @@ img{
 .swiper-slide img{
 	/*position: relative;
 	top: 50%;
-	margin-top: -302px;
-	*/
+	margin-top: -302px;*/
 	width: 100%;
 	height: 100%;
 }

+ 5 - 2
core/src/web/templates/common/top.html

@@ -67,7 +67,7 @@ function b_loadTop(){
 				if(hasMsgCount){
 					html += '<a class="b-round-dot"></a>';
 				}
-				html += '</span><a href="/member/show/memberindex">'+result.nickName+'</a>';
+				html += '</span>'+result.nickName;
 				html += '<div id="head-hideMenu" class="head-hideMenu"><ul>'
 					    	+'<li onclick="window.location.href=\'/member/msgcenter\'"><i class="glyphicon youjian"></i><span>消息中心';
 				if(hasMsgCount){
@@ -78,6 +78,9 @@ function b_loadTop(){
 						+'<li onclick="window.location.href=\'/front/logout\'" class="border-b-0"><i class="glyphicon tuichu"></i>退出</li>';
 						+'</ul></div>';
 				$("#b-loginStatus").addClass("b-logined").html(html)
+				.click(function(){
+					window.location.href = "/member/show/memberindex";
+				})
 				.mouseover(function(){
 					$("#head-hideMenu").show();
 				}).mouseleave(function(){
@@ -96,7 +99,7 @@ function b_loadTop(){
 				}
 			}else{
 				isLogined = false;
-				var html = '<img class="b-loginbtn cursor-pointer" onclick="loginModalShow();" src="/images/swordfish/headimg.png">';
+				var html = '<span onclick="loginModalShow();"><img class="b-loginbtn" src="/images/swordfish/headimg.png">登录/注册</span>';
 				$("#b-loginStatus").html(html);
 				$("#bottom-bar>li").removeClass("invisible");
 				//登录

+ 1 - 0
core/src/web/templates/service/demand.html

@@ -18,6 +18,7 @@
 	.text-primary.a-com-title{
 		border-left:0px;
 		background:#F6F8FA;
+		margin-top:9px;
 		border:1px solid #E5E6E9;
 	}
 </style>

+ 3 - 1
core/src/web/templates/service/detail.html

@@ -41,6 +41,9 @@
 		    margin-left: -47px;
    		 margin-right: -15px;
 	}
+	.a-c-right>.a-com-title{
+		margin-top:2px;
+	}
 	.white_content {
 	display: none;
 	position: absolute;
@@ -352,7 +355,6 @@
 		{{include "/service/appointment.html"}}
     </div>
 	<div class="a-c-right">
-	{{include "/common/releasedemand.html"}}
 	{{include "/common/hotservice.html"}}
 	</div>
 </div>

+ 0 - 1
core/src/web/templates/service/list.html

@@ -292,7 +292,6 @@
 	</div>
 		</div>
 <div class="a-c-right hidden-xs">
-{{include "/common/releasedemand.html"}}
 {{if eq "demand" .T.querymap.c_searchtype}}
 {{include "/common/hotdemand.html"}}
 {{else}}

+ 3 - 0
core/src/web/templates/service/viewsingledemand.html

@@ -49,6 +49,9 @@
 				white-space: nowrap;
 				line-height:21px !important;
 			}
+			.a-c-right>.a-com-title {
+				margin-top:10px !important;
+			}
 		</style>
 		    {{include "/common/inc.html"}}
     <!-- extra CSS -->

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

@@ -47,12 +47,11 @@ $(function(){
 	var currentIndex = 0;
 	var mySwiper = new Swiper('.swiper-container', {
         pagination: '.swiper-pagination',
-        paginationClickable: true,
+        paginationClickable: false,
         direction: 'vertical',
 		touchMoveStopPropagation: false,
 		virtualTranslate: true,
 		onSlideChangeStart: function(swiper){
-			console.info();
 			var prevSlide = $(swiper.slides[swiper.previousIndex]);
 			prevSlide.addClass("slide-active");
 			var activeSlide = $(swiper.slides[swiper.activeIndex]);
@@ -93,7 +92,7 @@ $(function(){
 	}*/
 });
 function pageJump(){
-	{{if session "userId"}}
+	{{if eq .T.sign "first"}}
 		window.location.href = '/swordfish/page';
 	{{else}}
 		history.go(-1);

+ 112 - 0
core/src/web/templates/swordfish/wxshareguide.html

@@ -0,0 +1,112 @@
+<html>
+<head>
+<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="/wxswordfish/share.js"></script>
+<script src="/swiper/swiper.min.js"></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">
+		</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-6.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="history.go(-1);">
+	</div>
+</div>
+<img id="QRcode" style="position:absolute;z-index: 2;" src="/front/weixinshare/{{.T.shareid}}" >
+<script type="text/javascript">
+$(function(){
+	initShare({{.T.signature}},{{.T.shareid}});
+	var width = $(window).width();
+	var height = $(window).height();
+	var defaultHeight = 480;
+	var max = 750;
+	if(width > max){
+		width = max;
+	}
+	width = width*0.48;
+	var top = 380;
+	if(height > defaultHeight){
+		top = 380 / defaultHeight * height;
+	}
+	$("#QRcode").css({"width":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', {
+		loop: true,
+        pagination: '.swiper-pagination',
+        paginationClickable: false,
+        direction: 'vertical',
+		touchMoveStopPropagation: false,
+		virtualTranslate: true,
+		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 > swiper.activeIndex){
+				activeSlide.addClass("slide-down");
+			}else if(currentIndex < swiper.activeIndex){
+				activeSlide.addClass("slide-up");
+			}
+			currentIndex = swiper.activeIndex;
+			activeSlide.one("webkitAnimationEnd",function(){
+				$(this).removeClass("slide-up").removeClass("slide-down");
+				prevSlide.removeClass("slide-active");
+			});
+		},
+		onSliderMove: function(swiper, event){
+			if(swiper.isBeginning){
+				$("#QRcode").show();
+			}else{
+				$("#QRcode").hide();
+			}
+			if(swiper.isEnd) {
+				currentIndex = 0;
+			}
+		}
+    });
+	/*
+	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)});
+	}*/
+});
+</script>
+</body>
+</html>

+ 4 - 8
core/src/web/templates/swordfish/wxtoolbar.html

@@ -76,7 +76,7 @@
 var feedback = null;
 $(function(){
 	$("#goToGuide").click(function(){
-		window.location.href = "/swordfish/guide";
+		window.location.href = "/swordfish/guide/other";
 	});
 	$("#feedback").click(function(){
 		if(feedback == null){
@@ -86,13 +86,9 @@ $(function(){
 		$("#feedback-textarea").focus().parent().removeClass("red-border");
 	});
 	$("[id='goToShare']").click(function(){
-		/*if(typeof(shareid) == "undefined" || shareid == ""){
-			window.location.href = "/swordfish/share/-1";
-		}else{
-			window.location.href = "/swordfish/share/"+shareid;
-		}*/
-		$(".share-dialog").show();
-		$("html,body").addClass("overflow-hidden");
+		window.location.href = "/swordfish/guide/share";
+		/*$(".share-dialog").show();
+		$("html,body").addClass("overflow-hidden");*/
 	});
 	$("#share-dialog-back").click(function(){
 		$(".share-dialog").hide();