Files
sentos/app/controller/Index.php
2022-11-14 20:34:53 +08:00

40 lines
1.2 KiB
PHP

<?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{
$area = \think\facade\Db::name('areas')->select();
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);
}
}