添加网站文件
This commit is contained in:
32
application/admin/controller/Configura.php
Normal file
32
application/admin/controller/Configura.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
namespace app\admin\controller;
|
||||
use app\admin\logic\CollectionLogic;
|
||||
use app\admin\logic\StaffLogic;
|
||||
use think\Db;
|
||||
class Configura extends AdminBase
|
||||
{
|
||||
|
||||
public function lists(){
|
||||
|
||||
if ($this->request->isAjax()) {
|
||||
$get = $this->request->get();
|
||||
$lists = CollectionLogic::stafflists($get);
|
||||
$this->_success('',$lists);
|
||||
}
|
||||
$this->assign('usertype',StaffLogic::staff_beed());
|
||||
$this->assign('type',StaffLogic::type());
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
public function distance(){
|
||||
$post = $this->request->post();
|
||||
$staff=Db::name('staff')->where('id',$post['id'])->update(['distance'=>$post['number']]);
|
||||
$this->_success('增加距离成功');
|
||||
}
|
||||
public function transit(){
|
||||
$post = $this->request->post();
|
||||
$staff=Db::name('staff')->where('id',$post['id'])->update(['transit'=>$post['transit']]);
|
||||
$this->_success('增加员工出行工具成功');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user