request; $can_delete_text = '不能删除'; if ($request->can_delete == 1) { $can_delete_text = '仅删除API数据'; } elseif ($request->can_delete == 2) { $can_delete_text = '可删除所有数据'; } return json_message([ 'admin_id' => $request->admin_id, 'can_write_own' => $request->can_write_own, 'can_write_other' => $request->can_write_other, 'can_delete' => $request->can_delete, 'permissions_text' => [ 'can_write_own' => $request->can_write_own ? '可管理自己的数据' : '不可管理自己的数据', 'can_write_other' => $request->can_write_other ? '可管理后台数据' : '不可管理后台数据', 'can_delete' => $can_delete_text, ], ]); } }