Commit 5a4a9367 by 叶明星

zc

parent 30aad146
...@@ -8,7 +8,8 @@ return array( ...@@ -8,7 +8,8 @@ return array(
'www' => 'Index', 'www' => 'Index',
'home' => 'Home', 'home' => 'Home',
'search'=> 'Search', 'search'=> 'Search',
'item' => 'Item' 'item' => 'Item',
'passport' => 'Passport'
), ),
'API_TOKEN' => 'zbPx8gDXDfIh3ZoJcO4EH', // api接口token 'API_TOKEN' => 'zbPx8gDXDfIh3ZoJcO4EH', // api接口token
......
...@@ -15,7 +15,12 @@ class BaseController extends Controller ...@@ -15,7 +15,12 @@ class BaseController extends Controller
} }
} }
/** public function __call($method, $args)
{
$this->redirect('/login');
}
/**
* 通过bcat_id获取CMS分类数据 --- 图片、文字等 * 通过bcat_id获取CMS分类数据 --- 图片、文字等
* @param [type] $tags [标签] * @param [type] $tags [标签]
* @param [type] $where [搜索条件,用&连接,如:a=1&b=2] * @param [type] $where [搜索条件,用&连接,如:a=1&b=2]
......
...@@ -11,7 +11,7 @@ class IndexController extends BaseController ...@@ -11,7 +11,7 @@ class IndexController extends BaseController
{ {
parent::_initialize(); parent::_initialize();
if (!cookie('token')) { if (!cookie('token')) {
$this->redirect('/login'); redirect(C('TMPL_PARSE_STRING.passporticsales'));
} }
} }
......
<?php <?php
return array( return array(
'URL_MAP_RULES' => array(//静态路由 'URL_MAP_RULES' => array(//静态路由
'login' => 'Home/Index/login', 'index' => 'Index/index',
'register' => 'Home/Index/register', 'login' => 'Index/login',
'forget' => 'Home/Index/forget', 'register' => 'Index/register',
'forget' => 'Index/forget',
) )
); );
...@@ -9,6 +9,14 @@ class IndexController extends BaseController ...@@ -9,6 +9,14 @@ class IndexController extends BaseController
/** /**
* 登录页面 * 登录页面
*/ */
public function index()
{
$this->display('Login/index');
}
/**
* 登录页面
*/
public function login() public function login()
{ {
$this->display('Login/index'); $this->display('Login/index');
......
<?php <?php
return array( return array(
'URL_ROUTE_RULES' => array(//动态路由 'URL_ROUTE_RULES' => array(//动态路由
'/^(\w+)_(\d+)_(\d+)$/' => 'Index/indexsearch?key=:1&type=:2&time=:3', '/^(\w+)_(\d+)_(\d+)$/' => 'Index/index?key=:1&type=:2&time=:3',
) )
); );
...@@ -9,7 +9,7 @@ class IndexController extends BaseController ...@@ -9,7 +9,7 @@ class IndexController extends BaseController
/** /**
* 首页搜索结果 * 首页搜索结果
*/ */
public function indexsearch() public function index()
{ {
$this->display('Index/search'); $this->display('Index/search');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment