Uninote
Uninote
用户根目录
每日点滴
 mynote_code
mynote_code
logger.php:
public function log($message, $level, $category = 'application')
E:\uninote\mynote\basic\runtime\logs\app.log
E:\uninote\mynote\basic\config\api.php
Yii::$app->api->git_docs_host;
        return [
            'class' => 'yii',
            'api_url' => 'http://www.mynote.com/api',
            'git_docs_host' => '121.40.183.99',
        ];
namespace app\models;
class Curl
use app\models\Curl;
$this->curl_model = new Curl();
---
/*
* 关于本项目全部api配置
* api_url 主要的接口地址
*/
use Yii;
public $api_url = NULL;// 请求地址 
public function init()
{
    $this->layout = FALSE;//  取消模板配置
    $this->req = \Yii::$app->request;
    $this->api_url = \Yii::$app->api->api_url;
$bool = $this->curl_model->http_post($this->api_url."/article/showlist",['username'=>$username]);
---
_file_list_arr
\Yii::$app->api->api_url
\Yii::$app->params->adminEmail
---
http://localhost:222/common/base/do
->
---
            var aid = cur_aid;
            $.ajax({
                type: "POST",
                // url: api_url + '/article/like',
                url: '/common/base/do',
                dataType: "json",
                data: {
                    "_csrf": _csrf,
                    "type": '/article/like',
                    "json": {
                        "aid": aid
                    }
                },
参数为:
对应:
---
lv1= lv2= type=

base logic CommonLogic::proxy_logic

\app\logic\BaseLogic
public function __call($name, $arguments)
{
    if (isset(\Yii::$app->api->api_proxy_url)) {
        return \app\logic\CommonLogic::proxy_logic(__CLASS__, __METHOD__, func_get_args());
    }
    return call_user_func_array([$this, $name], $arguments);
}

mynote_back

mynote_crawl

点赞(0) 阅读(166) 举报
目录
标题