123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- <?php
- use Cas\Dao\LotteryEvents;
- /**
- * !!!!!
- * !! 限制:
- * !! 1、不要出现()号的嵌套,不支持!
- * !! 2、括号外不要出现正则相关字符,如 ? ^等
- * !!!!!
- * 路由配置
- */
- function getEventsC(){
- $eventRoute = LotteryEvents::getEventRoute();
- preg_match('/([a-zA-Z]+)\/([0-9]+)([a-zA-Z]+)/iU',$_SERVER['PHP_SELF'],$eventArr);
- return $eventRoute[$eventArr['3']];
- }
- return array(
- 'test' => array(
- 'c' => 'Test',
- ),
- 'admin' => array(
- 'c' => 'Admin_Index',
- 'a' => $_GET['a'],
- ),
-
- 'services/([a-zA-Z]+)/?' => array(
- 'c' => 'services',
- 'a' => '$1',
- ),
- '([a-zA-Z]+)/([0-9]+)([a-zA-Z])/share?' => array(
- 'c' => getEventsC(),
- 'url' =>'$1',
- 'create_time' =>'$2',
- 'type' => 'share',
- ),
- '([a-zA-Z]+)/([0-9]+)([a-zA-Z])/share/([0-9]+)?' => array(
- 'c' => getEventsC(),
- 'url' =>'$1',
- 'create_time' =>'$2',
- 'type' => 'share',
- 'source_user' => '$3',
- ),
- '([a-zA-Z]+)/([0-9]+)([a-zA-Z])/prize?' => array(
- 'c' => getEventsC(),
- 'url' =>'$1',
- 'create_time' =>'$2',
- 'type' => 'prize',
- ),
- '([a-zA-Z]+)/([0-9]+)([a-zA-Z])/feedback?' => array(
- 'c' => getEventsC(),
- 'url' =>'$1',
- 'create_time' =>'$2',
- 'type' => 'feedback',
- ),
- '([a-zA-Z]+)/([0-9]+)([a-zA-Z])/help?' => array(
- 'c' => getEventsC(),
- 'url' =>'$1',
- 'create_time' =>'$2',
- 'type' => 'help',
- ),
- '([a-zA-Z]+)/([0-9]+)([a-zA-Z])?' => array(
- 'c' => getEventsC(),
- 'url' =>'$1',
- 'create_time' =>'$2',
- ),
- '([a-zA-Z]+)/([a-zA-Z]+)/([0-9]+)?' => array(
- 'c' => '$2',
- 'url' =>'$1',
- 'create_time' =>'$3',
- ),
- 'connect(?:/([a-z]+))?/?' => array(
- 'c' => 'connect',
- 'a' => '$1',
- ),
- 'article/v([a-z]+)g/?' => array(
- 'c' => 'article',
- 'friendlyUrl' => '$1',
- ),
- 'list/([a-zA-Z]+)/member/([a-zA-Z]+)/?' => array(
- 'c' => 'member',
- 'url' =>'$1',
- 'a' => '$2',
- ),
- 'tryDetail/([0-9]+)/?' => array(
- 'c' => 'tryDetail',
- 'tryid' => '$1',
- ),
- 'redirect/?' => array(
- 'c' => 'redirect',
- ),
- 'API_SetUser_([a-zA-Z]+)' => array(
- 'c' => 'API_SetUser',
- 'a' =>'$1',
- ),
-
- 'list/([a-zA-Z]+)/?' => array(
- 'c' => 'Index',
- 'url' =>'$1',
- ),
- # 新增分类列表页
- 'cate/([0-9]+)/([a-zA-Z]+)/?' => array(
- 'c' => 'Cate',
- 'cate' =>'$1',
- 'url' =>'$2',
- ),
- 'SetUser/?' => array(
- 'c' => 'API_SetUser',
- 'a' =>'page',
- ),
-
- );
|