| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 | 
							- <!DOCTYPE html>
 
- <html>
 
- <head>
 
-     <meta charset="utf-8">
 
-     <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
 
-     <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
 
-     <title>title</title>
 
-     <link rel="stylesheet" type="text/css" href="css/api.css" />
 
-     <link rel="stylesheet" type="text/css" href="css/swiper.min.css" />
 
-     <style>
 
-         html, body{
 
-     	   height:100%;box-sizing:border-box;background:#ffffff;
 
-     	}
 
- 	    .swiper-container {
 
- 	      width: 100%;
 
- 	      height: 100%;
 
- 	    }
 
- 	    .swiper-slide {
 
- 	      text-align: center;
 
- 	      font-size: 18px;
 
- 	      background: #ffffff;
 
- 	      height:100%;
 
- 	      position: relative;
 
- 		  width: 100%;
 
- 	    }
 
- 	    .swiper-slide .img{
 
- 		  width: 100%;	
 
- 		  height: 100%;
 
- 		  background-repeat: no-repeat;
 
- 		  background-size:cover;
 
- 		  background-position: center;
 
- 	    }
 
-         .swiper-pagination-bullet {
 
-             opacity: .8;
 
-         }
 
-         .swiper-pagination-bullet-active {
 
-             background: #d9251c;
 
-         }
 
-     </style>
 
-     <script>
 
-     (function(w, d, m) {
 
-         function r() {
 
-             var t = 100,
 
-                 o = 750,
 
-                 e = d.documentElement.clientWidth || w.innerWidth,
 
-                 n = m.max(m.min(e, 480), 320),
 
-                 h = 50;
 
-             320 >= n && (h = m.floor(n / o * t * .99)),
 
-                 n > 320 && 362 >= n && (h = m.floor(n / o * t * 1)),
 
-                 n > 362 && 375 >= n && (h = m.floor(n / o * t * 1)),
 
-                 n > 375 && (h = m.floor(n / o * t * .97)),
 
-                 d.querySelector("html").style.fontSize = h + "px"
 
-         };
 
-         r();
 
-         w.onresize = function() {
 
-             r()
 
-         }
 
-     })(window, document, Math);
 
-     </script>
 
- </head>
 
- <body>
 
-     <div class="swiper-container">
 
-         <div class="swiper-wrapper">
 
- 		</div>
 
-         <div class="swiper-pagination" style="font-size: 0;bottom: 22px;"></div>
 
-     </div>
 
- </body>
 
- <script type="text/javascript" src="script/api.js"></script>
 
- <script type="text/javascript" src="script/swiper.min.js"></script>
 
- <script type="text/javascript" src="script/jquery.min.js"></script>
 
- <script type="text/javascript" src="script/jquery.tap.js"></script>
 
- <script type="text/javascript">
 
- apiready = function() {
 
-     getRouteData();
 
-     api.addEventListener({
 
-         name: 'keyback'
 
-     }, function(ret, err) {
 
-         api.toast({
 
-             msg: '再按一次返回键退出' + api.appName,
 
-             duration: 2000,
 
-             location: 'bottom'
 
-         });
 
-     });
 
- };
 
- $(".swiper-wrapper").on("tap", "#go-to", function() {
 
-     api.openWin({
 
-         name: 'index',
 
-         url: 'index.html',
 
-         bounces: false
 
-     })
 
-     $api.setStorage("isSlide", "1");
 
-     // setTimeout("api.closeWin();", 500);
 
-     api.closeWin();
 
-     return false;
 
- })
 
- function getRouteData() {
 
-     $.ajax({
 
-         url: siteurl + 'v2/entry/siteConfig',//'?do=getslide',
 
-         data: {},
 
-         headers: { "X-TOKEN": $api.getStorage("accesstoken") },
 
-         dataType: 'json',
 
-         type: 'post',
 
-         success: function(datas) {
 
-             if (datas.result) {
 
-                 $.each(datas.data.slide, function(index, item) {
 
- 					console.log(JSON.stringify(item));
 
-                     if (index == (datas.data.slide.length-1)) {
 
- 						$(".swiper-wrapper").append(`
 
- 						<div class="swiper-slide" id="go-to">
 
- 							<div class="img" style="background-image: url(${siteurl}uploads/home/adv/${item.adv_code})"></div>
 
- 						</div>`);
 
-                     } else {
 
- 						$(".swiper-wrapper").append(`
 
- 						<div class="swiper-slide">
 
- 							<div class="img" style="background-image: url(${siteurl}uploads/home/adv/${item.adv_code})"></div>
 
- 						</div>`);
 
-                     }
 
-                 });
 
-                 var swiper = new Swiper('.swiper-container', {
 
-                     allowSlidePrev: true,
 
-                     pagination: {
 
-                         el: '.swiper-pagination',
 
-                     },
 
-                 });
 
-             } else {
 
-                 errcode(datas, datas.code);
 
-             }
 
-         },
 
- 		error:function(err){
 
- 			console.log(JSON.stringify(err));
 
- 		}
 
-     });
 
- }
 
- </script>
 
- </html>
 
 
  |