feat: 添加房源审核功能及定时审核任务
This commit is contained in:
@@ -13,6 +13,9 @@ interface House {
|
||||
address: string;
|
||||
phone: string;
|
||||
images: string[];
|
||||
status: string;
|
||||
reject_reason?: string;
|
||||
reviewed_at?: string;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
@@ -271,6 +274,20 @@ export default function OwnerDashboard() {
|
||||
</span>
|
||||
<span className="text-gray-400 text-xs">{house.district}</span>
|
||||
</div>
|
||||
<div className="mt-2">
|
||||
{house.status === 'pending' && (
|
||||
<span className="inline-block bg-yellow-100 text-yellow-700 text-xs px-2 py-1 rounded">审核中</span>
|
||||
)}
|
||||
{house.status === 'approved' && (
|
||||
<span className="inline-block bg-green-100 text-green-700 text-xs px-2 py-1 rounded">审核通过</span>
|
||||
)}
|
||||
{house.status === 'rejected' && (
|
||||
<span className="inline-block bg-red-100 text-red-700 text-xs px-2 py-1 rounded">审核驳回</span>
|
||||
)}
|
||||
</div>
|
||||
{house.status === 'rejected' && house.reject_reason && (
|
||||
<p className="text-red-500 text-xs mt-1">驳回原因:{house.reject_reason}</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
|
||||
Reference in New Issue
Block a user