改进 Key 获取
This commit is contained in:
parent
7fa1ccf755
commit
65c1612955
@ -79,18 +79,12 @@ public function toWeCom(WorkOrderModel $workOrder): false|array
|
||||
{
|
||||
$workOrder->load(['module', 'user']);
|
||||
|
||||
$module = null;
|
||||
$wecom_key = config('settings.wecom.robot_hook.default');
|
||||
|
||||
if ($workOrder->module) {
|
||||
$module = $workOrder->module;
|
||||
|
||||
// 取消隐藏字段
|
||||
$module->makeVisible(['wecom_key']);
|
||||
}
|
||||
|
||||
if ($module?->wecom_key == null) {
|
||||
$wecom_key = config('settings.wecom.robot_hook.default');
|
||||
} else {
|
||||
$wecom_key = $module->wecom_key;
|
||||
$wecom_key = $module->makeVisible(['wecom_key'])->wecom_key ?? $wecom_key;
|
||||
}
|
||||
|
||||
return [
|
||||
|
Loading…
Reference in New Issue
Block a user