From eab94954623a1efd16ed9a56cf75807e737ed45e Mon Sep 17 00:00:00 2001 From: wangmingqing Date: Tue, 30 May 2023 14:15:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/config/router.php | 4 ++-- app/controllers/Oauth2Controller.php | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/config/router.php b/app/config/router.php index 989063f..dd35c15 100644 --- a/app/config/router.php +++ b/app/config/router.php @@ -22,7 +22,7 @@ if(!empty($_SERVER['HTTP_HOST']) && (preg_match("@weapp\.wemediacn@", strtolower "params"=>3 ) ); - + echo 1231232131231;die; $router->add( "/smsoauth2_qa/api/oauth2/code", array( @@ -82,7 +82,7 @@ else{ "params"=>3 ) ); - + echo 2222222;die; $router->add( "/smsoauth2/api/oauth2/code", array( diff --git a/app/controllers/Oauth2Controller.php b/app/controllers/Oauth2Controller.php index e094a70..386ada5 100644 --- a/app/controllers/Oauth2Controller.php +++ b/app/controllers/Oauth2Controller.php @@ -10,13 +10,16 @@ class Oauth2Controller extends ControllerBase{ function initialize(){ parent::initialize(); } - + // http://127.0.0.1/tiffany/api/oauth2/wmqtest // http://weapp.wemediacn.net/d/tiffany/api/oauth2/wmqtest function wmqtestAction(){ - if($_SERVER['HTTP_HOST']!="127.0.0.1"){ - $this->_LogObj->LogWrite(TIFFANY_API_CHECK_LOG, '123213123'); - } - echo time();die; + $url = "http://wxapp.wemediacn.com/smsoauth2_qa/api/oauth2/code"; + // echo $url;die; + $post_arr = array(); + $post_arr['appid'] = "123213213213123213213"; + $post_json = json_encode($post_arr); + $result = $this->__http_post_request($url, $post_json, true); + print_r($result); die; } /**