发
This commit is contained in:
parent
d4407825e9
commit
aa1ef98134
@ -11,55 +11,63 @@ if(!empty($_SERVER['REQUEST_URI'])&& (preg_match("@\/d\/@", strtolower($_SERVER[
|
|||||||
"params"=>3
|
"params"=>3
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
// $router->add(
|
$router->add(
|
||||||
// "/smsoauth2_qa/api/oauth2/code",
|
"/smsoauth2_qa/api/oauth2/code",
|
||||||
// array(
|
array(
|
||||||
// "controller" => 'oauth2' ,
|
"controller" => 'oauth2' ,
|
||||||
// "action" => 'code',
|
"action" => 'code',
|
||||||
// )
|
)
|
||||||
// );
|
);
|
||||||
|
|
||||||
// $router->add(
|
$router->add(
|
||||||
// "/smsoauth2_qa/api/oauth2/accesstoken",
|
"/smsoauth2_qa/api/oauth2/accesstoken",
|
||||||
// array(
|
array(
|
||||||
// "controller" => 'oauth2' ,
|
"controller" => 'oauth2' ,
|
||||||
// "action" => 'accesstoken',
|
"action" => 'accesstoken',
|
||||||
// )
|
)
|
||||||
// );
|
);
|
||||||
|
|
||||||
// $router->add(
|
$router->add(
|
||||||
// "/smsoauth2_qa/api/sms/send",
|
"/smsoauth2_qa/api/sms/send",
|
||||||
// array(
|
array(
|
||||||
// "controller" => 'sms' ,
|
"controller" => 'sms' ,
|
||||||
// "action" => 'send',
|
"action" => 'send',
|
||||||
// )
|
)
|
||||||
// );
|
);
|
||||||
|
|
||||||
// $router->add(
|
$router->add(
|
||||||
// "/smsoauth2_qa/api/sms/authcode",
|
"/smsoauth2_qa/api/sms/authcode",
|
||||||
// array(
|
array(
|
||||||
// "controller" => 'sms' ,
|
"controller" => 'sms' ,
|
||||||
// "action" => 'authcode',
|
"action" => 'authcode',
|
||||||
// )
|
)
|
||||||
// );
|
);
|
||||||
|
|
||||||
// $router->add(
|
$router->add(
|
||||||
// "/smsoauth2_qa/api/sms/query_reports",
|
"/smsoauth2_qa/api/sms/query_reports",
|
||||||
// array(
|
array(
|
||||||
// "controller" => 'sms' ,
|
"controller" => 'sms' ,
|
||||||
// "action" => 'query_reports',
|
"action" => 'query_reports',
|
||||||
// )
|
)
|
||||||
// );
|
);
|
||||||
|
|
||||||
// $router->add(
|
$router->add(
|
||||||
// "/smsoauth2_qa/api/urls/shorturl",
|
"/smsoauth2_qa/api/urls/shorturl",
|
||||||
// array(
|
array(
|
||||||
// "controller" => 'urls' ,
|
"controller" => 'urls' ,
|
||||||
// "action" => 'shorturl',
|
"action" => 'shorturl',
|
||||||
// )
|
)
|
||||||
// );
|
);
|
||||||
}
|
}else if($_SERVER['HTTP_HOST'] == '127.0.0.1'){
|
||||||
else{
|
$router->add(
|
||||||
|
"/tiffany/api/:controller/:action/:params",
|
||||||
|
array(
|
||||||
|
"controller"=>1,
|
||||||
|
"action"=>2,
|
||||||
|
"params"=>3
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}else{
|
||||||
$router->add(
|
$router->add(
|
||||||
"/tiffany/api/:controller/:action/:params",
|
"/tiffany/api/:controller/:action/:params",
|
||||||
array(
|
array(
|
||||||
@ -68,7 +76,6 @@ else{
|
|||||||
"params"=>3
|
"params"=>3
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
echo 2222222;die;
|
|
||||||
$router->add(
|
$router->add(
|
||||||
"/smsoauth2/api/oauth2/code",
|
"/smsoauth2/api/oauth2/code",
|
||||||
array(
|
array(
|
||||||
@ -76,46 +83,45 @@ else{
|
|||||||
"action" => 'code',
|
"action" => 'code',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
$router->add(
|
||||||
|
"/smsoauth2/api/oauth2/accesstoken",
|
||||||
|
array(
|
||||||
|
"controller" => 'oauth2' ,
|
||||||
|
"action" => 'accesstoken',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$router->add(
|
$router->add(
|
||||||
"/smsoauth2/api/oauth2/accesstoken",
|
"/smsoauth2/api/sms/send",
|
||||||
array(
|
array(
|
||||||
"controller" => 'oauth2' ,
|
"controller" => 'sms' ,
|
||||||
"action" => 'accesstoken',
|
"action" => 'send',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$router->add(
|
$router->add(
|
||||||
"/smsoauth2/api/sms/send",
|
"/smsoauth2/api/sms/authcode",
|
||||||
array(
|
array(
|
||||||
"controller" => 'sms' ,
|
"controller" => 'sms' ,
|
||||||
"action" => 'send',
|
"action" => 'authcode',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$router->add(
|
$router->add(
|
||||||
"/smsoauth2/api/sms/authcode",
|
"/smsoauth2/api/sms/query_reports",
|
||||||
array(
|
array(
|
||||||
"controller" => 'sms' ,
|
"controller" => 'sms' ,
|
||||||
"action" => 'authcode',
|
"action" => 'query_reports',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$router->add(
|
$router->add(
|
||||||
"/smsoauth2/api/sms/query_reports",
|
"/smsoauth2/api/urls/shorturl",
|
||||||
array(
|
array(
|
||||||
"controller" => 'sms' ,
|
"controller" => 'urls' ,
|
||||||
"action" => 'query_reports',
|
"action" => 'shorturl',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$router->add(
|
|
||||||
"/smsoauth2/api/urls/shorturl",
|
|
||||||
array(
|
|
||||||
"controller" => 'urls' ,
|
|
||||||
"action" => 'shorturl',
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$router->handle(
|
$router->handle(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user