更新目录结构
This commit is contained in:
@@ -24,16 +24,14 @@ class Index extends Base{
|
||||
if(request()->isAjax()){
|
||||
return ['code' => 1, 'data' => 'SentOS'];
|
||||
}else{
|
||||
return view('/index');
|
||||
return `<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible"content="IE=edge"><meta name="viewport"content="width=device-width, initial-scale=1"><title>SentOS</title><style>html,body{background-color:#fff;color:#3c4042;font-family:'Raleway',sans-serif;font-weight:100;height:80vh;margin:0}.top{text-align:right;line-height:35px;padding:0 20px}.top a{color:#333333;padding:0 10px}.full-height{height:90vh}.flex-center{align-items:center;display:flex;justify-content:center}.position-ref{position:relative}.top-right{position:absolute;right:10px;top:18px}.content{text-align:center}.title{font-size:84px}.links>a{color:#3c4042;padding:0 25px;font-size:12px;font-weight:600;letter-spacing:.1rem;text-decoration:none;text-transform:uppercase}.m-b-md{margin-bottom:30px}</style></head><body><div class="flex-center position-ref full-height"><div class="content"><div class="title m-b-md">SentOS</div><div class="links"></div></div></div><div style="text-align: center; font-size: 12px;"><p><a href="https://beian.miit.gov.cn/"target="_blank"style="color: #333333; text-decoration: none;">赣ICP备13006622号-1</a></p><p>技术支持:<a href="https://www.tensent.cn"target="_blank"style="color: #333333; text-decoration: none;">腾速科技</a></p></div></body></html>`;
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
public function miss(){
|
||||
return '404 Not Found!';
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ namespace app\controller\auth;
|
||||
use think\facade\Request;
|
||||
use app\model\auth\Departments;
|
||||
use app\services\auth\DepartmentService;
|
||||
use sent\tree\Tree;
|
||||
use Xin\Support\Arr;
|
||||
use app\controller\Base;
|
||||
|
||||
class Department extends Base {
|
||||
@@ -35,7 +35,7 @@ class Department extends Base {
|
||||
}
|
||||
}
|
||||
}
|
||||
$tree = (new Tree())->listToTree($list, 'id', 'parent_id', 'children', $root);
|
||||
$tree = Arr::tree($list, null, 0, ['id'=>'id', 'parent' => 'parent_id', 'child' => 'children']);
|
||||
if(empty($tree)){
|
||||
$this->data['data'] = $list;
|
||||
}else{
|
||||
|
||||
@@ -11,9 +11,6 @@ namespace app\controller\auth;
|
||||
use app\controller\Base;
|
||||
use app\services\auth\AuthService;
|
||||
use app\services\SocialiteService;
|
||||
use app\model\Member;
|
||||
use app\model\auth\Users;
|
||||
use app\model\auth\RolesAccess;
|
||||
|
||||
class Index extends Base{
|
||||
|
||||
@@ -28,21 +25,6 @@ class Index extends Base{
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
public function member(){
|
||||
// $output = $this->app->console->call('migrate:run');
|
||||
// return $output->fetch();
|
||||
// $map = [];
|
||||
// $member = Member::where($map)->select();
|
||||
// $save = [];
|
||||
// foreach($member as $item){
|
||||
// $user = Users::where('username', '=', $item->username)->findOrEmpty();
|
||||
// if($user->isEmpty()){
|
||||
// $save[] = ['uid' => $item['uid'], 'username' => $item['username'], 'password' => '123456', 'nickname' => $item['nickname'], 'email' => $item['email'], 'department_id' => $item['department']];
|
||||
// }
|
||||
// }
|
||||
// (new Users())->saveAll($save);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 第三方账号登录
|
||||
*/
|
||||
|
||||
71
app/controller/customer/Company.php
Normal file
71
app/controller/customer/Company.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?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\customer;
|
||||
|
||||
use app\controller\Base;
|
||||
use app\services\company\CompanyService;
|
||||
|
||||
/**
|
||||
* @title 企业信息模型
|
||||
*/
|
||||
class Company extends Base{
|
||||
|
||||
/**
|
||||
* @title 企业列表
|
||||
*
|
||||
* @time 2020年01月09日
|
||||
* @param CompanyService $service
|
||||
* @return Array
|
||||
*/
|
||||
public function index(CompanyService $service) {
|
||||
$data = $service->getCompanyList($this->request);
|
||||
|
||||
$this->data['data'] = $data;
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 企业详情
|
||||
*
|
||||
* @time 2020年01月09日
|
||||
* @param CompanyService $service
|
||||
* @return Array
|
||||
*/
|
||||
public function detail(CompanyService $service) {
|
||||
$data = $service->getCompanyDetail($this->request);
|
||||
|
||||
$this->data['data'] = $data;
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 修改企业
|
||||
*
|
||||
* @time 2020年01月09日
|
||||
* @param CompanyService $service
|
||||
* @return Array
|
||||
*/
|
||||
public function edit(CompanyService $service) {
|
||||
$data = $service->editCompany($this->request);
|
||||
|
||||
$this->data['data'] = $data;
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 导入企业信息
|
||||
*
|
||||
* @param CompanyService $service
|
||||
* @return void
|
||||
*/
|
||||
public function insert(CompanyService $service){
|
||||
$this->data['data'] = $service->insertCompanyData($this->request);
|
||||
return $this->data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user