sync: soul-admin 页面 | 原因: 前端页面修改
This commit is contained in:
@@ -25,7 +25,6 @@ export function ResourceDockingTab() {
|
||||
const [isLoading, setIsLoading] = useState(true)
|
||||
const [typeFilter, setTypeFilter] = useState('investor')
|
||||
const [pushingId, setPushingId] = useState<string | null>(null)
|
||||
const [inserting, setInserting] = useState(false)
|
||||
|
||||
async function load() {
|
||||
setIsLoading(true)
|
||||
@@ -61,22 +60,6 @@ export function ResourceDockingTab() {
|
||||
}
|
||||
}
|
||||
|
||||
const insertTest = async () => {
|
||||
setInserting(true)
|
||||
try {
|
||||
const phone = `138${Date.now().toString().slice(-8)}`
|
||||
const res = await post<{ success?: boolean; message?: string }>('/api/db/match-records/test', {
|
||||
matchType: typeFilter,
|
||||
phone,
|
||||
})
|
||||
alert(res?.message || '测试记录已插入')
|
||||
await load()
|
||||
} catch (e) {
|
||||
alert('插入失败: ' + (e instanceof Error ? e.message : '网络错误'))
|
||||
} finally {
|
||||
setInserting(false)
|
||||
}
|
||||
}
|
||||
|
||||
const totalPages = Math.ceil(total / pageSize) || 1
|
||||
const hasContact = (r: MatchRecord) => !!(r.phone || r.wechatId)
|
||||
@@ -89,9 +72,6 @@ export function ResourceDockingTab() {
|
||||
<p className="text-gray-500 text-xs mt-1">共 {total} 条记录 — 有联系方式的可触发存客宝添加好友</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<Button onClick={insertTest} disabled={inserting} className="bg-[#38bdac] hover:bg-[#2da396] text-white">
|
||||
{inserting ? '插入中...' : '插入测试数据'}
|
||||
</Button>
|
||||
<select value={typeFilter} onChange={e => { setTypeFilter(e.target.value); setPage(1) }}
|
||||
className="bg-[#0f2137] border border-gray-700 text-white rounded-lg px-3 py-2 text-sm">
|
||||
{Object.entries(typeLabels).map(([k, v]) => <option key={k} value={k}>{v}</option>)}
|
||||
|
||||
Reference in New Issue
Block a user