Browse Source

weixin page

master
ZLW-PC\Administrator 7 years ago
parent
commit
8a388ccb5a
  1. 6
      README.md
  2. 2
      app/Http/Controllers/Weixin/IndexController.php
  3. 43
      resources/views/weixin/index/page.blade.php
  4. 2
      resources/views/weixin/user/register.blade.php
  5. 4
      routes/web.php

6
README.md

@ -29,11 +29,11 @@ WAP端
注意:PC端跟微商城的域名是同一个域名,WAP端的域名通常是PC端的子域名,这里的案例PC端的域名是www.lqycms.com,WAP端的域名是m.lqycms.com
PC入口:http://+PC域名+/
<strong>PC入口</strong>:http://+PC域名+/
WAP入口:http://+WAP域名+/,WAP域名解析与PC域名一致,都是指向同一目录下
<strong>WAP入口</strong>:http://+WAP域名+/,WAP域名解析与PC域名一致,都是指向同一目录下
微商城入口:http://+PC域名+/weixin,支付仅支持微信支付。
<strong>微商城入口</strong>:http://+PC域名+/weixin,支付仅支持微信支付。
6、后台功能

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

@ -159,6 +159,8 @@ class IndexController extends CommonController
if($post)
{
$post['body'] = preg_replace('/src=\"\/uploads\/allimg/',"src=\"".env('APP_URL')."/uploads/allimg",$post['body']);
$post['pubdate'] = date('Y-m-d',$post['pubdate']);
$data['post'] = $post;
}
else

43
resources/views/weixin/index/page.blade.php

@ -1,30 +1,19 @@
<!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["title"];}else{echo $post["seotitle"];} ?>_<?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="/">首页</a> > <?php echo $post["title"]; ?></div>
<h1 class="page-header"><?php echo $post["title"]; ?></h1>
<div class="content"><?php echo $post["body"]; ?></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>
<div class="list-group"><?php if($posts){foreach($posts as $row){ ?>
<a class="list-group-item" href="<?php echo get_front_url(array("pagename"=>$row['filename'],"type"=>'page')); ?>"><?php echo $row['title']; ?></a><?php }} ?>
<!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>
</div><!--/.sidebar-offcanvas-->
</div><!--/row-->
@include('weixin.common.headerNav')
<h1 class="arc_tit"><?php echo $post['title']; ?></h1>
</div><!-- /.container -->
@include('home.common.footer')</body></html>
<div class="arc_content box"><?php echo $post['body']; ?></div>
<br>
@include('weixin.common.footer')
</body></html>

2
resources/views/weixin/user/register.blade.php

@ -48,7 +48,7 @@
<a style="margin:10px;background-color:#1aad19;text-align:center;color:white;border:1px solid #179e16;" class="bottoma" href="javascript:submit();">提交</a>
</div>
<div class="box reg">
<a style="float:left;" href="<?php echo route('weixin_login'); ?>">已有账号</a> <span style="float:right;"><a href="<?php echo route('weixin_login'); ?>">注册协议</a></span>
<a style="float:left;" href="<?php echo route('weixin_login'); ?>">已有账号</a> <span style="float:right;"><a href="<?php echo route('weixin_singlepage',array('id'=>'agreement')); ?>">注册协议</a></span>
</div><br><br>
<script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/md5.min.js"></script>

4
routes/web.php

@ -58,7 +58,7 @@ Route::group(['prefix' => 'weixin', 'namespace' => 'Weixin'], function () {
Route::get('/category', 'IndexController@category')->name('weixin_category');
Route::get('/category_goods_list', 'GoodsController@categoryGoodsList')->name('weixin_category_goods_list'); //产品分类页
Route::get('/page404', 'IndexController@page404')->name('weixin_page404'); //404页面
Route::get('/search', 'IndexController@search')->name('weixin_search'); //搜索页面
Route::get('/search', 'IndexController@search')->name('weixin_search'); //搜索页面
Route::get('/p/{id}', 'ArticleController@detail')->name('weixin_article_detail'); //文章详情页
Route::get('/cat{cat}', 'ArticleController@category')->name('weixin_article_category'); //分类页
Route::get('/tag{tag}', 'IndexController@tag')->name('weixin_tag'); //标签页
@ -68,7 +68,7 @@ Route::group(['prefix' => 'weixin', 'namespace' => 'Weixin'], function () {
Route::get('/bonus_list', 'BonusController@bonusList')->name('weixin_bonus_list');
Route::any('/wxpay_notify', 'WxPayController@wxpayNotify')->name('weixin_wxpay_notify'); //微信回调
Route::any('/wxoauth', 'UserController@oauth')->name('weixin_wxoauth'); //微信网页授权
Route::any('/wxoauth', 'UserController@oauth')->name('weixin_wxoauth'); //微信网页授权
Route::any('/login', 'UserController@login')->name('weixin_login');
Route::any('/register', 'UserController@register')->name('weixin_register');
Route::get('/logout', 'UserController@logout')->name('weixin_user_logout'); //退出

Loading…
Cancel
Save