Uninote
Uninote
用户根目录
每日点滴
 mynote tnds
mynote tnds
lv1=mynote lv2= type=
class AppAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public function registerAssetFiles( $view )
    {    
        $release = '1';
        $this->css = [
            "/link/public/css/bootstrap.min.css?v={$release}",
            "/link/public/css/style.css?v={$release}",
        ];
        $this->js = [
            "/link/public/js/jquery.min.js?v={$release}",
            "/link/public/js/html5shiv.js?v={$release}",
            "/link/public/js/respond.min.js?v={$release}",
            "/link/public/js/layer/layer.js?v={$release}",
            "/link/public/js/common.js?v={$release}",
            "/link/public/js/fun.js?v={$release}",
            "/link/public/js/bootstrap.min.js?v={$release}",
        ];
        parent::registerAssetFiles( $view );
    }
}
        // 设置接口输出数据
        Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
E:\uninote\mynote\basic\views\author\index.php
<?php $this->beginBlock('js'); ?>
<script type="text/
    var api_url = '<?= \Yiijavascript">
    var json = <?= $json; ?>;::$app->api->api_url; ?>';
</script>
<script type="text/javascript" src="/link/author/js/do.js"></script>
<?php $this->endBlock(); ?>
lv1=mynote lv2= type=
参数获取:
$this->req->get('id',FALSE);
发送请求、处理返回值:
// user_name 用户名称
$user_info = $this->_req_api("/user/getuserinfo",['username'=>$username]);
$user_arr = $user_info['data'];
if ($user_arr['nick']) {
    $user_name = $user_arr['nick'];
} else {
    $user_arr['email'] ? $user_name = $user_arr['email'] : $user_name = $user_arr['mobile']; 
}   
lv1=mynote lv2= type=jy
E:\uninote\mynote\basic\web\docs\users.txt 需要unix格式,no BOM
api test需要绝对链接!!参数不要带空白!!
/api/markdown/release 
要用www用户操作docs目录!!

mynote_tests

mynote_todo

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