12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace app\admin\controller;
- use app\api\BaseController;
- use think\App;
- use think\facade\Db;
- use think\facade\View;
- class Basemsg extends BaseController
- {
- public function __construct(App $app)
- {
- parent::__construct($app);
- $this->uid = get_login_admin('id');
- //0是财,1是送审,2是公司
- $this->unit_type = Db::name("department")->where("id",get_login_admin("unit_name"))->value("type");
- }
- public function index(){
- $detail = Db::name("department")->where("id",get_login_admin("unit_name"))->find();
- View::assign("detail",$detail);
- View::assign("unit_type",$this->unit_type);
- return view();
- }
- public function edit(){
- if (request()->isAjax()) {
- $param = get_params();
- $param["update_time"] = time();
- Db::name("department")->where("id",get_login_admin("unit_name"))->update($param);
- return to_assign(0,'操作成功');
- // halt($param);
- }
- }
- }
|