<?php if (!defined('ROOT')) exit; ?>
<!DOCTYPE html>
<html>

	<head>
		<?php
			include 'Inc_files_mobile.php';
		?>
		<title>标题</title>
		<link rel="stylesheet" type="text/css" href="http://static.523w.cn/css/form/mobile.css?v=201709101213">
		<link rel="stylesheet" href="/static/uhome/css/swiper.min.css" />
		<link rel="stylesheet" href="/static/uhome/css/style.css" />
		<link rel="stylesheet" href="/static/uhome/css/index_mobile.css" />
	</head>

	<body ng-controller="myController" class="ng_hide">
		<div class="content">
			<!--轮播-->
			<div id="banner">
				<div class="swiper-container">
				    <div class="swiper-wrapper">
				      <div class="swiper-slide"  ng-repeat="v in banner" style="background: url({{v.path}}?imageView2/2/w/1080/q/80) no-repeat center center; background-size:cover;width: 100%;height: 100%;"></div>
				    </div>
				    <div class="swiper-pagination"></div>
				 </div>
			</div>
			<div id="hot_downloads">
				<div class="title">热门下载</div>
				<ul>
					<li>
						<img src="/static/uhome/images/sougou.jpg" />
						<p>搜狗浏览器</p>
					</li>
					<li>
						<img src="/static/uhome/images/google.jpg" />
						<p>Google浏览器</p>
					</li>
					<li>
						<img src="/static/uhome/images/firefox.jpg" />
						<p>FireFox浏览器</p>
					</li>
					<li>
						<img src="/static/uhome/images/sougou.jpg" />
						<p>搜狗浏览器</p>
					</li>
					<li>
						<img src="/static/uhome/images/google.jpg" />
						<p>Google浏览器</p>
					</li>
					<li>
						<img src="/static/uhome/images/firefox.jpg" />
						<p>FireFox浏览器</p>
					</li>
					<li>
						<img src="/static/uhome/images/sougou.jpg" />
						<p>搜狗浏览器</p>
					</li>
					<li>
						<img src="/static/uhome/images/sougou.jpg" />
						<p>搜狗浏览器</p>
					</li>
				</ul>
			</div>
			<div id="files">
				<div class="title">文件柜</div>
				<ul>
					<li ng-repeat="v in files">
						<i class="iconfont">&#xe669;</i>
						<p>{{v.name}}</p>
					</li>
				</ul>
			</div>
			
			<div id="video">
				<div class="title">视频教程</div>
				<ul>
					<li ng-repeat="v in video">
						<a href="/video/show/id/{{v.id}}">{{v.title}}</a>
					</li>
				</ul>
			</div>
			<div id="foot">
				<div class="back">
					<p>梦想总是要有的，万一实现了呢</p>
				</div>
				<div class="foot"></div>
			</div>
		</div>
		<?php
			include 'Inc_files_boot.php';
		?>
		<script src="/static/uhome/js/swiper.min.js"></script>
		<script src="http://static.523w.cn/js/jquery.2.1.4.mui.3.7.0.angular.1.2.16.sonar.js"></script>
		<script src="http://static.523w.cn/js/wap.1.0.0.js"></script>
		<script type="text/javascript">
			jQuery.ajax({
				url: "<?php echo U('Api/banner')?>",
				dataType: 'json',
				type: 'post',
				data: {
					uid:"<?php echo $user['id'];?>"
				},
				success: function(data) {
					jQuery("#spinner").hide();
					scope.banner = data.list;
					scope.$apply();
					var swiper = new Swiper('.swiper-container', {
				      spaceBetween: 30,
				      centeredSlides: true,
				      autoplay: {
				        delay: 2500,
				        disableOnInteraction: false,
				      },
				      pagination: {
				        el: '.swiper-pagination',
				        clickable: true,
				      },
				      navigation: {
				        nextEl: '.swiper-button-next',
				        prevEl: '.swiper-button-prev',
				      },
				    });
				},
				error: function() {
					mui.toast('网络连接超时');
				}
			});
			
			jQuery.ajax({
				url: "<?php echo U('Api/video')?>",
				dataType: 'json',
				type: 'post',
				data: {
					uid:"<?php echo $user['id'];?>"
				},
				success: function(data) {
					jQuery("#spinner").hide();
					scope.video = data.list;
					scope.$apply();
				},
				error: function() {
					mui.toast('网络连接超时');
				}
			});
			
			jQuery.ajax({
				url: "<?php echo U('Api/files')?>",
				dataType: 'json',
				type: 'post',
				data: {
					uid:"<?php echo $user['id'];?>",
					rows:8,
				},
				success: function(data) {
					jQuery("#spinner").hide();
					scope.files = data.list;
					scope.$apply();
				},
				error: function() {
					mui.toast('网络连接超时');
				}
			});
		</script>
	</body>

</html>