This commit is contained in:
2025-03-17 11:27:07 +08:00
parent 7a7f432006
commit 5febeca83f
6805 changed files with 6 additions and 6 deletions

View File

@@ -0,0 +1,63 @@
<?php
/*
* description
* authorwh
* email
* createTime{2023/12/5} {15:45}
*/
namespace app\common\behavior;
use app\api\logic\LoginLogic;
use wanghua\general_utility_tools_php\api\BaseUserLogic;
use wanghua\general_utility_tools_php\tool\Tools;
class LoginBehavior
{
//public function run(&$params)
//{
// // 行为逻辑
//}
public function actionBegin(){
return true;
//白名单
$white_arr = [
//【全小写】
'api/login/login',
'api/reg/reg',
'api/email/sendemail',
'api/email/check',
'api/users/forgot',
//public
'api/twitter/search',
];
$module = request()->module();
$controller = request()->controller();
$action = request()->action();
if($module != 'api'){
return false;
}
$url = strtolower($module.'/'.$controller.'/'.$action);
//dump($url);
if(in_array($url, $white_arr)){
//dump('不校验');
return true;//不校验
}
Tools::log_to_write_txt(['action log'=>input()]);
$r = session('api_user_info');
//dump($r);die;
if(empty($r)){
Tools::log_to_write_txt(['api_user_info'=>$r]);
echo json_encode(Tools::set_fail('登录失效'),JSON_UNESCAPED_UNICODE);die;
}
}
}

View File

@@ -0,0 +1,42 @@
<?php
/*
* description
* authorwh
* email
* createTime{2022/03/08} {14:17}
*/
namespace app\common\exception;
use think\exception\Handle;
use think\Request;
use wanghua\general_utility_tools_php\tool\Tools;
class SystemException extends Handle
{
public function render(\Exception $e)
{
// 参数验证错误
//if ($e instanceof ValidateException) {
// return json($e->getError(), 422);
//}
// 请求异常
//if ($e instanceof HttpException && request()->isAjax()) {
// return response($e->getMessage(), $e->getStatusCode());
//}
Tools::log_to_write_txt([
'error'=>'系统错误.'.$e->getMessage(),
'input'=>input(),
'error_info'=>$e->getTraceAsString()
]);
//request()->LogObj->flush();
//可以在此交由系统处理
return parent::render($e);
}
}

View File

@@ -0,0 +1,31 @@
<?php
/*
* description
* authorwh
* email
* createTime{2021/6/21} {15:02}
*/
namespace app\common\model;
use think\Db;
use think\Model;
class BaseModel extends Model
{
protected static $log_file = '';//日志文件名
/**
* desc
* authorwh
* @param $self_table
* @return \think\db\Query
*/
protected static function tab($self_table){
return Db::table($self_table);
}
}

View File

@@ -0,0 +1,421 @@
<?php
namespace app\common\model;
class TabConf
{
/**
* ai分析药品、影像、病历结果
*/
static $___fa_drugs_images_medical_task = '___fa_drugs_images_medical_task';
/**
* AI药品、影像、病历上传任务记录
*/
static $__fa_drugs_images_medical_result = '__fa_drugs_images_medical_result';
/**
* 基本信息图片上传并AI分析结果
*/
static $__fa_hbruser_drugs_images_medical_report = '__fa_hbruser_drugs_images_medical_report';
/**
* 管理员表
*/
static $fa_admin = 'fa_admin';
/**
* 管理员日志表
*/
static $fa_admin_log = 'fa_admin_log';
/**
* 地区表
*/
static $fa_area = 'fa_area';
/**
* 附件表
*/
static $fa_attachment = 'fa_attachment';
/**
* 分组表
*/
static $fa_auth_group = 'fa_auth_group';
/**
* 权限分组表
*/
static $fa_auth_group_access = 'fa_auth_group_access';
/**
* 节点表
*/
static $fa_auth_rule = 'fa_auth_rule';
/**
* 分类表
*/
static $fa_category = 'fa_category';
/**
* 在线命令表
*/
static $fa_command = 'fa_command';
/**
* 系统配置
*/
static $fa_config = 'fa_config';
/**
* 登录设备(一个医生有多个病历,一个医生同时只有一个客户端)
*/
static $fa_device = 'fa_device';
/**
* 基本信息图片上传和AI分析结果
*/
static $fa_drugs_images_medical_result = 'fa_drugs_images_medical_result';
/**
* 任务处理进度记录
*/
static $fa_drugs_images_medical_task = 'fa_drugs_images_medical_task';
/**
* 邮箱验证码表
*/
static $fa_ems = 'fa_ems';
/**
* 估量-ai处理结果
*/
static $fa_guliang_ai_deal_result = 'fa_guliang_ai_deal_result';
/**
* 估量-问答记录
*/
static $fa_guliangqarecord = 'fa_guliangqarecord';
/**
* 估量-问答配置
*/
static $fa_guliangquestion = 'fa_guliangquestion';
/**
* 估量-用户
*/
static $fa_gulianguser = 'fa_gulianguser';
/**
* 基本信息图片上传和AI分析结果
*/
static $fa_hbruser_drugs_images_medical = 'fa_hbruser_drugs_images_medical';
/**
* 基本信息图片上传并AI分析结果
*/
static $fa_hbruser_drugs_images_medical_report = 'fa_hbruser_drugs_images_medical_report';
/**
* 任务处理进度记录
*/
static $fa_hbruser_drugs_images_medical_task = 'fa_hbruser_drugs_images_medical_task';
/**
* 短信发送记录
*/
static $fa_hdr_sms_record = 'fa_hdr_sms_record';
/**
* 管理员
*/
static $fa_hdradmin = 'fa_hdradmin';
/**
* 科室
*/
static $fa_hdrdepartment = 'fa_hdrdepartment';
/**
* 医生账户信息
*/
static $fa_hdrdoctorusers = 'fa_hdrdoctorusers';
/**
* 统一随访记录
*/
static $fa_hdrfollowup = 'fa_hdrfollowup';
/**
* 随访模板
*/
static $fa_hdrfollowuptemplate = 'fa_hdrfollowuptemplate';
/**
* 患者健康洞察
*/
static $fa_hdrhealth_insight = 'fa_hdrhealth_insight';
/**
* 问诊报告存档疼痛科、听译、h5问诊统一存放一个基本信息对应一个报告
*/
static $fa_hdrmedical_report = 'fa_hdrmedical_report';
/**
* 打开对话窗口记录(同时向患者端发送当前对话患者信息)
*/
static $fa_hdropen_chat_room_record = 'fa_hdropen_chat_room_record';
/**
* 人格测试结果
*/
static $fa_hdrpersonalitytest = 'fa_hdrpersonalitytest';
/**
* 科室问卷答案
*/
static $fa_hdrquestionnaireanswer = 'fa_hdrquestionnaireanswer';
/**
* 科室问卷问题(一个问题对应多个答案)
*/
static $fa_hdrquestionnairequestion = 'fa_hdrquestionnairequestion';
/**
* 患者挂号列表(可重复挂号)
*/
static $fa_hdrregister = 'fa_hdrregister';
/**
* 用户答题记录
*/
static $fa_hdruseranswerrecord = 'fa_hdruseranswerrecord';
/**
* 统一问诊用户基本信息
*/
static $fa_hdruserbaseinfo = 'fa_hdruserbaseinfo';
/**
* 基本信息图片上传并AI分析结果
*/
static $fa_hdruserbaseinfo_upload = 'fa_hdruserbaseinfo_upload';
/**
* H5用户
*/
static $fa_hdrusersh5 = 'fa_hdrusersh5';
/**
* 智语医助-设备关联表
*/
static $fa_healdevicerelation = 'fa_healdevicerelation';
/**
* 医生新消息
*/
static $fa_message = 'fa_message';
/**
* 短信验证码表
*/
static $fa_sms = 'fa_sms';
/**
* 系统维护配置,支持模块、控制器、方法。全等匹配。
*/
static $fa_sys_maintain_config = 'fa_sys_maintain_config';
/**
* 测试表
*/
static $fa_test = 'fa_test';
/**
* 听译优医助手对话记录
*/
static $fa_tingyiueassistantchathis = 'fa_tingyiueassistantchathis';
/**
* 疼痛科聊天历史
*/
static $fa_tt_chathistory = 'fa_tt_chathistory';
/**
* 随访记录(数智人医生)
*/
static $fa_tt_followup = 'fa_tt_followup';
/**
* 疼痛科自由对话聊天历史
*/
static $fa_tt_free_chathistory = 'fa_tt_free_chathistory';
/**
* 疼痛科病历报告(听译问诊)(一个基本信息对应一个报告)
*/
static $fa_tt_medical_report = 'fa_tt_medical_report';
/**
* 疼痛科用户基本信息
*/
static $fa_tt_userbaseinfo = 'fa_tt_userbaseinfo';
/**
* 疼痛科用户
*/
static $fa_tt_users = 'fa_tt_users';
/**
* 听译-聊天历史
*/
static $fa_ty_chathistory = 'fa_ty_chathistory';
/**
* 随访记录(听译助手)
*/
static $fa_ty_followup = 'fa_ty_followup';
/**
* 听译-病历报告(听译问诊)(一个基本信息对应一个报告)
*/
static $fa_ty_medical_report = 'fa_ty_medical_report';
/**
* 听译问诊-患者病历信息
*/
static $fa_ty_userbaseinfo = 'fa_ty_userbaseinfo';
/**
* 听译问诊-患者病历信息
*/
static $fa_ty_usermedicalrecord = 'fa_ty_usermedicalrecord';
/**
* 听译-医生账号
*/
static $fa_ty_users = 'fa_ty_users';
/**
* 会员表
*/
static $fa_user = 'fa_user';
/**
* 会员组表
*/
static $fa_user_group = 'fa_user_group';
/**
* 会员余额变动表
*/
static $fa_user_money_log = 'fa_user_money_log';
/**
* 会员规则表
*/
static $fa_user_rule = 'fa_user_rule';
/**
* 会员积分变动表
*/
static $fa_user_score_log = 'fa_user_score_log';
/**
* 会员Token表
*/
static $fa_user_token = 'fa_user_token';
/**
* 用户
*/
static $fa_users = 'fa_users';
/**
* 用户操作日志
*/
static $fa_users_operate_log = 'fa_users_operate_log';
/**
* 版本表
*/
static $fa_version = 'fa_version';
/**
* 系统杂项配置
*/
static $fa_zc_sundry_config = 'fa_zc_sundry_config';
}