Commit 5a4a9367 by 叶明星

zc

parent 30aad146
......@@ -8,7 +8,8 @@ return array(
'www' => 'Index',
'home' => 'Home',
'search'=> 'Search',
'item' => 'Item'
'item' => 'Item',
'passport' => 'Passport'
),
'API_TOKEN' => 'zbPx8gDXDfIh3ZoJcO4EH', // api接口token
......
......@@ -15,7 +15,12 @@ class BaseController extends Controller
}
}
/**
public function __call($method, $args)
{
$this->redirect('/login');
}
/**
* 通过bcat_id获取CMS分类数据 --- 图片、文字等
* @param [type] $tags [标签]
* @param [type] $where [搜索条件,用&连接,如:a=1&b=2]
......
......@@ -11,7 +11,7 @@ class IndexController extends BaseController
{
parent::_initialize();
if (!cookie('token')) {
$this->redirect('/login');
redirect(C('TMPL_PARSE_STRING.passporticsales'));
}
}
......
<?php
return array(
'URL_MAP_RULES' => array(//静态路由
'login' => 'Home/Index/login',
'register' => 'Home/Index/register',
'forget' => 'Home/Index/forget',
'index' => 'Index/index',
'login' => 'Index/login',
'register' => 'Index/register',
'forget' => 'Index/forget',
)
);
......@@ -9,6 +9,14 @@ class IndexController extends BaseController
/**
* 登录页面
*/
public function index()
{
$this->display('Login/index');
}
/**
* 登录页面
*/
public function login()
{
$this->display('Login/index');
......
<?php
return 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
/**
* 首页搜索结果
*/
public function indexsearch()
public function index()
{
$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