更新文件
This commit is contained in:
@@ -16,12 +16,18 @@ class Database extends Admin{
|
||||
* @title 数据备份
|
||||
*/
|
||||
public function export(){
|
||||
|
||||
$this->data['data'] = array(
|
||||
'list' => array()
|
||||
);
|
||||
return $this->data;
|
||||
}
|
||||
/**
|
||||
* @title 数据导入
|
||||
*/
|
||||
public function import(){
|
||||
|
||||
$this->data['data'] = array(
|
||||
'list' => array()
|
||||
);
|
||||
return $this->data;
|
||||
}
|
||||
}
|
||||
@@ -9,20 +9,37 @@
|
||||
namespace app\controller\admin;
|
||||
|
||||
use app\controller\Admin;
|
||||
use app\model\Rewrite;
|
||||
use app\model\SeoRule;
|
||||
|
||||
class Seo extends Admin{
|
||||
|
||||
/**
|
||||
* @title 系统首页
|
||||
*/
|
||||
public function index(){
|
||||
public function index(SeoRule $seo){
|
||||
//读取规则列表
|
||||
$map = array('status' => array('=', 0));
|
||||
|
||||
$list = $seo->where($map)->order('sort asc')->paginate(10, false, array(
|
||||
'query' => $this->request->param()
|
||||
));
|
||||
|
||||
$this->data['data'] = array(
|
||||
'list' => $list,
|
||||
'page' => $list->render()
|
||||
);
|
||||
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 重写规则
|
||||
*/
|
||||
public function rewrite(){
|
||||
|
||||
public function rewrite(Rewrite $rewrite){
|
||||
$this->data['data'] = array(
|
||||
'list' => array()
|
||||
);
|
||||
return $this->data;
|
||||
}
|
||||
}
|
||||
8
app/model/Rewrite.php
Normal file
8
app/model/Rewrite.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
namespace app\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class Rewrite extends Model {
|
||||
|
||||
}
|
||||
8
app/model/SeoRule.php
Normal file
8
app/model/SeoRule.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
namespace app\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class SeoRule extends Model {
|
||||
|
||||
}
|
||||
@@ -27,18 +27,18 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="data"}
|
||||
{volist name="list" id="item"}
|
||||
<tr>
|
||||
<td>{$data.time|date='Ymd-His',###}</td>
|
||||
<td>{$data.part}</td>
|
||||
<td>{$data.compress}</td>
|
||||
<td>{$data.size|format_bytes}</td>
|
||||
<td>{$item['time']|date='Ymd-His',###}</td>
|
||||
<td>{$item['part']}</td>
|
||||
<td>{$item['compress']}</td>
|
||||
<td>{$item['size']|format_bytes}</td>
|
||||
<td>{$key}</td>
|
||||
<td>-</td>
|
||||
<td class="action">
|
||||
<a class="db-import" href="{:url('import?time='.$data['time'])}">还原</a>
|
||||
<a class="db-import" href="{:url('import?time='.$item['time'])}">还原</a>
|
||||
|
||||
<a class="ajax-get confirm" href="{:url('del?time='.$data['time'])}">删除</a>
|
||||
<a class="ajax-get confirm" href="{:url('del?time='.$item['time'])}">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
|
||||
Reference in New Issue
Block a user