feat: 图片上传优化及审核状态交互改进
This commit is contained in:
@@ -252,8 +252,37 @@ export default function OwnerDashboard() {
|
||||
<div className="space-y-4">
|
||||
{houses.map((house) => (
|
||||
<div key={house.id} className="bg-white rounded-xl overflow-hidden shadow-sm">
|
||||
<Link href={`/house/${house.id}`}>
|
||||
<div className="flex">
|
||||
{house.status === 'approved' ? (
|
||||
<Link href={`/house/${house.id}`}>
|
||||
<div className="flex">
|
||||
{house.images && house.images.length > 0 ? (
|
||||
<img
|
||||
src={house.images[0]}
|
||||
alt={house.title}
|
||||
className="w-28 h-28 object-cover flex-shrink-0"
|
||||
/>
|
||||
) : (
|
||||
<div className="w-28 h-28 bg-gradient-to-br from-orange-100 to-orange-200 flex items-center justify-center text-3xl flex-shrink-0">
|
||||
🏠
|
||||
</div>
|
||||
)}
|
||||
<div className="flex-1 p-3 min-w-0">
|
||||
<h3 className="font-semibold text-gray-900 truncate">{house.title}</h3>
|
||||
<p className="text-gray-500 text-sm truncate">{house.address}</p>
|
||||
<div className="flex items-center justify-between mt-2">
|
||||
<span className="text-orange-500 font-bold">
|
||||
¥{house.price}/月
|
||||
</span>
|
||||
<span className="text-gray-400 text-xs">{house.district}</span>
|
||||
</div>
|
||||
<div className="mt-2">
|
||||
<span className="inline-block bg-green-100 text-green-700 text-xs px-2 py-1 rounded">审核通过</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
) : (
|
||||
<div className="flex opacity-60">
|
||||
{house.images && house.images.length > 0 ? (
|
||||
<img
|
||||
src={house.images[0]}
|
||||
@@ -278,9 +307,6 @@ export default function OwnerDashboard() {
|
||||
{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>
|
||||
)}
|
||||
@@ -290,7 +316,7 @@ export default function OwnerDashboard() {
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
)}
|
||||
<div className="border-t border-gray-100 flex">
|
||||
<button
|
||||
onClick={() => openForm(house)}
|
||||
|
||||
Reference in New Issue
Block a user