Browse Source

article_category_detail

master
ZLW-PC\Administrator 7 years ago
parent
commit
6a4f9c038f
  1. 57
      app/Http/Controllers/Api/ArctypeController.php
  2. 12
      app/Http/Controllers/Api/ArticleController.php
  3. 124
      app/Http/Controllers/Weixin/IndexController.php
  4. 94
      app/Http/Model/Arctype.php
  5. 14
      app/Http/Model/Article.php
  6. 44
      lqycms.sql
  7. 8
      public/css/weixin/style.css
  8. 2
      resources/views/weixin/common/footer.blade.php
  9. 56
      resources/views/weixin/index/category.blade.php
  10. 61
      resources/views/weixin/index/detail.blade.php
  11. 6
      resources/views/weixin/index/index.blade.php
  12. 75
      resources/views/weixin/index/search.blade.php
  13. 70
      routes/web.php

57
app/Http/Controllers/Api/ArctypeController.php

@ -0,0 +1,57 @@
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Api\CommonController;
use Illuminate\Http\Request;
use Log;
use App\Common\ReturnData;
use App\Http\Model\Arctype;
class ArctypeController extends CommonController
{
public function __construct()
{
parent::__construct();
}
public function arctypeList(Request $request)
{
//参数
$data['limit'] = $request->input('limit', 10);
$data['offset'] = $request->input('offset', 0);
if($request->input('pid', null) !== null){$data['pid'] = $request->input('pid');}
$data['is_show'] = Arctype::IS_SHOW;
$res = Arctype::getList($data);
if($res == false)
{
return ReturnData::create(ReturnData::SYSTEM_FAIL);
}
foreach($res as $k=>$v)
{
$res['list'][$k]->addtime = date('Y-m-d H:i',$v->addtime);
$res['list'][$k]->category_list_url = route('weixin_article_category',array('id'=>$v->id));
}
return ReturnData::create(ReturnData::SUCCESS,$res);
}
public function arctypeDetail(Request $request)
{
//参数
$data['id'] = $request->input('id');
$data['is_show'] = Arctype::IS_SHOW;
$res = Arctype::getOne($data);
if($res === false)
{
return ReturnData::create(ReturnData::SYSTEM_FAIL);
}
$res->addtime = date('Y-m-d H:i',$res->addtime);
return ReturnData::create(ReturnData::SUCCESS,$res);
}
}

12
app/Http/Controllers/Api/ArticleController.php

@ -24,11 +24,18 @@ class ArticleController extends CommonController
$data['ischeck'] = Article::IS_CHECK;
$res = Article::getList($data);
if($res == false)
if($res === false)
{
return ReturnData::create(ReturnData::SYSTEM_FAIL);
}
foreach($res['list'] as $k=>$v)
{
$res['list'][$k]->pubdate = date('Y-m-d H:i',$v->pubdate);
$res['list'][$k]->addtime = date('Y-m-d H:i',$v->addtime);
$res['list'][$k]->article_detail_url = route('weixin_article_detail',array('id'=>$v->id));
}
return ReturnData::create(ReturnData::SUCCESS,$res);
}
@ -44,6 +51,9 @@ class ArticleController extends CommonController
return ReturnData::create(ReturnData::SYSTEM_FAIL);
}
$res->pubdate = date('Y-m-d H:i',$res->pubdate);
$res->addtime = date('Y-m-d H:i',$res->addtime);
return ReturnData::create(ReturnData::SUCCESS,$res);
}
}

124
app/Http/Controllers/Weixin/IndexController.php

@ -3,6 +3,7 @@ namespace App\Http\Controllers\Weixin;
use App\Http\Controllers\Weixin\CommonController;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
class IndexController extends CommonController
{
@ -20,7 +21,7 @@ class IndexController extends CommonController
'offset' => 0
);
$url = env('APP_API_URL')."/slide_list";
$slide_list = json_decode(curl_request($url,$postdata,'GET'),true);
$slide_list = curl_request($url,$postdata,'GET');
$data['slide_list'] = $slide_list['data']['list'];
//最新资讯
@ -29,7 +30,7 @@ class IndexController extends CommonController
'offset' => 0
);
$url = env('APP_API_URL')."/article_list";
$article_list = json_decode(curl_request($url,$postdata,'GET'),true);
$article_list = curl_request($url,$postdata,'GET');
$data['article_list'] = $article_list['data']['list'];
//商品列表
@ -38,47 +39,33 @@ class IndexController extends CommonController
'offset' => 0
);
$url = env('APP_API_URL')."/goods_list";
$goods_list = json_decode(curl_request($url,$postdata,'GET'),true);
$goods_list = curl_request($url,$postdata,'GET');
$data['goods_list'] = $goods_list['data']['list'];
return view('weixin.index.index',$data);
}
//列表页
public function category($cat, $page=0)
public function category($cat)
{
$pagenow = $page;
if(empty($cat) || !preg_match('/[0-9]+/',$cat)){return redirect()->route('page404');}
if(cache("catid$cat")){$post = cache("catid$cat");}else{$post = object_to_array(DB::table('arctype')->where('id', $cat)->first(), 1);if(empty($post)){return redirect()->route('page404');} cache(["catid$cat"=>$post], \Carbon\Carbon::now()->addMinutes(2592000));}
$data['post'] = $post;
$subcat="";$sql="";
$post2 = object_to_array(DB::table('arctype')->select('id')->where('pid', $cat)->get());
if(!empty($post2)){foreach($post2 as $row){$subcat=$subcat."typeid=".$row["id"]." or ";}}
$subcat=$subcat."typeid=".$cat;
$sql=$subcat." or typeid2 in (".$cat.")";//echo $subcat2;exit;
$data['sql'] = $sql;
$counts = DB::table("article")->whereRaw($sql)->count();
if($counts>sysconfig('CMS_MAXARC')){$counts=sysconfig('CMS_MAXARC');dd($counts);}
$pagesize = sysconfig('CMS_PAGESIZE');$page=0;
if($counts % $pagesize){//取总数据量除以每页数的余数
$pages = intval($counts/$pagesize) + 1; //如果有余数,则页数等于总数据量除以每页数的结果取整再加一,如果没有余数,则页数等于总数据量除以每页数的结果
}else{$pages = $counts/$pagesize;}
if(!empty($pagenow)){if($pagenow==1 || $pagenow>$pages){return redirect()->route('page404');}$page = $pagenow-1;$nextpage=$pagenow+1;$previouspage=$pagenow-1;}else{$page = 0;$nextpage=2;$previouspage=0;}
$data['page'] = $page;
$data['pages'] = $pages;
$data['counts'] = $counts;
$start = $page*$pagesize;
$data['posts'] = arclist(array("sql"=>$sql, "limit"=>"$start,$pagesize")); //获取列表
$data['pagenav'] = get_listnav(array("counts"=>$counts,"pagesize"=>$pagesize,"pagenow"=>$page+1,"catid"=>$cat)); //获取分页列表
//文章分类
$postdata = array(
'id' => $cat
);
$url = env('APP_API_URL')."/arctype_detail";
$arctype_detail = curl_request($url,$postdata,'GET');
$data['post'] = $arctype_detail['data'];
if($post['templist']=='category2'){if(!empty($pagenow)){return redirect()->route('page404');}}
//文章列表
$postdata = array(
'limit' => 10,
'offset' => 0
);
$url = env('APP_API_URL')."/article_list";
$article_list = curl_request($url,$postdata,'GET');
$data['article_list'] = $article_list['data']['list'];
return view('home.index.'.$post['templist'], $data);
return view('weixin.index.category', $data);
}
//文章详情页
@ -145,29 +132,19 @@ class IndexController extends CommonController
if($post['template']=='tag2' || $post['template']=='tag3'){if(!empty($pagenow)){return redirect()->route('page404');}}
return view('home.index.'.$post['template'], $data);
return view('weixin.index.'.$post['template'], $data);
}
//标签页
public function tags()
{
return view('home.index.tags');
return view('weixin.index.tags');
}
//搜索页
public function search($keyword)
public function search()
{
if(empty($keyword))
{
echo '请输入正确的关键词';exit;
}
if(strstr($keyword,"&")) exit;
$data['posts']= object_to_array(DB::table("article")->where("title", "like", "%$keyword%")->orderBy('id', 'desc')->take(30)->get());
$data['keyword']= $keyword;
return view('home.index.search', $data);
return view('weixin.index.search');
}
//单页面
@ -197,43 +174,22 @@ class IndexController extends CommonController
$data['posts'] = object_to_array(DB::table('page')->orderBy(\DB::raw('rand()'))->take(5)->get());
return view('home.index.'.$post['template'], $data);
return view('weixin.index.'.$post['template'], $data);
}
//商品列表页
public function goodstype($cat, $page=0)
public function goodslist(Request $request)
{
$pagenow = $page;
if(empty($cat) || !preg_match('/[0-9]+/',$cat)){return redirect()->route('page404');}
$post = object_to_array(DB::table('goods_type')->where('id', $cat)->first(), 1);if(empty($post)){return redirect()->route('page404');}
$data['post'] = $post;
$subcat="";
$post2 = object_to_array(DB::table('goods_type')->select('id')->where('pid', $cat)->get());
if(!empty($post2)){foreach($post2 as $row){$subcat=$subcat."typeid=".$row["id"]." or ";}}
$subcat=$subcat."typeid=".$cat;
$data['sql'] = $subcat;
$counts = DB::table("goods")->whereRaw($subcat)->count();
if($counts>sysconfig('CMS_MAXARC')){$counts=sysconfig('CMS_MAXARC');dd($counts);}
$pagesize = sysconfig('CMS_PAGESIZE');$page=0;
if($counts % $pagesize){//取总数据量除以每页数的余数
$pages = intval($counts/$pagesize) + 1; //如果有余数,则页数等于总数据量除以每页数的结果取整再加一,如果没有余数,则页数等于总数据量除以每页数的结果
}else{$pages = $counts/$pagesize;}
if(!empty($pagenow)){if($pagenow==1 || $pagenow>$pages){return redirect()->route('page404');}$page = $pagenow-1;$nextpage=$pagenow+1;$previouspage=$pagenow-1;}else{$page = 0;$nextpage=2;$previouspage=0;}
$data['page'] = $page;
$data['pages'] = $pages;
$data['counts'] = $counts;
$start = $page*$pagesize;
$data['posts'] = arclist(array("table"=>"goods","sql"=>$subcat, "limit"=>"$start,$pagesize")); //获取列表
$data['pagenav'] = get_listnav(array("counts"=>$counts,"pagesize"=>$pagesize,"pagenow"=>$page+1,"catid"=>$cat,"urltype"=>"goods")); //获取分页列表
if($post['templist']=='category2'){if(!empty($pagenow)){return redirect()->route('page404');}}
return view('home.index.'.$post['templist'], $data);
if($request->input('typeid', '') != ''){$data['typeid'] = $request->input('typeid');}
if($request->input('tuijian', '') != ''){$data['tuijian'] = $request->input('tuijian');}
if($request->input('keyword', '') != ''){$data['keyword'] = $request->input('keyword');}
if($request->input('status', '') != ''){$data['status'] = $request->input('status');}
if($request->input('is_promote', '') != ''){$data['is_promote'] = $request->input('is_promote');}
if($request->input('orderby', '') != ''){$data['orderby'] = $request->input('orderby');}
if($request->input('max_price', '') != ''){$data['max_price'] = $request->input('max_price');}else{$data['max_price'] = 99999;}
if($request->input('min_price', '') != ''){$data['min_price'] = $request->input('min_price');}else{$data['min_price'] = 0;}
return view('weixin.index.goodslist', $data);
}
//商品详情页
@ -258,13 +214,13 @@ class IndexController extends CommonController
$post = object_to_array(DB::table('goods_type')->where('id', $cat)->first(), 1);
return view('home.index.'.$post['temparticle'], $data);
return view('weixin.index.'.$post['temparticle'], $data);
}
//sitemap页面
public function sitemap()
{
return view('home.index.sitemap');
return view('weixin.index.sitemap');
}
//404页面
@ -275,7 +231,7 @@ class IndexController extends CommonController
//测试页面
public function test()
{return view('home.index.test');
{return view('weixin.index.test');
//return base_path('resources/org');
//$qrcode = new \SimpleSoftwareIO\QrCode\BaconQrCodeGenerator;
//return $qrcode->size(500)->generate('Make a qrcode without Laravel!');

94
app/Http/Model/Arctype.php

@ -29,6 +29,14 @@ class Arctype extends Model
*/
//protected $connection = 'connection-name';
const IS_SHOW = 0; // 显示
const UN_SHOW = 1; // 不显示
//常用字段
protected static $common_field = array(
'id', 'pid', 'addtime', 'name', 'seotitle', 'keywords', 'description','typedir', 'templist', 'temparticle', 'litpic', 'listorder', 'is_show'
);
/**
* 获取分类对应的文章
*/
@ -37,4 +45,90 @@ class Arctype extends Model
return $this->hasMany(Article::class, 'typeid', 'id');
}
public static function getList(array $param)
{
extract($param); //参数:group_id,limit,offset
$limit = isset($limit) ? $limit : 10;
$offset = isset($offset) ? $offset : 0;
$model = new Arctype;
if(isset($pid)){$where['pid'] = $pid;}
if(isset($is_show)){$where['is_show'] = $is_show;}
if(isset($keyword)){$model = $model->where("name", "like", "%$keyword%");} //关键词搜索
if($where){$model = $model->where($where);}
$res['count'] = $model->count();
$res['list'] = array();
//排序
if(isset($orderby))
{
switch ($orderby)
{
case 1:
$model = $model->orderBy('listorder','desc'); //排序
break;
case 2:
$model = $model->orderBy('addtime','desc'); //添加时间从高到低
break;
default:
$model = $model->orderBy('id','desc'); //id从高到低
}
}
if($res['count']>0)
{
$res['list'] = $model->select(self::$common_field)->orderBy('id', 'desc')->skip($offset)->take($limit)->get();
}
else
{
return false;
}
return $res;
}
public static function getOne(array $param)
{
extract($param);
$where['id'] = $id;
if(isset($is_show)){$where['is_show'] = $is_show;}
return self::where($where)->first();
}
public static function add(array $data)
{
if ($id = self::insertGetId($data))
{
return $id;
}
return false;
}
public static function modify($where, array $data)
{
if (self::where($where)->update($data)!==false)
{
return true;
}
return false;
}
//删除一条记录
public static function remove($id)
{
if (!self::whereIn('id', explode(',', $id))->delete())
{
return false;
}
return true;
}
}

14
app/Http/Model/Article.php

@ -85,19 +85,7 @@ class Article extends BaseModel
if($res['count']>0)
{
$res['list'] = $model->select(self::$common_field)->orderBy('id', 'desc')->skip($offset)->take($limit)->get();
if($res['list'])
{
foreach($res['list'] as $k=>$v)
{
$res['list'][$k]->article_detail_url = route('weixin_article_detail',array('id'=>$v->id));
}
}
}
else
{
return false;
$res['list'] = $model->select(self::$common_field)->orderBy('id', 'desc')->skip($offset)->take($limit)->get();
}
return $res;

44
lqycms.sql

@ -166,6 +166,7 @@ CREATE TABLE `fl_arctype` (
`seokeyword` varchar(60) DEFAULT '' COMMENT '判断相关,可不填',
`model` int(4) DEFAULT '0' COMMENT '栏目所属的模型',
`listorder` smallint(5) DEFAULT '50' COMMENT '排序',
`is_show` tinyint(1) DEFAULT '0' COMMENT '是否显示,默认0显示',
PRIMARY KEY (`id`),
UNIQUE KEY `typename` (`name`),
UNIQUE KEY `typedir` (`typedir`)
@ -173,7 +174,7 @@ CREATE TABLE `fl_arctype` (
/*Data for the table `fl_arctype` */
insert into `fl_arctype`(`id`,`pid`,`addtime`,`name`,`seotitle`,`keywords`,`description`,`content`,`typedir`,`templist`,`temparticle`,`litpic`,`seokeyword`,`model`,`listorder`) values (1,0,1483345707,'新闻中心','','新闻中心','新闻中心','<p>新闻中心</p>','news','category','detail','','新闻中心',0,50),(2,0,1476063429,'案例中心','','案例中心','案例中心','<p>案例中心</p>','case','category','detail','','案例中心',0,50),(3,1,1476063419,'行业新闻','','行业新闻','行业新闻','<p>行业新闻</p>','hangye','category','detail','','行业新闻',0,50),(4,1,1476068069,'企业新闻','','企业新闻','企业新闻','<p>企业新闻</p>','qiye','category','detail','','企业新闻',0,50);
insert into `fl_arctype`(`id`,`pid`,`addtime`,`name`,`seotitle`,`keywords`,`description`,`content`,`typedir`,`templist`,`temparticle`,`litpic`,`seokeyword`,`model`,`listorder`,`is_show`) values (1,0,1483345707,'新闻中心','','新闻中心','新闻中心','<p>新闻中心</p>','news','category','detail','','新闻中心',0,50,0),(2,0,1476063429,'案例中心','','案例中心','案例中心','<p>案例中心</p>','case','category','detail','','案例中心',0,50,0),(3,1,1476063419,'行业新闻','','行业新闻','行业新闻','<p>行业新闻</p>','hangye','category','detail','','行业新闻',0,50,0),(4,1,1476068069,'企业新闻','','企业新闻','企业新闻','<p>企业新闻</p>','qiye','category','detail','','企业新闻',0,50,0);
/*Table structure for table `fl_article` */
@ -391,7 +392,7 @@ CREATE TABLE `fl_goods` (
/*Data for the table `fl_goods` */
insert into `fl_goods`(`id`,`typeid`,`tuijian`,`click`,`title`,`body`,`sn`,`price`,`litpic`,`pubdate`,`add_time`,`keywords`,`seotitle`,`description`,`status`,`shipping_fee`,`market_price`,`goods_number`,`user_id`,`sale`,`cost_price`,`goods_weight`,`point`,`comments`,`promote_start_date`,`promote_price`,`promote_end_date`,`goods_img`,`warn_number`,`spec`,`listorder`) values (1,2,0,5653,'示例产品一',NULL,'sn123456','45000.00','/uploads/2017/06/201706041951031181.jpg',1496577749,1496577749,'示例,产品,一','','',0,'0.00','50000.00',21,1,0,'0.00','0.00',NULL,NULL,NULL,'0.00',NULL,NULL,NULL,NULL,50),(2,1,0,3,'示例产品二',NULL,'sn987','1.00','/uploads/2017/06/201706042011354141.jpg',1496578330,1496578313,'产品,示例,二','','',0,'3.00','2.00',3,1,3,'0.00','0.00',NULL,NULL,NULL,'0.00',NULL,NULL,NULL,NULL,50),(3,1,0,3,'示例产品三',NULL,'sn232143','5.00','/uploads/2017/06/201706042012428057.jpg',1496578380,1496578380,'示例,产品,三','','',0,'3.00','4.00',3,1,1,'0.00','0.00',NULL,NULL,NULL,'0.00',NULL,NULL,NULL,NULL,50),(4,1,0,7,'示例产品四2',NULL,'sn9809702','5.00','/uploads/2017/06/201706042013331349.jpg',1500994245,1496578429,'示例,产品,四','','',0,'3.00','6.00',7,1,4,'0.00','0.00',NULL,NULL,NULL,'0.00',NULL,NULL,NULL,NULL,50);
insert into `fl_goods`(`id`,`typeid`,`tuijian`,`click`,`title`,`body`,`sn`,`price`,`litpic`,`pubdate`,`add_time`,`keywords`,`seotitle`,`description`,`status`,`shipping_fee`,`market_price`,`goods_number`,`user_id`,`sale`,`cost_price`,`goods_weight`,`point`,`comments`,`promote_start_date`,`promote_price`,`promote_end_date`,`goods_img`,`warn_number`,`spec`,`listorder`) values (1,2,0,5653,'示例产品一','是的发生','sn123456','45000.00','/uploads/2017/06/201706041951031181.jpg',1496577749,1496577749,'示例,产品,一','','',0,'0.00','50000.00',21,1,0,'0.00','0.00',NULL,NULL,NULL,'0.00',NULL,NULL,NULL,NULL,50),(2,1,0,3,'示例产品二',NULL,'sn987','1.00','/uploads/2017/06/201706042011354141.jpg',1496578330,1496578313,'产品,示例,二','','',0,'3.00','2.00',3,1,3,'0.00','0.00',NULL,NULL,NULL,'0.00',NULL,NULL,NULL,NULL,50),(3,1,0,3,'示例产品三',NULL,'sn232143','5.00','/uploads/2017/06/201706042012428057.jpg',1496578380,1496578380,'示例,产品,三','','',0,'3.00','4.00',3,1,1,'0.00','0.00',NULL,NULL,NULL,'0.00',NULL,NULL,NULL,NULL,50),(4,1,0,7,'示例产品四2',NULL,'sn9809702','5.00','/uploads/2017/06/201706042013331349.jpg',1500994245,1496578429,'示例,产品,四','','',0,'3.00','6.00',7,1,4,'0.00','0.00',NULL,NULL,NULL,'0.00',NULL,NULL,NULL,NULL,50);
/*Table structure for table `fl_goods_photo` */
@ -414,20 +415,21 @@ DROP TABLE IF EXISTS `fl_goods_type`;
CREATE TABLE `fl_goods_type` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`pid` smallint(5) DEFAULT '0' COMMENT '父级栏目id',
`addtime` int(11) DEFAULT '0' COMMENT '添加时间',
`pid` smallint(5) NOT NULL DEFAULT '0' COMMENT '父级栏目id',
`addtime` int(11) NOT NULL DEFAULT '0' COMMENT '添加时间',
`name` varchar(30) NOT NULL DEFAULT '' COMMENT '栏目名称',
`seotitle` varchar(150) DEFAULT '' COMMENT 'seo标题',
`keywords` varchar(60) DEFAULT '' COMMENT '关键词',
`description` varchar(255) DEFAULT '' COMMENT '描述',
`seotitle` varchar(150) NOT NULL DEFAULT '' COMMENT 'seo标题',
`keywords` varchar(60) NOT NULL DEFAULT '' COMMENT '关键词',
`description` varchar(255) NOT NULL DEFAULT '' COMMENT '描述',
`content` text COMMENT '内容',
`typedir` varchar(30) NOT NULL DEFAULT '' COMMENT '别名',
`templist` varchar(50) DEFAULT '' COMMENT '列表页模板',
`temparticle` varchar(50) DEFAULT '' COMMENT '详情页模板',
`litpic` varchar(100) DEFAULT '' COMMENT '封面或缩略图',
`seokeyword` varchar(60) DEFAULT '' COMMENT '判断相关,可不填',
`status` smallint(1) DEFAULT '1' COMMENT '是否显示',
`listorder` smallint(5) DEFAULT '50' COMMENT '排序',
`templist` varchar(50) NOT NULL DEFAULT '' COMMENT '列表页模板',
`temparticle` varchar(50) NOT NULL DEFAULT '' COMMENT '详情页模板',
`litpic` varchar(100) NOT NULL DEFAULT '' COMMENT '缩略图',
`seokeyword` varchar(60) NOT NULL DEFAULT '' COMMENT '判断相关,可不填',
`status` smallint(1) NOT NULL DEFAULT '1' COMMENT '是否显示',
`listorder` smallint(5) NOT NULL DEFAULT '50' COMMENT '排序',
`cover` varchar(100) NOT NULL DEFAULT '' COMMENT '封面',
PRIMARY KEY (`id`),
UNIQUE KEY `typename` (`name`),
UNIQUE KEY `typedir` (`typedir`)
@ -435,7 +437,7 @@ CREATE TABLE `fl_goods_type` (
/*Data for the table `fl_goods_type` */
insert into `fl_goods_type`(`id`,`pid`,`addtime`,`name`,`seotitle`,`keywords`,`description`,`content`,`typedir`,`templist`,`temparticle`,`litpic`,`seokeyword`,`status`,`listorder`) values (1,0,1496576972,'书籍','','','','<p>书籍</p>','book','productcat','product','','',1,50),(2,0,1496576993,'数码','','','',NULL,'shuma','productcat','product','','',1,50),(3,0,1500994389,'qq','qq','qq','','<p>qq</p>','qq','goodscat','goods','','qq',1,50);
insert into `fl_goods_type`(`id`,`pid`,`addtime`,`name`,`seotitle`,`keywords`,`description`,`content`,`typedir`,`templist`,`temparticle`,`litpic`,`seokeyword`,`status`,`listorder`,`cover`) values (1,0,1496576972,'书籍','','','','<p>书籍</p>','book','goodscat','goods','','',1,50,''),(2,0,1496576993,'数码','','','',NULL,'shuma','goodscat','goods','','',1,50,''),(3,0,1500994389,'qq','qq','qq','','<p>qq</p>','qq','goodscat','goods','','qq',1,50,'');
/*Table structure for table `fl_guestbook` */
@ -634,7 +636,7 @@ CREATE TABLE `fl_payment` (
/*Data for the table `fl_payment` */
insert into `fl_payment`(`id`,`pay_code`,`pay_name`,`pay_fee`,`pay_des`,`pay_order`,`pay_config`,`status`) values (1,'balance','余额支付','0','使用帐户余额支付。只有会员才能使用,通过设置信用额度,可以透支。',0,'a:0:{}',1),(2,'alipay','支付宝','0','支付宝',0,'a:0:{}',1),(3,'weixin','微信','0','微信',0,'a:0:{}',1),(4,'bank','银行汇款/转帐','0','银行名称\n收款人信息:全称 ××× ;帐号或地址 ××× ;开户行 ×××。\n注意事项:办理电汇时,请在电汇单“汇款用途”一栏处注明您的订单号。',0,'a:0:{}',0),(5,'cod','货到付款','0','开通城市:×××\n货到付款区域:×××',0,'a:0:{}',0);
insert into `fl_payment`(`id`,`pay_code`,`pay_name`,`pay_fee`,`pay_des`,`pay_order`,`pay_config`,`status`) values (1,'balance','余额支付','0','使用帐户余额支付。只有会员才能使用,通过设置信用额度,可以透支。',0,'a:0:{}',1),(2,'weixin','微信','0','微信',0,'a:0:{}',1),(3,'alipay','支付宝','0','支付宝',0,'a:0:{}',1),(4,'cod','货到付款','0','开通城市:×××\r\n货到付款区域:×××',0,'a:0:{}',0),(5,'bank','银行汇款/转帐','0','银行名称\r\n收款人信息:全称 ××× ;帐号或地址 ××× ;开户行 ×××。\r\n注意事项:办理电汇时,请在电汇单“汇款用途”一栏处注明您的订单号。',0,'a:0:{}',0);
/*Table structure for table `fl_refund` */
@ -742,11 +744,11 @@ CREATE TABLE `fl_slide` (
`rank` int(4) DEFAULT '0' COMMENT '排序',
`is_show` smallint(1) DEFAULT '0' COMMENT '是否显示,默认0显示',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*Data for the table `fl_slide` */
insert into `fl_slide`(`id`,`title`,`url`,`target`,`group_id`,`pic`,`rank`,`is_show`) values (1,'72PCMS','http://www.72p.org/',0,0,'/uploads/2016/12/201612171800224583.jpg',0,0),(2,'炒股入门知识','http://www.pe7.org/',0,0,'/uploads/2016/12/201612171804239092.jpg',50,1),(4,'将很快就会','http://www.baidu.com/',0,6,'/uploads/2016/12/201612171732241499.jpg',89,0),(5,'sdf2','http://wsdfsa.com',1,66,'/uploads/2017/05/201705311643481302.png',5,1);
insert into `fl_slide`(`id`,`title`,`url`,`target`,`group_id`,`pic`,`rank`,`is_show`) values (1,'1','http://www.baidu.com',0,0,'/uploads/2017/09/201709242246099096.jpg',0,0),(2,'2','http://www.sina.com',0,0,'/uploads/2017/09/201709242246091005.jpg',0,0),(3,'3','http://www.163.com',0,0,'/uploads/2017/09/201709242246091160.jpg',0,0);
/*Table structure for table `fl_sms_log` */
@ -824,12 +826,13 @@ CREATE TABLE `fl_sysconfig` (
`varname` varchar(100) NOT NULL DEFAULT '' COMMENT '变量名',
`info` varchar(100) NOT NULL DEFAULT '' COMMENT '变量值',
`value` text NOT NULL COMMENT '变量说明',
`is_show` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否显示,默认0显示,让客户看不到',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
/*Data for the table `fl_sysconfig` */
insert into `fl_sysconfig`(`id`,`varname`,`info`,`value`) values (1,'CMS_WEBNAME','网站名称','LQYCMS企业建站系统'),(2,'CMS_BASEHOST','站点根网址','http://www.lqycms.com'),(3,'CMS_UPLOADS','图片/上传文件默认路径','/uploads'),(4,'CMS_CSS','css默认存放路径','/css'),(5,'CMS_JS','js默认存放路径','/js'),(6,'CMS_INDEXNAME','主页链接名','首页'),(7,'CMS_POWERBY','网站版权信息','Copyright &copy; LQYCMS 版权所有'),(8,'CMS_IMGWIDTH','缩略图默认宽度','240'),(9,'CMS_IMGHEIGHT','缩略图默认高度','180'),(10,'CMS_SEOTITLE','网站seotitle','lqycms是一套完全免费、开源、无授权限制的网站管理系统'),(11,'CMS_KEYWORDS','网站关键词Keywords','lqycms,无授权限制网站系统cms,免费cms系统,开源网站管理系统,开源cms'),(12,'CMS_DESCRIPTION','网站描述','lqycms完全免费、开源、无授权限制,您可以使用lqycms在任何商业或者非商业网站上使用而不必支付任何费用,系统采用主流的mvc架构开发,更加容易进行二次开发。'),(13,'CMS_ISCACHE','是否开启缓存,1开启,0关闭','1'),(14,'CMS_MAXARC','最大返回列表结果数,默认300','300'),(15,'CMS_PAGESIZE','列表每页显示的数量,默认15','15'),(16,'CMS_SIGN_POINT','签到积分','5');
insert into `fl_sysconfig`(`id`,`varname`,`info`,`value`,`is_show`) values (1,'CMS_WEBNAME','网站名称','LQYCMS企业建站系统',0),(2,'CMS_BASEHOST','站点根网址','http://www.lqycms.com',0),(3,'CMS_UPLOADS','图片/上传文件默认路径','/uploads',0),(4,'CMS_CSS','css默认存放路径','/css',0),(5,'CMS_JS','js默认存放路径','/js',0),(6,'CMS_INDEXNAME','主页链接名','首页',0),(7,'CMS_POWERBY','网站版权信息','Copyright &copy; LQYCMS 版权所有',0),(8,'CMS_IMGWIDTH','缩略图默认宽度','240',0),(9,'CMS_IMGHEIGHT','缩略图默认高度','180',0),(10,'CMS_SEOTITLE','网站seotitle','lqycms是一套完全免费、开源、无授权限制的网站管理系统',0),(11,'CMS_KEYWORDS','网站关键词Keywords','lqycms,无授权限制网站系统cms,免费cms系统,开源网站管理系统,开源cms',0),(12,'CMS_DESCRIPTION','网站描述','lqycms完全免费、开源、无授权限制,您可以使用lqycms在任何商业或者非商业网站上使用而不必支付任何费用,系统采用主流的mvc架构开发,更加容易进行二次开发。',0),(13,'CMS_ISCACHE','是否开启缓存,1开启,0关闭','1',0),(14,'CMS_MAXARC','最大返回列表结果数,默认300','300',0),(15,'CMS_PAGESIZE','列表每页显示的数量,默认15','15',0),(16,'CMS_SIGN_POINT','签到积分','5',0);
/*Table structure for table `fl_tagindex` */
@ -896,7 +899,8 @@ CREATE TABLE `fl_user` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(60) NOT NULL DEFAULT '' COMMENT '邮箱',
`user_name` varchar(60) NOT NULL DEFAULT '' COMMENT '用户名',
`password` varchar(32) NOT NULL DEFAULT '' COMMENT '密码',
`password` varchar(50) NOT NULL DEFAULT '' COMMENT '密码',
`pay_password` varchar(50) NOT NULL DEFAULT '' COMMENT '支付密码',
`sex` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '性别1男2女',
`birthday` date NOT NULL DEFAULT '0000-00-00' COMMENT '生日',
`money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '用户余额',
@ -921,7 +925,7 @@ CREATE TABLE `fl_user` (
/*Data for the table `fl_user` */
insert into `fl_user`(`id`,`email`,`user_name`,`password`,`sex`,`birthday`,`money`,`frozen_money`,`point`,`rank_points`,`address_id`,`add_time`,`user_rank`,`parent_id`,`nickname`,`mobile`,`status`,`group_id`,`updated_at`,`signin_time`) values (1,'ecshop@ecshop.com','ecshop','6526fa13f6c5804fc8aaefa25395aba3',0,'1960-03-03','0.00','0.00',20,0,1,0,0,0,'','',0,NULL,NULL,'2017-08-11 00:24:20'),(2,'vip@ecshop.com','vip','232059cb5361a9336ccf1b8c2ba7657a',0,'1949-01-01','0.00','0.00',0,0,0,0,0,0,'','',0,NULL,NULL,NULL);
insert into `fl_user`(`id`,`email`,`user_name`,`password`,`pay_password`,`sex`,`birthday`,`money`,`frozen_money`,`point`,`rank_points`,`address_id`,`add_time`,`user_rank`,`parent_id`,`nickname`,`mobile`,`status`,`group_id`,`updated_at`,`signin_time`) values (1,'ecshop@ecshop.com','ecshop','6526fa13f6c5804fc8aaefa25395aba3','',0,'1960-03-03','0.00','0.00',20,0,1,0,0,0,'','',0,NULL,NULL,'2017-08-11 00:24:20'),(2,'vip@ecshop.com','vip','232059cb5361a9336ccf1b8c2ba7657a','',0,'1949-01-01','0.00','0.00',0,0,0,0,0,0,'','',0,NULL,NULL,NULL);
/*Table structure for table `fl_user_address` */

8
public/css/weixin/style.css

@ -780,9 +780,13 @@ margin:5px 0
border-radius:5px
}
h1.arc_tit, h2.arc_tit{font-weight: normal;font-size: 1.4em;padding: 10px;}
.arc_content .ainfo{font-size: 0.875em;color: #999;}
.arc_content{line-height: 26px;}
.arclist li{color:#333;border-bottom:1px solid #eee;overflow:hidden;margin-left:10px;margin-right:10px;padding-top:10px;padding-bottom:10px;line-height:24px;}
.arclist li a{color:#333;display:block;}.arclist li p{color:#999;font-size:14px;}.arclist li:last-child{border-bottom:0}
.arclist .gpic{width:80px;height:60px;float:left;margin-right:10px;display:block;}.arclist .gpic img{width:80px;height:60px;border:none;}

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

@ -2,7 +2,7 @@
<div class="foohi">
<div class="footer">
<ul>
<a href="index.html"><li class="on"><img src="<?php echo env('APP_URL'); ?>/images/weixin/home_icon2.png"><p>首页</p></li></a>
<a href="<?php echo route('weixin'); ?>"><li class="on"><img src="<?php echo env('APP_URL'); ?>/images/weixin/home_icon2.png"><p>首页</p></li></a>
<a href="categoryList.html"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/brand_icon.png"><p>分类</p></li></a>
<a href="cart.html"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/car_icon.png"><p>购物车</p></li></a>
<a href="my.html"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/center_icon.png"><p>个人中心</p></li></a></ul>

56
resources/views/weixin/index/category.blade.php

@ -1,31 +1,31 @@
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php if(empty($post["seotitle"])){echo $post["name"];}else{echo $post["seotitle"];} ?></title>
<link rel="stylesheet" href="/css/bootstrap.min.css"><link rel="stylesheet" href="/css/style.css"><script src="/js/jquery.min.js"></script><script src="/js/bootstrap.min.js"></script></head><body>
@include('home.common.header')
<div class="container">
<div class="row row-offcanvas row-offcanvas-right">
<div class="col-xs-12 col-sm-9">
<div class="bread"><a href="/"><?php echo sysconfig('CMS_INDEXNAME'); ?></a> > <?php echo get_cat_path($post["id"]); ?></div>
<h1 class="page-header"><?php echo $post["name"]; ?></h1>
<?php if(!empty($posts)){foreach($posts as $row){ ?><div class="list"><?php if(!empty($row['litpic'])){ ?><a class="limg" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><img alt="<?php echo $row['title']; ?>" src="<?php echo $row['litpic']; ?>"></a><?php } ?>
<strong class="tit"><a href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a></strong><p><?php echo mb_strcut($row['description'],0,150,'UTF-8'); ?>..</p>
<div class="info"><span class="fl"><?php $taglist=taglist($row['id']);if($taglist){foreach($taglist as $row){ ?><a href="<?php echo get_front_url(array("tagid"=>$row['id'],"type"=>'tags')); ?>"><?php echo $row['tag']; ?></a><?php }} ?><em><?php echo date("m-d H:i",$row['pubdate']); ?></em></span><span class="fr"><em><?php echo $row['click']; ?></em>人阅读</span></div><div class="cl"></div></div><?php }} ?><div id="lad2"><script>ljs2();</script></div>
<div class="pages"><ul><?php echo $pagenav; ?></ul><div class="cl"></div></div>
</div><!--/.col-xs-12.col-sm-9-->
<!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<title><?php echo $post['name']; ?> - 微商城</title><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
<link href="<?php echo env('APP_URL'); ?>/css/weixin/style.css" type="text/css" rel="stylesheet">
<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/weixin/mobile.js"></script>
<meta name="keywords" content="<?php echo $post['keywords']; ?>"><meta name="description" content="<?php echo $post['description']; ?>"></head><body>
<div class="classreturn loginsignup">
<div class="ds-in-bl return"><a href="javascript:history.back(-1);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/return.png" alt="返回"></a></div>
<div class="ds-in-bl tit center"><span><?php echo $post['name']; ?></span></div>
<div class="ds-in-bl nav_menu"><a href="javascript:void(0);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/class1.png" alt="菜单"></a></div>
</div>
<div class="flool tpnavf cl">
<div class="nav_list">
<ul>
<a href="<?php echo route('weixin'); ?>"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/home_icon.png"><p>首页</p></li></a>
<a href="/Weixin/index.php?m=Store&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/brand_icon.png"><p>分类</p></li></a>
<a href="/Weixin/index.php?m=Cart&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/car_icon.png"><p>购物车</p></li></a>
<a href="/Weixin/index.php?m=User&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/center_icon.png"><p>个人中心</p></li></a></ul>
<div class="cl"></div>
</div>
</div>
<div class="col-xs-12 col-sm-3 sidebar-offcanvas" id="sidebar">
<div class="panel panel-info">
<div class="panel-heading">热门推荐</div>
<div class="list-group"><?php $posts=arclist(array("row"=>5,"typeid"=>$post['id'],"orderby"=>'rand()'));if($posts){foreach($posts as $row){ ?>
<a class="list-group-item" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a><?php }} ?>
</div>
<div class="arc_list">
<ul class="arclist cl">
<?php if($article_list){foreach($article_list as $k=>$v){ ?>
<li><a href="<?php echo $v['article_detail_url']; ?>"><?php echo $v['title']; ?></a><p><?php echo $v['pubdate']; ?></p></li>
<?php }} ?>
</ul>
</div>
</div><!--/.sidebar-offcanvas--></div><!--/row-->
</div><!-- /.container -->
@include('home.common.footer')</body></html>
@include('weixin.common.footer')
</body></html>

61
resources/views/weixin/index/detail.blade.php

@ -1,24 +1,43 @@
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php echo $post["title"]; ?>_<?php echo sysconfig('CMS_WEBNAME'); ?></title>
<link rel="stylesheet" href="/css/bootstrap.min.css"><link rel="stylesheet" href="/css/style.css"><script src="/js/jquery.min.js"></script><script src="/js/bootstrap.min.js"></script></head><body>
@include('home.common.header')
<div class="container"><div class="row row-offcanvas row-offcanvas-right"><div class="col-xs-12 col-sm-9">
<div class="bread"><a href=""><?php echo sysconfig('CMS_INDEXNAME'); ?></a> > <?php echo get_cat_path($post["typeid"]); ?></div>
<h1 class="page-header"><?php echo $post["title"]; ?></h1>
<div class="content"><?php echo $post["body"]; ?>
<div class="dinfo"><span class="addtime"><?php echo date("Y-m-d",$post["pubdate"]); ?></span>
<br><br>下一篇:<?php if($pre){ ?><a href="<?php echo get_front_url(array("id"=>$pre['id'],"catid"=>$pre["typeid"],"type"=>'content')); ?>"><?php echo $pre["title"]; ?></a><?php }else{echo '没有了';} ?><div class="cl"></div></div>
<!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<title><?php echo $post['title']; ?> - 微商城</title><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
<link href="<?php echo env('APP_URL'); ?>/css/weixin/style.css" type="text/css" rel="stylesheet">
<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/weixin/mobile.js"></script>
<meta name="keywords" content="<?php echo $post['keywords']; ?>"><meta name="description" content="<?php echo $post['description']; ?>"></head><body>
<div class="classreturn loginsignup">
<div class="ds-in-bl return"><a href="javascript:history.back(-1);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/return.png" alt="返回"></a></div>
<div class="ds-in-bl tit center"><span>微商城</span></div>
<div class="ds-in-bl nav_menu"><a href="javascript:void(0);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/class1.png" alt="菜单"></a></div>
</div>
<div class="flool tpnavf cl">
<div class="nav_list">
<ul>
<a href="<?php echo route('weixin'); ?>"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/home_icon.png"><p>首页</p></li></a>
<a href="/Weixin/index.php?m=Store&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/brand_icon.png"><p>分类</p></li></a>
<a href="/Weixin/index.php?m=Cart&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/car_icon.png"><p>购物车</p></li></a>
<a href="/Weixin/index.php?m=User&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/center_icon.png"><p>个人中心</p></li></a></ul>
<div class="cl"></div>
</div>
</div>
</div><!--/.col-xs-12.col-sm-9-->
<div class="col-xs-12 col-sm-3 sidebar-offcanvas" id="sidebar">
<div class="panel panel-info">
<div class="panel-heading">热门推荐</div>
<h1 class="arc_tit"><?php echo $post['title']; ?></h1>
<div class="list-group"><?php $posts=arclist(array("row"=>5,"typeid"=>$post['typeid'],"expression"=>[['id', '<', $pre?$pre['id']:$post["id"]]]));if($posts){foreach($posts as $row){ ?>
<a class="list-group-item" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a><?php }} ?>
</div>
</div>
</div><!--/.sidebar-offcanvas--></div><!--/row--></div><!-- /.container -->
@include('home.common.footer')</body></html>
<div class="arc_content box">
<div class="ainfo"><?php echo $post['pubdate']; ?></div>
<div>
查询新股配号主要有以下三点:</div>
<div>
&nbsp;</div>
<div>
1.到证券营业部进行查询。</div>
<div>
&nbsp;</div>
<div>
2.在申购日后的第三天投资者可通过网上进行新股配号的查询。</div>
<div>
&nbsp;</div>
<div>
3.客户还可以通过交易所的咨询电话进行查询:0755-2288800(深市),021-16893006(沪市)投资者所查到的配号是投资者在一个帐户上申购新股所得配号的起始号,其余配号依次顺延.</div>
<div class="arcnext cl">: <a class="red" href="http://m.1104.org/cat60/id4051" rel="prev">网上申购新股如何操作</a></div></div>
@include('weixin.common.footer')
</body></html>

6
resources/views/weixin/index/index.blade.php

@ -1,12 +1,12 @@
<!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<title>微商城</title><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
<link href="<?php echo env('APP_URL'); ?>/css/weixin/style.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="<?php echo env('APP_WEIXIN_URL'); ?>/js/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/jquery.min.js"></script>
<meta name="keywords" content="关键词"><meta name="description" content="描述"></head><body>
<!--顶部搜索栏-start-->
<div id="search-placeholder" class="search">
<div class="search_box">
<a href="ajaxSearch.html">
<a href="<?php echo route('weixin_search'); ?>">
<span class="search_btn"><img src="<?php echo env('APP_URL'); ?>/images/weixin/search.png"></span>
<input type="text" name="keyword" value="" placeholder="搜索您想要的商品"></a>
</div>
@ -127,7 +127,7 @@ var swiper = new Swiper('.swiper-nav', {
<div class="home_toutiao_box">
<ul>
<marquee id="mar1" scrollamount="1" direction="up" height="30" style="height: 30px;">
<?php foreach($article_list as $k=>$v){ ?><li><a href="<?php echo $v['article_detail_url']; ?>"><?php echo $v['title']; ?></a></li><?php } ?>
<?php if($article_list){foreach($article_list as $k=>$v){ ?><li><a href="<?php echo $v['article_detail_url']; ?>"><?php echo $v['title']; ?></a></li><?php }} ?>
</marquee>
</ul>
</div>

75
resources/views/weixin/index/search.blade.php

@ -1,26 +1,55 @@
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>搜索结果_<?php echo sysconfig('CMS_WEBNAME'); ?></title>
<link rel="stylesheet" href="/css/bootstrap.min.css"><link rel="stylesheet" href="/css/style.css"><script src="/js/jquery.min.js"></script><script src="/js/bootstrap.min.js"></script></head><body>
<!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<title>商城</title><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
<link href="<?php echo env('APP_URL'); ?>/css/weixin/style.css" type="text/css" rel="stylesheet">
<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/weixin/mobile.js"></script><script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/layer-mobile.js"></script>
<meta name="keywords" content="关键词"><meta name="description" content="描述"></head><body>
<div class="classreturn loginsignup">
<div class="ds-in-bl return"><a href="javascript:history.back(-1);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/return.png" alt="返回"></a></div>
<div class="ds-in-bl tit center"><span>搜索</span></div>
<div class="ds-in-bl nav_menu"><a href="javascript:void(0);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/class1.png" alt="菜单"></a></div>
</div>
<div class="flool tpnavf cl">
<div class="nav_list">
<ul>
<a href="index.html"><li><img src="images/weixin/home_icon.png"><p>首页</p></li></a>
<a href="/Weixin/index.php?m=Store&amp;a=index"><li><img src="images/weixin/brand_icon.png"><p>分类</p></li></a>
<a href="/Weixin/index.php?m=Cart&amp;a=index"><li><img src="images/weixin/car_icon.png"><p>购物车</p></li></a>
<a href="/Weixin/index.php?m=User&amp;a=index"><li><img src="images/weixin/center_icon.png"><p>个人中心</p></li></a></ul>
<div class="cl"></div>
</div>
</div>
@include('home.common.header')
<div class="container">
<div class="row row-offcanvas row-offcanvas-right">
<div class="col-xs-12 col-sm-9">
<div class="bread"><a href="/"><?php echo sysconfig('CMS_INDEXNAME'); ?></a> > <?php echo '搜索结果'; ?></div>
<h1 class="page-header">搜索结果</h1>
<div class="cl search_pl">
<form method="get" action="<?php echo route('weixin_goods_list'); ?>" id="sourch_form">
<input type="text" name="keyword" id="keyword" value="" placeholder="搜索商品">
<a href="javascript:;" onclick="ajaxsecrch()"><img src="<?php echo env('APP_URL'); ?>/images/weixin/sea.png"></a>
</form>
<div class="cl"></div>
</div>
<script>
function ajaxsecrch(){
if($.trim($('#keyword').val()) != ''){
$("#sourch_form").submit();
}else{
layer.open({content:'请输入搜索关键字',time:2});
}
}
</script>
<?php if(!empty($posts)){foreach($posts as $row){ ?><div class="list"><?php if(!empty($row['litpic'])){ ?><a class="limg" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><img alt="<?php echo $row['title']; ?>" src="<?php echo $row['litpic']; ?>"></a><?php } ?>
<strong class="tit"><a href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a></strong><p><?php echo mb_strcut($row['description'],0,150,'UTF-8'); ?>..</p>
<div class="info"><span class="fl"><?php $taglist=taglist($row['id']);if($taglist){foreach($taglist as $row){ ?><a href="<?php echo get_front_url(array("tagid"=>$row['id'],"type"=>'tags')); ?>"><?php echo $row['tag']; ?></a><?php }} ?><em><?php echo date("m-d H:i",$row['pubdate']); ?></em></span><span class="fr"><em><?php echo $row['click']; ?></em>人阅读</span></div><div class="cl"></div></div><?php }} ?><div id="lad2"><script>ljs2();</script></div>
</div><!--/.col-xs-12.col-sm-9-->
<div class="hot_keyword_box">
<div class="tit_18 mt10 mb10">
<span>热门搜索</span>
</div>
<div class="hot_keyword">
<a href="/index.php/mobile/Goods/search/q/%E6%89%8B%E6%9C%BA.html" class="ht">手机</a>
<a href="/index.php/mobile/Goods/search/q/%E5%B0%8F%E7%B1%B3.html">小米</a>
<a href="/index.php/mobile/Goods/search/q/iphone.html">iphone</a>
<a href="/index.php/mobile/Goods/search/q/%E4%B8%89%E6%98%9F.html">三星</a>
<a href="/index.php/mobile/Goods/search/q/%E5%8D%8E%E4%B8%BA.html">华为</a>
<a href="/index.php/mobile/Goods/search/q/%E5%86%B0%E7%AE%B1.html">冰箱</a>
</div>
</div>
<div class="col-xs-12 col-sm-3 sidebar-offcanvas" id="sidebar"><div class="panel panel-info">
<div class="panel-heading">热门推荐</div>
<div class="list-group"><?php $posts=arclist(array("row"=>5,"orderby"=>'rand()'));if($posts){foreach($posts as $row){ ?>
<a class="list-group-item" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a><?php }} ?>
</div>
</div></div><!--/.sidebar-offcanvas--></div><!--/row-->
</div><!-- /.container -->
@include('home.common.footer')</body></html>
@include('weixin.common.footer')
</body></html>

70
routes/web.php

@ -1,5 +1,4 @@
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
@ -10,7 +9,6 @@
| contains the "web" middleware group. Now create something great!
|
*/
//wap路由,要放到最前面,否则解析不到
Route::group(['domain' => env('APP_SUBDOMAIN'), 'namespace' => 'Wap'], function () {
Route::get('/', 'IndexController@index')->name('wap_home');
@ -53,18 +51,19 @@ Route::group(['namespace' => 'Home'], function () {
});
});
//微信路由
Route::group(['prefix' => 'weixin', 'namespace' => 'Weixin'], function () {
Route::get('/', 'IndexController@index')->name('weixin');
Route::get('/page404', 'IndexController@page404')->name('weixin_page404'); //404页面
Route::get('/tags', 'IndexController@tags')->name('weixin_tags');
Route::get('/search/{id}', 'IndexController@search')->name('weixin_search'); //搜索页面
Route::get('/search', 'IndexController@search')->name('weixin_search'); //搜索页面
Route::get('/p/{id}', 'IndexController@detail')->name('weixin_article_detail'); //文章详情页
Route::get('/cat{cat}', 'IndexController@category')->name('weixin_article_category'); //分类页
Route::get('/tag{tag}', 'IndexController@tag')->name('weixin_tag'); //标签页
Route::get('/page/{id}', 'IndexController@page')->name('weixin_singlepage'); //单页
Route::get('/goods/{id}', 'IndexController@goods')->name('weixin_goods_detail'); //商品详情页
Route::get('/goodstype{cat}/{page}', 'IndexController@goodstype'); //产品分类页,分
Route::get('/goodslist', 'IndexController@goodslist')->name('weixin_goods_list'); //产品分类
Route::get('/goodstype{cat}', 'IndexController@goodstype')->name('weixin_goodstype'); //产品分类页
Route::get('/sitemap.xml', 'IndexController@sitemap')->name('weixin_sitemap');//sitemap
@ -211,6 +210,8 @@ Route::group(['prefix' => 'dataapi', 'namespace' => 'Api', 'middleware' => ['web
//文章
Route::get('/article_list', 'ArticleController@articleList');
Route::get('/article_detail', 'ArticleController@articleDetail');
Route::get('/arctype_list', 'ArctypeController@arctypeList');
Route::get('/arctype_detail', 'ArctypeController@arctypeDetail');
//商品
Route::get('/goods_list', 'GoodsController@goodsList'); //商品列表
Route::get('/goodstype_list', 'GoodsTypeController@goodsTypeList'); //商品分类列表
@ -280,67 +281,6 @@ Route::group(['prefix' => 'dataapi', 'namespace' => 'Api', 'middleware' => ['web
Route::get('/region_detail', 'RegionController@regionDetail');
});
//中间件
Route::group(['middleware' => 'auth'], function () {
Route::get('/qwe', function () {
// 使用 Auth 中间件
});
Route::get('user/profile', function () {
// 使用 Auth 中间件
});
});
//https://github.com/cong5/myPersimmon
//前台
/* Route::group(['namespace' => 'App'], function () {
Route::get('/', 'HomeController@index')->name('home');
Route::get('/post/{flag}', 'HomeController@posts')->name('post');
Route::get('/tags/{flag}', 'HomeController@tags')->name('tags');
Route::get('/category/{flag}', 'HomeController@category')->name('category');
Route::get('/feed', 'HomeController@feed');
Route::get('/sitemap.xml', 'HomeController@siteMap');
Route::get('/xmlrpc', 'XmlRpcController@errorMessage');
Route::post('/xmlrpc', 'XmlRpcController@index')->name('xmlrpc');
Route::get('/friends', 'HomeController@friends')->name('friends');
Route::resource('/comment', 'CommentController');
Route::get('/debug', 'HomeController@debug')->name('debug');
});
//后台
Route::group(['prefix' => 'myp', 'namespace' => 'Backend'], function () {
Route::get('/', 'DashboardController@dashboard')->name('admin');
Route::post('/auth/check', 'AuthController@check')->name('admin.login_check');
Route::post('/auth/logout', 'AuthController@logout')->name('admin.logout');
Route::post('/auth/login', 'AuthController@authenticate')->name('admin.login');
});
Route::group(['prefix' => 'myp', 'middleware' => 'auth', 'namespace' => 'Backend'], function () {
Route::get('/dashboard/meta', 'DashboardController@meta');
Route::get('/dashboard/shanbay', 'DashboardController@shanbay');
Route::resource('/categorys', 'CategorysController');
Route::resource('/posts', 'PostsController');
Route::resource('/tags', 'TagsController');
Route::resource('/links', 'LinksController');
Route::resource('/options', 'OptionsController');
Route::resource('/settings', 'SettingsController');
Route::resource('/navigations', 'NavigationController');
Route::resource('/uploads', 'FileController');
Route::resource('/util', 'UtilController');
Route::resource('/user', 'UserController');
Route::resource('/comments', 'CommentController');
Route::resource('/trash', 'TrashController');
}); */

Loading…
Cancel
Save