From 6a4f9c038ff37d74188cbe8f8983ee25229d74b8 Mon Sep 17 00:00:00 2001 From: "ZLW-PC\\Administrator" <374861669@qq.com> Date: Tue, 26 Sep 2017 20:11:35 +0800 Subject: [PATCH] article_category_detail --- .../Controllers/Api/ArctypeController.php | 57 ++++++++ .../Controllers/Api/ArticleController.php | 12 +- .../Controllers/Weixin/IndexController.php | 124 ++++++------------ app/Http/Model/Arctype.php | 94 +++++++++++++ app/Http/Model/Article.php | 14 +- lqycms.sql | 44 ++++--- public/css/weixin/style.css | 8 +- .../views/weixin/common/footer.blade.php | 2 +- .../views/weixin/index/category.blade.php | 56 ++++---- resources/views/weixin/index/detail.blade.php | 61 ++++++--- resources/views/weixin/index/index.blade.php | 6 +- resources/views/weixin/index/search.blade.php | 75 +++++++---- routes/web.php | 70 +--------- 13 files changed, 362 insertions(+), 261 deletions(-) create mode 100644 app/Http/Controllers/Api/ArctypeController.php diff --git a/app/Http/Controllers/Api/ArctypeController.php b/app/Http/Controllers/Api/ArctypeController.php new file mode 100644 index 0000000..49d6ec3 --- /dev/null +++ b/app/Http/Controllers/Api/ArctypeController.php @@ -0,0 +1,57 @@ +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); + } +} \ No newline at end of file diff --git a/app/Http/Controllers/Api/ArticleController.php b/app/Http/Controllers/Api/ArticleController.php index aec6265..89b5224 100644 --- a/app/Http/Controllers/Api/ArticleController.php +++ b/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); } } \ No newline at end of file diff --git a/app/Http/Controllers/Weixin/IndexController.php b/app/Http/Controllers/Weixin/IndexController.php index e1a946a..8a68c33 100644 --- a/app/Http/Controllers/Weixin/IndexController.php +++ b/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!'); diff --git a/app/Http/Model/Arctype.php b/app/Http/Model/Arctype.php index 3ae0c9b..ca3b549 100644 --- a/app/Http/Model/Arctype.php +++ b/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; + } } diff --git a/app/Http/Model/Article.php b/app/Http/Model/Article.php index ba2dcc7..c7bd212 100644 --- a/app/Http/Model/Article.php +++ b/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; diff --git a/lqycms.sql b/lqycms.sql index 8048e05..605a3d8 100644 --- a/lqycms.sql +++ b/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,'新闻中心','','新闻中心','新闻中心','

新闻中心

','news','category','detail','','新闻中心',0,50),(2,0,1476063429,'案例中心','','案例中心','案例中心','

案例中心

','case','category','detail','','案例中心',0,50),(3,1,1476063419,'行业新闻','','行业新闻','行业新闻','

行业新闻

','hangye','category','detail','','行业新闻',0,50),(4,1,1476068069,'企业新闻','','企业新闻','企业新闻','

企业新闻

','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,'新闻中心','','新闻中心','新闻中心','

新闻中心

','news','category','detail','','新闻中心',0,50,0),(2,0,1476063429,'案例中心','','案例中心','案例中心','

案例中心

','case','category','detail','','案例中心',0,50,0),(3,1,1476063419,'行业新闻','','行业新闻','行业新闻','

行业新闻

','hangye','category','detail','','行业新闻',0,50,0),(4,1,1476068069,'企业新闻','','企业新闻','企业新闻','

企业新闻

','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,'书籍','','','','

书籍

','book','productcat','product','','',1,50),(2,0,1496576993,'数码','','','',NULL,'shuma','productcat','product','','',1,50),(3,0,1500994389,'qq','qq','qq','','

qq

','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,'书籍','','','','

书籍

','book','goodscat','goods','','',1,50,''),(2,0,1496576993,'数码','','','',NULL,'shuma','goodscat','goods','','',1,50,''),(3,0,1500994389,'qq','qq','qq','','

qq

','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 © 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 © 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` */ diff --git a/public/css/weixin/style.css b/public/css/weixin/style.css index 74050c9..1f064f1 100644 --- a/public/css/weixin/style.css +++ b/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;} diff --git a/resources/views/weixin/common/footer.blade.php b/resources/views/weixin/common/footer.blade.php index 7805639..e4045ec 100644 --- a/resources/views/weixin/common/footer.blade.php +++ b/resources/views/weixin/common/footer.blade.php @@ -2,7 +2,7 @@