基于thinkphp的出租屋管理系统
生活随笔
收集整理的這篇文章主要介紹了
基于thinkphp的出租屋管理系统
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
文章目錄
- 最常用出租屋管理系統
- 技術棧
- 系統環境
- 安裝步驟
- 項目地址
- 界面及功能展示
- 核心代碼
最常用出租屋管理系統
自家用的出租屋管理系統,用來記錄水電、租客等信息。系統分為3部分,房屋管理、我的賬單和設置。主要采用thinkphp5.1+layUI開發。
技術棧
-
X-admin V2.2
-
layUI
-
Echarts 5.3.2
-
ThinkPHP 5.1.39 LTS
-
Grid++ Report
系統環境
-
PHP 7.4.28
-
Apache 2.4.41
-
MySQL 5.7.28
安裝步驟
項目地址
gitee: 最常用出租屋管理系統rent2
界面及功能展示
登陸頁面
主頁面
房產管理-頁面
房號管理-頁面
未收賬單-頁面
到賬賬單-頁面
租客檔案-頁面
核心代碼
protected $auth;protected $checkLoginExclude = [];public function initialize(){if ($this->request->isPost()) {$token = $this->getToken();header('X-CSRF-TOKEN: ' . $token);if ($token !== $this->request->header('X-CSRF-TOKEN')) {$this->error('令牌已過期,請重新提交。');}}$this->auth = Auth::getInstance();$controller = $this->request->controller();$action = $this->request->action();if (in_array($action, $this->checkLoginExclude)) {return;}if (!$this->auth->isLogin()) {$this->error('您還沒有登錄。', 'Index/login');}if (!$this->auth->checkAuth($controller, $action)) {$this->error('您沒有權限訪問。');}if ($this->auth->isTimeOut()) {$this->error('您已超時,請重新登陸。');}$loginUser = $this->auth->getLoginUser();$this->assign('layout_login_user', ['id' => $loginUser['id'], 'username' => $loginUser['username'], 'expiration_date' => $loginUser['expiration_date']]);if (!$this->request->isAjax()) {$this->view->engine->layout('common/layout');$this->assign('layout_token', $this->getToken());}}public function getToken(){$token = Session::get('X-CSRF-TOKEN');if (!$token) {$token = md5(uniqid(microtime(), true));Session::set('X-CSRF-TOKEN', $token);}return $token;}總結
以上是生活随笔為你收集整理的基于thinkphp的出租屋管理系统的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 小米笔记本安装Win 10历程
- 下一篇: 福斯i6飞行模式设置_数据网络卡的时候,