Quellcode durchsuchen

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

renzheng vor 9 Jahren
Ursprung
Commit
197aa2804e

+ 6 - 0
core/src/web/staticres/css/dev-qfw.css

@@ -2631,6 +2631,12 @@ style="color:#D03102;margin-right:5px;"
 /*认证完第一次登录 end*/
 /*分辨率小于1200的时候调整布局,算上滚动条1217*/
 @media (max-width: 1217px) {
+	.b-left{
+		width: 100%;
+	}
+	.b-right{
+		display: none;
+	}
 	.a-index .a-cols>.a-com-ul-block.a-com-last{
 		display: none;
 	}

+ 2 - 3
core/src/web/staticres/css/swordfish.css

@@ -68,7 +68,7 @@ a:focus, a:hover{
 	overflow-y: hidden;
 }
 .swordfish-index .b-right>div{
-	max-height: 650px;
+	max-height: 635px;
 }
 .swordfish-right-title{
 	background-color: #F7F8FA;
@@ -268,7 +268,6 @@ a:focus, a:hover{
 /*******剑鱼首页*******/
 .swordfish-guide>div{
 	display: inline-block;
-	height: inherit;
 	vertical-align: top;
 	height: 552px;
 }
@@ -307,7 +306,7 @@ a:focus, a:hover{
 .swordfish-guide-bottom{
 	display: block !important;
 	text-align: center;
-	padding: 20px;
+	padding-top: 20px;
 }
 .swordfish-guide-bottom .btn{
 	background-color: #37C6DA;

+ 147 - 19
core/src/web/staticres/js/relation.js

@@ -516,14 +516,13 @@ Relation.prototype.tick = function(){
         }
         var dx = x - sx,
 	        dy = y - sy,
-	        dr = Math.sqrt(dx * dx + dy * dy);
+	        dr = Math.sqrt(dx * dx + dy * dy),
 	        theta = Math.atan2(dy, dx) + Math.PI / 7.85,
 	        d90 = Math.PI / 2,
 	        dtxs = x - Math.cos(theta),
 	        dtys = y - Math.sin(theta);
-			var dd = 39;
-		return "M" + sx + "," + sy + "A" + dr + " " + dr + ",0 0 1," + x + "," + y;
-		//return "M" + sx + "," + sy + "A" + dr + " " + dr + ",0 0 1," + x + "," + y + "A" + dr + " " + dr + ",0 0 0," + sx + "," + sy + "M" + dtxs + "," + dtys +  "l" + (3.5 * Math.cos(d90 - theta) - 10 * Math.cos(theta)) + "," + (-3.5 * Math.sin(d90 - theta) - 10 * Math.sin(theta)) + "L" + (dtxs - 3.5 * Math.cos(d90 - theta) - 10 * Math.cos(theta)) + "," + (dtys + 3.5 * Math.sin(d90 - theta) - 10 * Math.sin(theta)) + "z";
+		//return "M" + sx + "," + sy + "A" + dr + " " + dr + ",0 1 1," + x + "," + y;
+		return "M" + sx + "," + sy + "A" + dr + " " + dr + ",0 0 1," + x + "," + y + "A" + dr + " " + dr + ",0 0 0," + sx + "," + sy + "M" + dtxs + "," + dtys +  "l" + (3.5 * Math.cos(d90 - theta) - 10 * Math.cos(theta)) + "," + (-3.5 * Math.sin(d90 - theta) - 10 * Math.sin(theta)) + "L" + (dtxs - 3.5 * Math.cos(d90 - theta) - 10 * Math.cos(theta)) + "," + (dtys + 3.5 * Math.sin(d90 - theta) - 10 * Math.sin(theta)) + "z";
 	});
 	this.nodes.attr("transform", function(d) {
 		if(thisClass.tickFlag && d.type == "ce"){
@@ -532,14 +531,34 @@ Relation.prototype.tick = function(){
 		}
 		return "translate(" + d.x + "," + d.y + ")scale(" + thisClass.zoomlevel+ ")";
 	});
-	this.lineLables.attr("transform",function(d){
+	/*this.lineLables.attr("transform",function(d){
 		var sx   = d.source.x,
 			sy   = d.source.y,
 			x    = d.target.x,
             y    = d.target.y;
-		
-		return "translate("+(x)+","+(y)+")";
-	});
+		if(sy > y){
+			sy -= 12;
+		}else{
+			sy += 5;
+		}
+		var line = new geo.LineSegment(sx, sy, x, y);
+		for (var e in d.target.edge) {
+            var ix = line.intersect(d.target.edge[e].offset(x, y));
+            if (ix.in1 && ix.in2) {
+                x = ix.x;
+                y = ix.y;
+                break;
+            }
+        }
+        var dx = x - sx,
+	        dy = y - sy,
+	        dr = Math.sqrt(dx * dx + dy * dy);
+		var cx = (sx + x) / 2,
+			cy = (sy + y) / 2,
+			cr = dr - Math.sqrt(Math.pow(dr,2) - Math.pow(dr / 2,2));
+		//var c = convert(sx,sy,x,y,0,0,dr,dr,0);
+		return "translate("+(cx-cr)+","+(cy-cr)+")";
+	});*/
 	if(thisClass.tickFlag){
 		thisClass.force.tick();
 	}
@@ -637,17 +656,18 @@ Relation.prototype.makeRelation = function(){
 		.attr("stroke-width",function (e,i){
 			return e.linkVal;
 		});
-	this.lineLables = gs.append("g").each(function(){
-		d3.select(this).append("rect")	
-		.attr("rx", 5)
-	    .attr("ry", 5)
-		.attr("x", -99)
-	    .attr("y", -18)
-		.attr("height", 20)
-		.attr("fill", "#1B9196")
-		.attr("stroke", "#1B9196");
-		d3.select(this).append("text").text("1000万元");
-	});
+	/*this.lineLables = gs.append("g").each(function(d){
+		var invacconam = new Number(d.invacconam);
+		if(invacconam > 0){
+			var lenInvacconam = (invacconam + "").length;
+			if(lenInvacconam > 4 && (invacconam + "").indexOf(".") > -1 && (lenInvacconam - (invacconam + "").indexOf(".")) > 4){
+				invacconam = (new Number(invacconam)).toFixed(4);
+			}
+			d3.select(this).append("text").text(invacconam+"万元");
+		}else{
+			d3.select(this).remove();
+		}
+	});*/
 	
 	this.lines.each(function (d,i){
 		var invacconam = new Number(d.invacconam);
@@ -821,4 +841,112 @@ Relation.prototype.makeTextBg = function(){
             bottom : new geo.LineSegment(bounds.x1, bounds.y2, bounds.x2, bounds.y2)
         };
     });
+}
+// svg : [A | a] (rx ry x-axis-rotation large-arc-flag sweep-flag x y)+
+
+/* x1 y1 x2 y2 fA fS rx ry φ */
+function  radian( ux, uy, vx, vy ) {
+    var  dot = ux * vx + uy * vy;
+    var  mod = Math.sqrt( ( ux * ux + uy * uy ) * ( vx * vx + vy * vy ) );
+    var  rad = Math.acos( dot / mod );
+    if( ux * vy - uy * vx < 0.0 ) rad = -rad;
+    return  rad;
+}
+//https://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
+//conversion_from_endpoint_to_center_parameterization
+//sample :  convert(200,200,300,200,1,1,50,50,0,{})
+function convert(x1, y1, x2, y2, fA, fS, rx, ry, phi) {
+    var cx,cy,theta1,delta_theta;
+
+    if( rx == 0.0 || ry == 0.0 ) return -1;  // invalid arguments
+
+    var  s_phi = Math.sin( phi );
+    var  c_phi = Math.cos( phi );
+    var  hd_x = ( x1 - x2 ) / 2.0;   // half diff of x
+    var  hd_y = ( y1 - y2 ) / 2.0;   // half diff of y
+    var  hs_x = ( x1 + x2 ) / 2.0;   // half sum of x
+    var  hs_y = ( y1 + y2 ) / 2.0;   // half sum of y
+
+    // F6.5.1
+    var  x1_ = c_phi * hd_x + s_phi * hd_y;
+    var  y1_ = c_phi * hd_y - s_phi * hd_x;
+
+    var  rxry = rx * ry;
+    var  rxy1_ = rx * y1_;
+    var  ryx1_ = ry * x1_;
+    var  sum_of_sq = rxy1_ * rxy1_ + ryx1_ * ryx1_;   // sum of square
+    var  coe = Math.sqrt( ( rxry * rxry - sum_of_sq ) / sum_of_sq );
+    if( fA == fS ) coe = -coe;
+
+    // F6.5.2
+    var  cx_ = coe * rxy1_ / ry;
+    var  cy_ = -coe * ryx1_ / rx;
+
+    // F6.5.3
+    cx = c_phi * cx_ - s_phi * cy_ + hs_x;
+    cy = s_phi * cx_ + c_phi * cy_ + hs_y;
+
+    var  xcr1 = ( x1_ - cx_ ) / rx;
+    var  xcr2 = ( x1_ + cx_ ) / rx;
+    var  ycr1 = ( y1_ - cy_ ) / ry;
+    var  ycr2 = ( y1_ + cy_ ) / ry;
+
+    // F6.5.5
+    theta1 = radian( 1.0, 0.0, xcr1, ycr1 );
+
+    // F6.5.6
+    delta_theta = radian( xcr1, ycr1, -xcr2, -ycr2 );
+    var  PIx2 = Math.PI * 2.0;
+    while( delta_theta > PIx2 ) delta_theta -= PIx2;
+    while( delta_theta < 0.0 ) delta_theta += PIx2;
+    if( fS == false ) delta_theta -= PIx2;
+
+    var outputObj = { /* cx, cy, theta1, delta_theta */ 
+        cx : cx,
+        cy : cy,
+        theta1 : theta1,
+        delta_theta : delta_theta
+    }
+    console.dir(outputObj);
+
+    return outputObj;
+}
+function convert_tmp(x1, y1, x2, y2, fA, fS, rx, ry, phi) {
+    var cx,cy,theta1,delta_theta;
+
+    if( rx == 0.0 || ry == 0.0 ) return -1;  // invalid arguments
+
+    var  s_phi = Math.sin( phi );
+    var  c_phi = Math.cos( phi );
+    var  hd_x = ( x1 - x2 ) / 2.0;   // half diff of x
+    var  hd_y = ( y1 - y2 ) / 2.0;   // half diff of y
+    var  hs_x = ( x1 + x2 ) / 2.0;   // half sum of x
+    var  hs_y = ( y1 + y2 ) / 2.0;   // half sum of y
+
+    // F6.5.1
+    var  x1_ = c_phi * hd_x + s_phi * hd_y;
+    var  y1_ = c_phi * hd_y - s_phi * hd_x;
+
+    var  rxry = rx * ry;
+    var  rxy1_ = rx * y1_;
+    var  ryx1_ = ry * x1_;
+    var  sum_of_sq = rxy1_ * rxy1_ + ryx1_ * ryx1_;   // sum of square
+    var  coe = Math.sqrt( ( rxry * rxry - sum_of_sq ) / sum_of_sq );
+    if( fA == fS ) coe = -coe;
+
+    // F6.5.2
+    var  cx_ = coe * rxy1_ / ry;
+    var  cy_ = -coe * ryx1_ / rx;
+
+    // F6.5.3
+    cx = c_phi * cx_ - s_phi * cy_ + hs_x;
+    cy = s_phi * cx_ + c_phi * cy_ + hs_y;
+
+    var outputObj = { /* cx, cy */ 
+        cx : rxry,
+        cy : rxy1_
+    }
+    console.dir(outputObj);
+
+    return outputObj;
 }

+ 66 - 14
core/src/web/staticres/wxswordfish/style.css

@@ -305,6 +305,8 @@ img{
 /**引导页**/
 .swiper-pagination{
 	top: 80px !important;
+	transition: 0ms !important;
+	-webkit-transition: 0ms !important;
 }
 .swiper-pagination-bullet{
 	margin-bottom: 15px !important;
@@ -323,19 +325,19 @@ img{
 }
 .slide-down{
 	z-index: 2;
-	/* Firefox: */
+	/* Firefox: 
 	-moz-animation-name:slidedown;
 	-moz-animation-duration:0.5s;
 	-moz-animation-timing-function:ease-in;
 	-moz-animation-iteration-count:1;
-	-moz-animation-play-state:running;
-	/* Safari and Chrome: */
+	-moz-animation-play-state:running; */
+	/* Safari and Chrome:
 	-webkit-animation-name:slidedown;
 	-webkit-animation-duration:0.5s;
 	-webkit-animation-timing-function:ease-in;
 	-webkit-animation-iteration-count:1;
-	-webkit-animation-play-state:running;
-	/* Opera: */
+	-webkit-animation-play-state:running; */
+	/* Opera:
 	-o-animation-name:slidedown;
 	-o-animation-duration:0.5s;
 	-o-animation-timing-function:ease-in;
@@ -345,7 +347,7 @@ img{
 	-moz-transform: translateZ(0);
 	-ms-transform: translateZ(0);
 	-o-transform: translateZ(0);
-	transform: translateZ(0);
+	transform: translateZ(0);*/
 }
 @-webkit-keyframes slidedown {
 	0%{
@@ -357,19 +359,19 @@ img{
 }
 .slide-up{
 	z-index: 2;
-	/* Firefox: */
+	/* Firefox: 
 	-moz-animation-name:slideup;
 	-moz-animation-duration:0.5s;
 	-moz-animation-timing-function:ease-in;
 	-moz-animation-iteration-count:1;
-	-moz-animation-play-state:running;
-	/* Safari and Chrome: */
+	-moz-animation-play-state:running;*/
+	/* Safari and Chrome: 
 	-webkit-animation-name:slideup;
 	-webkit-animation-duration:0.5s;
 	-webkit-animation-timing-function:ease-in;
 	-webkit-animation-iteration-count:1;
-	-webkit-animation-play-state:running;
-	/* Opera: */
+	-webkit-animation-play-state:running;*/
+	/* Opera: 
 	-o-animation-name:slideup;
 	-o-animation-duration:0.5s;
 	-o-animation-timing-function:ease-in;
@@ -379,7 +381,7 @@ img{
 	-moz-transform: translateZ(0);
 	-ms-transform: translateZ(0);
 	-o-transform: translateZ(0);
-	transform: translateZ(0);
+	transform: translateZ(0);*/
 }
 
 @-webkit-keyframes slideup {
@@ -400,7 +402,7 @@ img{
 .swiper-pagination-bullet-active{
 	background-color: #35c5da !important;
 }
-..swiper-pagination-bullet{
+.swiper-pagination-bullet{
 	opacity: .1;
 }
 .guide-bottom{
@@ -567,4 +569,54 @@ img{
 	text-indent:2em;
 	padding:10px;
 }
-	
+/**********滑动css*********/
+.slide {
+	position: relative;
+	overflow: hidden;
+}
+.slide ul {
+	width: 100%;
+	height: 100%;
+	z-index: 1;
+	overflow: hidden;
+	background-size: 320px;
+}
+.slide li {
+	position: absolute;
+	left: 0;
+	top: 0;
+	width: 100%;
+	background: -webkit-radial-gradient(39% 77%,ellipse, #fff, #fff 50%, #edefff 70%);
+	background-size: 130% 120%;
+	-webkit-transition: transform .3s ease-in-out;
+	opacity: 0;
+}
+.slide img{
+	width: 100%;
+	height: 100%;
+}
+.slide-point {
+	position: absolute;
+	top: 10px;
+	right: 10px;
+	display: none;
+	width: 9px;
+	text-align: center;
+	font-size: 0;
+	z-index: 90;
+	-webkit-animation: dis-show 0s ease forwards;
+}
+.slide-point span {
+	margin: 6px auto;
+	width: 8px;
+	height: 8px;
+	border-radius: 100%;
+	background: #000;
+	opacity: .2;
+	display: block;
+	z-index: 100;
+}
+.slide-point span.current {
+	background: #007aff;
+	opacity: 1;
+}

+ 9 - 1
core/src/web/templates/common/swordfishhead.html

@@ -44,10 +44,18 @@ function b_afterLogin(flag,result){
 	}
 }
 function swordfishLayoutInit(){
+	var surHeight = document.body.clientHeight - $(".b-head").height() - 45;
+	if(surHeight < 681){
+		$(".swordfish-index .b-right>div").css("max-height",surHeight-15);
+		$("#swordfish-guide").height(surHeight);
+		$("#swordfish-guide>div").height(surHeight - 89);
+		var surWidth = 825 * (surHeight - 89) / 552;
+		$("#swordfish-guide .carousel-inner").width(surWidth).css("margin-left","-"+surWidth/2);
+	}
 	if(document.body.scrollHeight <= document.body.clientHeight){
 		$(".b-left").height(document.body.clientHeight - $(".b-head").height() - $("#qfw-bottom").height() - 60);
-		webSiteInit();
 	}
+	webSiteInit();
 }
 function scrollUp(){
 	if($(".b-right #list>div").height() > $(".b-right #list").height()){

+ 0 - 5
core/src/web/templates/swordfish/index.html

@@ -24,23 +24,18 @@
 		  	<div class="carousel-inner" role="listbox">
 			    <div class="item active">
 			      	<img src="/images/swordfish/guide-1.png">
-			     	<div class="carousel-caption"></div>
 			    </div>
 			    <div class="item">
 			      	<img src="/images/swordfish/guide-2.png">
-			      	<div class="carousel-caption"></div>
 			    </div>
 				<div class="item">
 			      	<img src="/images/swordfish/guide-3.png">
-			     	<div class="carousel-caption"></div>
 			    </div>
 			    <div class="item">
 			      	<img src="/images/swordfish/guide-4.png">
-			      	<div class="carousel-caption"></div>
 			    </div>
 				<div class="item">
 			      	<img src="/images/swordfish/guide-5.png">
-			     	<div class="carousel-caption"></div>
 			    </div>
 		  	</div>
 			<div class="swordfish-guide-right">

+ 9 - 9
core/src/web/templates/swordfish/wxindex.html

@@ -61,14 +61,8 @@ $(function(){
 			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");
+			var animateCallBack = function(){
+				activeSlide.removeClass("slide-up").removeClass("slide-down");
 				prevSlide.removeClass("slide-active");
 				if(swiper.activeIndex == 5){
 					$(".arrow-up").hide();
@@ -77,7 +71,13 @@ $(function(){
 					$(".experience").hide();
 					$(".arrow-up").show();
 				}
-			});
+			}
+			if(currentIndex > swiper.activeIndex){
+				activeSlide.addClass("slide-down").css({"top":"-100%"}).animate({"top":"0px"},"fast",null,animateCallBack);
+			}else if(currentIndex < swiper.activeIndex){
+				activeSlide.addClass("slide-up").css({"top":"100%"}).animate({"top":"0px"},"fast",null,animateCallBack);
+			}
+			currentIndex = swiper.activeIndex;
 		},
 		onSliderMove: function(swiper, event){
 			if(swiper.isEnd && (swiper.touches.currentX - swiper.touches.startX) > 20) {

+ 15 - 11
core/src/web/templates/swordfish/wxshare.html

@@ -80,16 +80,25 @@ $(function(){
 			var prevSlide = $(swiper.slides[swiper.previousIndex]);
 			prevSlide.addClass("slide-active");
 			var activeSlide = $(swiper.slides[swiper.activeIndex]);
+			var animateCallBack = function(){
+				activeSlide.removeClass("slide-up").removeClass("slide-down");
+				prevSlide.removeClass("slide-active");
+			}			
 			if(currentIndex == 0 && swiper.activeIndex == 0){
-				activeSlide.addClass("slide-down");
+				activeSlide.addClass("slide-down").css({"top":"-100%"}).animate({"top":"0px"},"normal",null,animateCallBack);
+				currentIndex = 6;
 			}else{
 				if(currentIndex > swiper.activeIndex){
-					activeSlide.addClass("slide-down");
+					activeSlide.addClass("slide-down").css({"top":"-100%"}).animate({"top":"0px"},"normal",null,animateCallBack);
 				}else if(currentIndex < swiper.activeIndex){
-					activeSlide.addClass("slide-up");
+					activeSlide.addClass("slide-up").css({"top":"100%"}).animate({"top":"0px"},"normal",null,animateCallBack);
+				}
+				if(currentIndex == 1 && swiper.activeIndex == 0){
+					currentIndex = 6;
+				}else{
+					currentIndex = swiper.activeIndex;
 				}
 			}
-			currentIndex = swiper.activeIndex;
 			if(currentIndex == 7){
 				currentIndex = 0;
 			}
@@ -98,10 +107,6 @@ $(function(){
 			}else{
 				$("#QRcode").hide();
 			}
-			activeSlide.one("webkitAnimationEnd",function(){
-				$(this).removeClass("slide-up").removeClass("slide-down");
-				prevSlide.removeClass("slide-active");
-			});
 		}
     });
 	/*
@@ -117,15 +122,14 @@ $(function(){
 	}*/
 });
 function backToIndex(){
-	if(mySwiper == null || mySwiper.activeIndex == 1){
+	if(mySwiper == null || mySwiper.activeIndex == 1 || mySwiper.activeIndex == 7){
 		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(){
+	activeSlide.addClass("slide-down").css({"top":"-100%"}).animate({"top":"0px"},"normal",null,function(){
 		$(this).removeClass("slide-up").removeClass("slide-down");
 		prevSlide.removeClass("slide-active");
 		mySwiper.slideTo(1, 1000, false);

+ 137 - 0
core/src/web/templates/swordfish/wxshare_c.html

@@ -0,0 +1,137 @@
+<html>
+<head>
+<title>企明星-剑鱼</title>
+<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+<link href="{{Msg "seo" "cdn"}}/wxswordfish/style.css" rel="stylesheet">
+<link href="{{Msg "seo" "cdn"}}/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="{{Msg "seo" "cdn"}}/js/jquery.js"></script>
+<script src="{{Msg "seo" "cdn"}}/wxswordfish/share.js"></script>
+<script src="{{Msg "seo" "cdn"}}/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="{{Msg "seo" "cdn"}}/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="{{Msg "seo" "cdn"}}/wxswordfish/images/guide-2.png">
+		</div>
+       	<div class="swiper-slide">
+			<img src="{{Msg "seo" "cdn"}}/wxswordfish/images/guide-3.png">
+		</div>
+		<div class="swiper-slide">
+			<img src="{{Msg "seo" "cdn"}}/wxswordfish/images/guide-4.png">
+		</div>
+		<div class="swiper-slide">
+			<img src="{{Msg "seo" "cdn"}}/wxswordfish/images/guide-5.png">
+		</div>
+		<div class="swiper-slide">
+			<img src="{{Msg "seo" "cdn"}}/wxswordfish/images/guide-0.png">
+		</div>
+    </div>
+    <!-- 如果需要分页器 -->
+   	<div class="swiper-pagination"></div>
+	<div class="guide-bottom">
+		<img class="arrow-up" src="{{Msg "seo" "cdn"}}/wxswordfish/images/up.png">
+		<img src="{{Msg "seo" "cdn"}}/wxswordfish/images/index.png" class="jumpGuide" onclick="backToIndex()">
+	</div>
+</div>
+<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 = 416;
+	var max = 750;
+	if(width > max){
+		width = max;
+	}
+	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","{{Msg "seo" "cdn"}}/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>

+ 16 - 12
core/src/web/templates/swordfish/wxshareguide.html

@@ -78,16 +78,25 @@ $(function(){
 			var prevSlide = $(swiper.slides[swiper.previousIndex]);
 			prevSlide.addClass("slide-active");
 			var activeSlide = $(swiper.slides[swiper.activeIndex]);
+			var animateCallBack = function(){
+				activeSlide.removeClass("slide-up").removeClass("slide-down");
+				prevSlide.removeClass("slide-active");
+			}
 			if(currentIndex == 0 && swiper.activeIndex == 0){
-				activeSlide.addClass("slide-down");
+				activeSlide.addClass("slide-down").css({"top":"-100%"}).animate({"top":"0px"},"fast",null,animateCallBack);
+				currentIndex = 6;
 			}else{
 				if(currentIndex > swiper.activeIndex){
-					activeSlide.addClass("slide-down");
+					activeSlide.addClass("slide-down").css({"top":"-100%"}).animate({"top":"0px"},"fast",null,animateCallBack);
 				}else if(currentIndex < swiper.activeIndex){
-					activeSlide.addClass("slide-up");
+					activeSlide.addClass("slide-up").css({"top":"100%"}).animate({"top":"0px"},"fast",null,animateCallBack);
+				}
+				if(currentIndex == 1 && swiper.activeIndex == 0){
+					currentIndex = 6;
+				}else{
+					currentIndex = swiper.activeIndex;
 				}
 			}
-			currentIndex = swiper.activeIndex;
 			if(currentIndex == 7){
 				currentIndex = 0;
 			}
@@ -96,24 +105,19 @@ $(function(){
 			}else{
 				$("#QRcode").hide();
 			}
-			activeSlide.one("webkitAnimationEnd",function(){
-				$(this).removeClass("slide-up").removeClass("slide-down");
-				prevSlide.removeClass("slide-active");
-			});
 		}
     });
 });
 function backToIndex(){
-	if(mySwiper == null || mySwiper.activeIndex == 1){
+	if(mySwiper == null || mySwiper.activeIndex == 1 || mySwiper.activeIndex == 7){
 		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");
+	activeSlide.addClass("slide-down").css({"top":"-100%"}).animate({"top":"0px"},"fast",null,function(){
+		activeSlide.removeClass("slide-up").removeClass("slide-down");
 		prevSlide.removeClass("slide-active");
 		mySwiper.slideTo(1, 1000, false);
 		$("#QRcode").show();