📖 File Reader
<?php /*a:3:{s:51:"D:\XiangMu\hecheng\app\mobile\view\index\index.html";i:1741944515;s:50:"D:\XiangMu\hecheng\app\mobile\view\public\vue.html";i:1723175572;s:54:"D:\XiangMu\hecheng\app\mobile\view\public\footer2.html";i:1673246177;}*/ ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title><?php echo htmlentities($config['name']); ?></title>
<link rel="stylesheet" href="/public/mobile_zhengde/css/base.css">
<link rel="stylesheet" href="/public/mobile_zhengde/css/swiper-bundle.min.css">
<link rel="stylesheet" href="/public/mobile_zhengde/css/iconfont.css" />
<link rel="stylesheet" href="/public/mobile_zhengde/css/css.css">
<script src="/public/mobile_zhengde/js/rem.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="/public/mobile_zhengde/js/swiper-bundle.min.js"></script>
</head>
<script src="/public/vue/vue.js"></script>
<script src="/public/vue/axios.min.js"></script>
<script src="/public/vue/vue-resource.min.js"></script>
<script src="/public/vue/request.js"></script>
<script src="/public/layui-v2.9.14/layui/layui.js"></script>
<link href="/public/layui-v2.9.14/layui/css/layui.css" rel="stylesheet">
<link href="/public/admin/css/style_mobile.css?v=4.1.0" rel="stylesheet">
<script>
layui.use('upload', function(){
var $ = layui.jquery,upload = layui.upload;
});
</script>
<style>
.layui-layer-btn .layui-layer-btn0 {
border-color: #30a2f0!important;
background-color: #30a2f0!important;
color: #fff;
}
</style>
<body>
<!--页面内容-->
<div id="vue" style="margin-bottom:2rem;">
<div class="index_top">
<div class="search_box">
<form class="sous iconfont">
<i></i><input type="search" v-model="keyword" @input="Keyword(keyword)" placeholder="获取优质产品从搜索开始"/>
</form>
</div>
<div class="wrapper" id="wrapper1">
<div class="scroller">
<ul class="clearfix">
<li>
<a href="/mobile/Goods/goods_list">全部</a>
<i v-if="act_id == 0"></i>
</li>
<?php if(is_array($act_list) || $act_list instanceof \think\Collection || $act_list instanceof \think\Paginator): if( count($act_list)==0 ) : echo "" ;else: foreach($act_list as $key=>$item): ?>
<li >
<a href="/mobile/Goods/goods_list?act_id=<?php echo htmlentities($item['id']); ?>"><?php echo htmlentities($item['name']); ?></a>
<i v-if="act_id == <?php echo htmlentities($item['id']); ?>"></i>
</li>
<?php endforeach; endif; else: echo "" ;endif; ?>
</ul>
</div>
</div>
<!-- Swiper -->
<div class="swiper banner">
<div class="swiper-wrapper">
<?php if(is_array($ad_list) || $ad_list instanceof \think\Collection || $ad_list instanceof \think\Paginator): if( count($ad_list)==0 ) : echo "" ;else: foreach($ad_list as $key=>$item): ?>
<div class="swiper-slide">
<img src="<?php echo htmlentities($item['img']); ?>" alt="">
</div>
<?php endforeach; endif; else: echo "" ;endif; ?>
</div>
<!-- Add Pagination -->
<div class="swiper-pagination"></div>
</div>
<!-- Swiper end-->
</div>
<div class="index_menu">
<ul>
<li>
<a href="/mobile/Goods/goods_list?type=4">
<em><img src="/public/mobile_zhengde/img/menu_icon01.jpg" alt=""></em>
<p>火爆抢购</p>
</a>
</li>
<li>
<a href="/mobile/Goods/goods_list?type=1">
<em><img src="/public/mobile_zhengde/img/menu_icon02.jpg" alt=""></em>
<p>新品尝鲜</p>
</a>
</li>
<li>
<a href="/mobile/Goods/goods_list?type=2">
<em><img src="/public/mobile_zhengde/img/menu_icon03.jpg" alt=""></em>
<p>优质精品</p>
</a>
</li>
<li>
<a href="/mobile/Goods/goods_list?type=3">
<em><img src="/public/mobile_zhengde/img/menu_icon04.jpg" alt=""></em>
<p>特享优惠</p>
</a>
</li>
<li>
<a href="/mobile/User/message_list">
<em><img src="/public/mobile_zhengde/img/menu_icon05.jpg" alt=""></em>
<p>联系客服</p>
</a>
</li>
</ul>
</div>
<div class="miaosha">
<div class="bj"></div>
<div class="mstitle"><b>火爆抢购</b><i>丨</i>精品优质好肉抢好物</div>
<div class="miaosha_w">
<!-- Swiper -->
<div class="swiper ms_shop">
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="item in recommendation_list">
<div class="ms_sp">
<a :href="'/mobile/Goods/goods_info?goods_id='+item.goods_id">
<div class="ms_tu">
<img :src="item.img" alt="">
</div>
<h5>{{item.name}}</h5>
<div class="ms_price">
<h1>¥{{item.price}}<i>¥{{item.price_market}}</i></h1>
<p>+</p>
</div>
</a>
</div>
</div>
</div>
<!-- Add Pagination -->
<div class="swiper-pagination"></div>
</div>
<!-- Swiper end-->
</div>
</div>
<div class="jingxuan_title">猜 · 你 · 喜 · 欢</div>
<div class="sp_list" >
<div class="sp_item" v-for="item in goods_list" >
<a :href="'/mobile/Goods/goods_info?goods_id='+item.goods_id">
<div class="proimg">
<img :src="item.img" alt="">
<p>{{item.cat_name}}</p>
</div>
<div class="proname">{{item.name}}</div>
<div class="pro_price iconfont">
<h1>¥{{item.price}}<i>¥{{item.price_market}}</i></h1>
<p></p>
</div>
</a>
</div>
</div>
<div style="text-align:center;margin-top:10px;padding-bottom:20px;font-size: 14px;" v-if="pages > 1" @click="load()">点击加载</div>
<footer>
<a href="/mobile/Index/index" <?php if($source == ''): ?>class="on"<?php endif; ?>>
<span>
<em></em>
<i>首页</i>
</span>
</a>
<a href="/mobile/Goods/goods_act?source=goods_act" <?php if($source == 'goods_act'): ?>class="on"<?php endif; ?>>
<span>
<em></em>
<i>分类</i>
</span>
</a>
<a href="/mobile/Goods/cart">
<span>
<em></em>
<i>购物车</i>
</span>
</a>
<a href="/mobile/User/index?source=user" <?php if($source == 'user'): ?>class="on"<?php endif; ?>>
<span>
<em></em>
<i>我的</i>
</span>
</a>
</footer>
</div>
<br>
<script>
var vm = new Vue({
el: '#vue',
data: {
'to_load': 0,//加载状态:1为完成
'keyword':'',//关键词搜索
'act_list':[],//产品分类
'act_id':0,//分类id
'goods_list':[],
'recommendation_list':[],//精品推荐
'page':1,//当前页
'pages':0,//总页数
},
methods: {
/*关键词搜索*/
Keyword:function(value){
var that = this;
that.goods_list = [];
that.page = 1;
that.GoodsList();
},
/*分类切换处理*/
ActSwitchover:function(id){
var that = this;
that.act_id = id;
that.goods_list = [];
that.page = 1;
that.GoodsList();
},
/*产品信息*/
GoodsList:function(){
var that = this;
req_post('/api/Index/goods_list', {'page':that.page,'is_new':1,'act_id':that.act_id,'keyword':that.keyword}).then(res => {
var goods_list = that.goods_list;
that.goods_list = goods_list.concat(res.data.list);
that.pages = res.data.pages;
});
},
/*精品推荐*/
Recommendation:function(){
var that = this;
req_post('/api/Index/goods_list', {'is_competitive':1}).then(res => {
that.recommendation_list = res.data.list;
});
},
/*点击加载*/
load:function(){
var that = this;
var page = that.page+1;
if (page > that.pages) {
parent.layer.msg('暂无数据', {shift: 1});
}else{
that.page = page;
that.GoodsList();
}
}
},
created() {
var that = this;
that.GoodsList();
that.Recommendation();
that.to_load = 1;
}
})
</script>
<script>
var swiper = new Swiper('.banner', {
slidesPerView: 1,
spaceBetween: 20,
speed: 1000,
loop: true,
pagination: {
el: '.swiper-pagination',
clickable: true,
},
});
var swiper1 = new Swiper('.tgbox .swiper-container', {
slidesPerView: 1,
direction: 'vertical',
loop: true,
autoplay: {
delay: 2500,
disableOnInteraction: false,
},
});
var swiper2 = new Swiper('.ms_shop', {
slidesPerView: 3,
spaceBetween: 10,
speed: 1000,
loop: true,
autoplay: {
delay: 2500,
disableOnInteraction: false,
},
});
</script>
<script type="text/javascript">
function tow(n) {
return n >= 0 && n < 10 ? '0' + n : '' + n;
}
</script>
<script type="text/javascript" src="/public/mobile_zhengde/js/iscroll.js"></script>
<script type="text/javascript" src="/public/mobile_zhengde/js/navbarscroll.js"></script>
<script type="text/javascript">
$(function(){
$('.wrapper').navbarscroll();
});
</script>
</body>
</html>