diff --git a/views/admin/share_manage.php b/views/admin/share_manage.php index 9780427..b87b94a 100644 --- a/views/admin/share_manage.php +++ b/views/admin/share_manage.php @@ -63,7 +63,7 @@ $this->params['breadcrumbs'][] = $this->title; if ($action === 'view') { // 返回查看按钮的链接 return $model->status != 0 ? Url::toRoute(['share-manage-view', 'share_id' => $model->share_id]): null; - } elseif ($action === 'delete') { + } else { // 如果 status 为 0,禁用删除按钮 return $model->status != 0 ? Url::toRoute(['share-manage-delete', 'share_id' => $model->share_id]) : null; }