Skip to content

Commit 89f79bf

Browse files
committed
update 260325
1 parent 6c7daf8 commit 89f79bf

5 files changed

Lines changed: 35 additions & 29 deletions

File tree

.ut.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ TEMPFRONT=0
1010
TEMPADMIN=0
1111
DEFAULT_MOD=ut-frame
1212
DEFAULT_PAGE=index
13-
MANAGE=/admin
13+
MANAGE=/dev
1414
DEVELOP=1
1515
LOCKSCREEN=0
1616
UTFURL=http://frame.usualtool.com/auth.php

app/modules/ut-frame/controller/Index.php

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* --------------------------------------------------------
3+
* | █ █ ▀▀█▀▀ |
4+
* | █▄▄▄█ █ |
5+
* | |
6+
* | Author: Huang Hui |
7+
* | Repository 1: https://gitee.com/usualtool |
8+
* | Repository 2: https://github.com/usualtool |
9+
* | Applicable to Apache 2.0 protocol. |
10+
* --------------------------------------------------------
11+
*/
Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
<?php
2+
namespace Controller\Ut_frame;
23
use library\UsualToolInc\UTInc;
3-
$setup=UTInc::InstallDev() ? 1 : 0;
4-
$app->Runin(array("setup","title"),array($setup,"Hello UsualTool Framework"));
5-
$app->Open("index.cms");
4+
use Model\Ut_frame\Index as UtIndex;
5+
class Index{
6+
private $app;
7+
public function __construct() {
8+
global $app;
9+
$this->app = $app;
10+
}
11+
/**
12+
* 默认动作 (对应index或空action)
13+
*/
14+
public function index(){
15+
// 1. 实例化模型
16+
$model = new UtIndex();
17+
// 2. 获取数据
18+
$data = $model->getStatus();
19+
// 3. 注入数据
20+
$this->app->Runin(array("setup", "title"), array($data['setup'], $data['title']));
21+
// 4. 渲染模板
22+
$this->app->Open("index.cms");
23+
}
24+
}

app/modules/ut-frame/route.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
//文件映射
33
//[p]=>[file]
44
return [
5-
'index' => 'Index'
5+
'index' => 'index'
66
];

0 commit comments

Comments
 (0)