api/App/Controllers/Blog.php

62 lines
1.5 KiB
PHP

<?php
/*
* @Author: your name
* @Date: 2019-08-24 12:51:58
* @LastEditTime: 2022-03-16 19:49:20
* @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \api\App\Controllers\Blog.php
*/
namespace App\Controllers;
use App\Models;
use Core\Controller;
use Core\View;
use Parsedown;
use App\Config;
class Blog extends Controller
{
function indexAction(){
Header("HTTP/1.1 303 See Other");
Header("Location:".Config::ServerUrl()."NewUi"."/".$this->route_params["action"]);
}
function articleAction() {
var_dump($this->route_params);
}
function donateAction(){
View::renderTemplate("/blog/basic.html",
[
"url"=>\App\Config::Url(),
'route'=>"donate",
"url"=>\App\Config::Url()
]);
}
function dataAction(){
View::renderTemplate("/blog/basic.html",
[
"url"=>\App\Config::Url(),
'route'=>"data",
]);
}
function guideAction(){
View::renderTemplate("/blog/basic.html",
[
"url"=>\App\Config::Url(),
'route'=>"guide",
]);
}
function jsAction(){
}
function projectAction(){
View::renderTemplate("/blog/basic.html",
[
"url"=>\App\Config::Url(),
'route'=>"project",
]);
}
}