Browse Source

page

master
林一峰 7 years ago
parent
commit
838b8003f1
  1. 16
      app/Http/Controllers/Home/IndexController.php
  2. 2
      resources/views/home/common/footer.blade.php
  3. 21
      resources/views/home/common/header.blade.php
  4. 8
      resources/views/home/index/detail.blade.php
  5. 21
      resources/views/home/index/goods.blade.php
  6. 7
      resources/views/home/index/goodslist.blade.php
  7. 7
      resources/views/home/index/index.blade.php
  8. 8
      resources/views/home/index/page.blade.php

16
app/Http/Controllers/Home/IndexController.php

@ -30,6 +30,11 @@ class IndexController extends CommonController
{
$cat = $request->input('id', '');
$page = $request->input('page', '');
//推荐
$tuijian = $request->input('tuijian', '');
if($tuijian){$where['tuijian'] = $tuijian;}
$pagenow = $page;
$post = '';
@ -56,10 +61,10 @@ class IndexController extends CommonController
$data['counts'] = $counts;
$start = $page*$pagesize;
$posts = $goods->get();
$posts = object_to_array($goods->skip($start)->take($pagesize)->get());
$data['posts'] = $posts; //获取列表
$data['pagenav'] = '';if($nextpage<=$pages && $nextpage>0){$data['pagenav'] = $this->listpageurl('http://'.$_SERVER['HTTP_HOST'],$_SERVER['QUERY_STRING'],$nextpage);}
$data['pagenav'] = '';if($nextpage<=$pages && $nextpage>0){$data['pagenav'] = $this->listpageurl(route('home_goodslist'),$_SERVER['QUERY_STRING'],$nextpage);}
$data['goods_type_list'] = object_to_array(DB::table('goods_type')->where(['pid'=>0,'status'=>1])->select('id','name')->take(30)->orderBy('listorder','asc')->get());
$data['id'] = $cat;
@ -92,8 +97,11 @@ class IndexController extends CommonController
$res = '';
foreach(explode("&",$query_string) as $row)
{
$canshu = explode("=",$row);
$res[$canshu[0]] = $canshu[1];
if($row)
{
$canshu = explode("=",$row);
$res[$canshu[0]] = $canshu[1];
}
}
if(isset($res['page']))

2
resources/views/home/common/footer.blade.php

@ -1 +1 @@
<div id="footer" class="box">&copy;丽杭汽车网 部分文章来源于网络,如果侵犯了您的权益,请<a href="http://www.bnbni.com/contact.html">联系我们</a><a target="_blank" href="http://www.bnbni.com/sitemap.xml">网站地图</a><div class="m-auto"><script>count_js();</script></div></div>
<div id="footer" class="box">&copy;丽杭汽车网 部分文章来源于网络,如果侵犯了您的权益,请联系我们。<div class="m-auto"><script>count_js();</script></div></div>

21
resources/views/home/common/header.blade.php

@ -2,12 +2,12 @@
<div class="box">
<p class="menu-left">
<span class="mobile">
<a class="mobileLink" href="//ju.taobao.com/tool/downApp.htm" target="_blank">
<a class="mobileLink" href="<?php echo route('home'); ?>">
手机聚划算
<img class="qr" data-src="//img.alicdn.com/tfs/TB1gkp9PpXXXXauaFXXXXXXXXXX-302-376.png">
</a>
</span>
<span class="login-info"><a class="user-nick" href="//i.taobao.com/my_taobao.htm" target="_top">缘中仙2008</a> <a target="_top" href="//login.taobao.com/member/logout.jhtml?f=top&amp;out=true&amp;redirectURL=https%3A%2F%2Fdetail.ju.taobao.com%2Fhome.htm%3Fspm%3D608.2291429.102212b.2.18df210XU8Vrg%26id%3D10000064961473%26item_id%3D523987525652" id="J_Logout">退出</a></span>
<span class="login-info"><a class="user-nick" href="//i.taobao.com/my_taobao.htm">缘中仙2008</a> <a href="//login.taobao.com/member/logout.jhtml?f=top&amp;out=true&amp;redirectURL=https%3A%2F%2Fdetail.ju.taobao.com%2Fhome.htm%3Fspm%3D608.2291429.102212b.2.18df210XU8Vrg%26id%3D10000064961473%26item_id%3D523987525652" id="J_Logout">退出</a></span>
</p>
<ul class="quick-menu">
<li>
@ -27,26 +27,23 @@
</div>
<div class="ju-naver">
<div class="box">
<h1 class="logo mouseleave"><a target="_top" class="ju-logo ju-logo-show" href="//ju.taobao.com/" title="聚划算"><img src="https://img.alicdn.com/tfs/TB1gFOyJVXXXXXLXpXXXXXXXXXX-150-118.png"></a></h1>
<h1 class="logo mouseleave"><a class="ju-logo ju-logo-show" href="<?php echo route('home'); ?>" title="聚划算"><img src="https://img.alicdn.com/tfs/TB1gFOyJVXXXXXLXpXXXXXXXXXX-150-118.png"></a></h1>
<ul id="J_NavMenu" class="nav-menu">
<li class="menu-home"><a target="_top" class="menu-link" href="<?php echo route('home'); ?>">首页</a></li>
<li class="menu-home"><a class="menu-link" href="<?php echo route('home'); ?>">首页</a></li>
<li class="menu-brands">
<a target="_top" class="menu-link" href="//ju.taobao.com/tg/brand.htm">品牌团</a>
<a class="menu-link" href="//ju.taobao.com/tg/brand.htm">品牌团</a>
</li>
<li class="menu-fcdp">
<a target="_top" class="menu-link" href="//ju.taobao.com/jusp/nv/fcdppc/tp.htm">非常大牌</a>
<a class="menu-link" href="//ju.taobao.com/jusp/nv/fcdppc/tp.htm">非常大牌</a>
</li>
<li class="menu-jump">
<a target="_top" class="menu-link" href="//ju.taobao.com/jusp/other/mingpin/tp.htm">聚名品</a>
<a class="menu-link" href="//ju.taobao.com/jusp/other/mingpin/tp.htm">聚名品</a>
</li>
<li class="menu-qqjx">
<a target="_top" class="menu-link" href="//ju.taobao.com/jusp/sp/global/tp.htm">全球精选</a>
<a class="menu-link" href="">动态</a>
</li>
<li class="menu-liangfan">
<a target="_top" class="menu-link" href="//ju.taobao.com/jusp/other/juliangfan/tp.htm">量贩团</a>
</li>
<li class="menu-travel">
<a target="_top" class="menu-link" href="//ju.taobao.com/jusp/shh/trip/tp.htm">旅游团</a>
<a class="menu-link" href="<?php echo route('home_singlepage',array('id'=>'about')); ?>">关于我们</a>
</li>
</ul>
</div>

8
resources/views/home/index/detail.blade.php

@ -0,0 +1,8 @@
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title><?php echo $post["title"]; ?>_<?php echo sysconfig('CMS_WEBNAME'); ?></title><meta name="keywords" content="{dede:field.keywords/}" /><meta name="description" content="{dede:field.description function='html2text(@me)'/}" /><link rel="stylesheet" href="<?php echo sysconfig('CMS_BASEHOST'); ?>/css/style.css"><script type="text/javascript" src="<?php echo sysconfig('CMS_BASEHOST'); ?>/js/ad.js"></script></head><body>
@include('home.common.header')
<div class="box" style="padding-top:20px;">
<h1 class="page-header" style="text-align:center;"><?php echo $post["title"]; ?></h1>
<div class="content mt10"><?php echo $post["body"]; ?></div>
</div>
@include('home.common.footer')</body></html>

21
resources/views/home/index/goods.blade.php

@ -1,7 +1,8 @@
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title><?php echo $post["title"]; ?>_<?php echo sysconfig('CMS_WEBNAME'); ?></title><meta name="keywords" content="{dede:field.keywords/}" /><meta name="description" content="{dede:field.description function='html2text(@me)'/}" /><link rel="stylesheet" href="<?php echo sysconfig('CMS_BASEHOST'); ?>/css/style.css"><script type="text/javascript" src="<?php echo sysconfig('CMS_BASEHOST'); ?>/js/ad.js"></script></head><body>
@include('home.common.header')
<script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/layer/layer.js"></script>
<style>
.detail-main {margin-top:15px;padding: 10px;position: relative;color: #626262;background: #fff;}
.detail-main .header {height: 28px;line-height: 28px;padding-bottom:8px;border-bottom: 1px dashed #ececec;font-size: 16px;}
@ -34,7 +35,7 @@
<span class="arrow"><small></small></span>
<li><a href="<?php echo route('home_goodslist',array('id'=>$post['id'])); ?>"><?php echo $post['type_name']; ?></a></li>
</ul>
<a class="bookMark" href="">查看更多同类商品<span></span></a>
<a class="bookMark" href="<?php echo route('home_goodslist',array('id'=>$post['id'])); ?>">查看更多同类商品<span></span></a>
</div>
<div class="clearfix">
@ -59,12 +60,26 @@
<div class="stock_bg" style="margin-top:10px;margin-bottom:30px;">
&nbsp;&nbsp;库存: <?php echo $post['goods_number']; ?>
</div>
<div class="details_join"><a href="javascript:asas();">立即抢购</a></div>
<div class="details_join"><a href="javascript:submit();">立即抢购</a></div>
</div>
<div class="cl"></div></div>
</div>
</div>
</div>
<script>
function submit()
{
//自定页
layer.open({
type: 1,
title: '请用【微信扫一扫】下单',
closeBtn: 0, //不显示关闭按钮
anim: 2,
shadeClose: true, //开启遮罩关闭
content: '<img src="<?php echo get_erweima(route('weixin_goods_detail',array('id'=>$post['id'])),360); ?>">'
});
}
</script>
<style>
.widget-box {border: 1px solid #d9d9d9;background: #fff;position: relative;margin-bottom: 10px;}
.widget-box .tit.none {border: none;}

7
resources/views/home/index/goodslist.blade.php

@ -14,9 +14,10 @@
<div class="box">
<div class="cat-menu-h">
<ul class="clearfix">
<li><a href="<?php echo route('home_goodslist'); ?>">全部</a></li>
<?php if($goods_type_list){foreach($goods_type_list as $k=>$v){ ?>
<li><a<?php if($v['id']==$id){echo ' class="hover"';} ?> href="<?php echo route('home_goodslist',array('id'=>$v['id'])); ?>"><?php echo $v['name']; ?></a></li><?php }} ?>
<li><a class="forecast" target="_blank" href="//ju.taobao.com/tg/forecast.htm"> [明日预告] </a></li>
<li><a class="forecast" href="<?php echo route('home_goodslist',array('tuijian'=>1)); ?>"> [推荐] </a></li>
</ul>
<form method="get" target="_blank" class="m-sch fr" name="formsearch" action="/plus/search.php"><input class="sch-txt" name="q" type="text" value="搜索 按Enter键" onfocus="if(value=='搜索 按Enter键') {value=''}" onblur="if(value=='') {value='搜索 按Enter键'}"></form>
@ -29,7 +30,7 @@
<?php if($posts){foreach($posts as $k=>$v){ ?>
<li><a href="<?php echo route('home_goods',array('id'=>$v['id'])); ?>" target="_blank"><img src="<?php echo $v['litpic']; ?>" alt="<?php echo $v['title']; ?>">
<p class="title"><?php echo $v['title']; ?></p>
<p class="desc"><span class="price-point"><i></i>库存(<?php echo $v['goods_number']; ?>)</span> <?php echo $v['title']; ?>撒个地方官发个话说得好电话公司电话</p>
<p class="desc"><span class="price-point"><i></i>库存(<?php echo $v['goods_number']; ?>)</span> <?php echo $v['description']; ?></p>
<div class="item-prices red"><div class="item-link">立即<br>抢购</div><div class="item-info"><div class="price"><i>¥</i><em class="J_actPrice"><span class="yen"><?php echo $v['price']; ?></span></em></div>
<div class="dock"><div class="dock-price"><del class="orig-price">¥<?php echo $v['market_price']; ?></del> <span class="benefit">退货赔运费</span></div><div class="prompt"><div class="sold-num"><em><?php echo $v['sale']; ?></em> 件已付款</div></div></div>
</div></div>
@ -37,7 +38,7 @@
<?php }} ?>
</ul></div>
<div class="pages"><ul><?php echo $pagenav; ?></ul><div class="cl"></div></div>
<?php if($pagenav){ ?><div class="pages"><ul><li style="width:180px;"><a href="<?php echo $pagenav; ?>">获取更多</a></li></ul><div class="cl"></div></div><?php } ?>
</div><!-- box end -->@include('home.common.footer')
<script>//图片幻灯

7
resources/views/home/index/index.blade.php

@ -26,9 +26,10 @@
<div class="box">
<div class="cat-menu-h">
<ul class="clearfix">
<li><a href="<?php echo route('home_goodslist'); ?>">全部</a></li>
<?php if($goods_type_list){foreach($goods_type_list as $k=>$v){ ?>
<li><a href="<?php echo route('home_goodslist',array('id'=>$v['id'])); ?>"><?php echo $v['name']; ?></a></li><?php }} ?>
<li><a class="forecast" target="_blank" href="//ju.taobao.com/tg/forecast.htm"> [明日预告] </a></li>
<li><a class="forecast" href="<?php echo route('home_goodslist',array('tuijian'=>1)); ?>"> [推荐] </a></li>
</ul>
<form method="get" target="_blank" class="m-sch fr" name="formsearch" action="/plus/search.php"><input class="sch-txt" name="q" type="text" value="搜索 按Enter键" onfocus="if(value=='搜索 按Enter键') {value=''}" onblur="if(value=='') {value='搜索 按Enter键'}"></form>
@ -41,7 +42,7 @@
<?php if($goods_list){foreach($goods_list as $k=>$v){ ?>
<li><a href="<?php echo route('home_goods',array('id'=>$v['id'])); ?>" target="_blank"><img src="<?php echo $v['litpic']; ?>" alt="<?php echo $v['title']; ?>">
<p class="title"><?php echo $v['title']; ?></p>
<p class="desc"><span class="price-point"><i></i>库存(<?php echo $v['goods_number']; ?>)</span> <?php echo $v['title']; ?>撒个地方官发个话说得好电话公司电话</p>
<p class="desc"><span class="price-point"><i></i>库存(<?php echo $v['goods_number']; ?>)</span> <?php echo $v['description']; ?></p>
<div class="item-prices red"><div class="item-link">立即<br>抢购</div><div class="item-info"><div class="price"><i>¥</i><em class="J_actPrice"><span class="yen"><?php echo ceil($v['price']); ?></span></em></div>
<div class="dock"><div class="dock-price"><del class="orig-price">¥<?php echo $v['market_price']; ?></del> <span class="benefit">退货赔运费</span></div><div class="prompt"><div class="sold-num"><em><?php echo $v['sale']; ?></em> 件已付款</div></div></div>
</div></div>
@ -49,8 +50,6 @@
<?php }} ?>
</ul></div>
<div class="pages"><ul><li style="width:180px;"><a href="<?php echo $pagenav; ?>">获取更多</a></li></ul><div class="cl"></div></div><div id="lad3"><script>ljs3();</script></div>
</div><!-- box end -->@include('home.common.footer')
<script>//图片幻灯
var glide =new function(){

8
resources/views/home/index/page.blade.php

@ -0,0 +1,8 @@
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title><?php echo $post["title"]; ?>_<?php echo sysconfig('CMS_WEBNAME'); ?></title><meta name="keywords" content="{dede:field.keywords/}" /><meta name="description" content="{dede:field.description function='html2text(@me)'/}" /><link rel="stylesheet" href="<?php echo sysconfig('CMS_BASEHOST'); ?>/css/style.css"><script type="text/javascript" src="<?php echo sysconfig('CMS_BASEHOST'); ?>/js/ad.js"></script></head><body>
@include('home.common.header')
<div class="box" style="padding-top:20px;">
<h1 class="page-header" style="text-align:center;"><?php echo $post["title"]; ?></h1>
<div class="content mt10"><?php echo $post["body"]; ?></div>
</div>
@include('home.common.footer')</body></html>
Loading…
Cancel
Save