更新
This commit is contained in:
39
app/controller/Index.php
Normal file
39
app/controller/Index.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\controller;
|
||||
|
||||
use app\controller\Base;
|
||||
|
||||
/**
|
||||
* @title 首页
|
||||
*/
|
||||
class Index extends Base{
|
||||
|
||||
/**
|
||||
* @title 首页
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function index(){
|
||||
if(request()->isAjax()){
|
||||
return ['code' => 1, 'data' => 'SentOS'];
|
||||
}else{
|
||||
return view('/index');
|
||||
}
|
||||
}
|
||||
|
||||
public function test(){
|
||||
// $area = \think\facade\Db::name('areas')->select();
|
||||
// $save = [];
|
||||
// foreach($area as $val){
|
||||
// $save[] = ['title' => $val['area'], 'code' => $val['area_id'], 'parent_id' => $val['city_id'], 'first' => '', 'create_time' => time(), 'update_time' => time()];
|
||||
// }
|
||||
// \think\facade\Db::name('area')->insertAll($save);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user