|
@@ -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>
|