|
@@ -240,11 +240,13 @@ const handleAnalysis = async () => {
|
|
|
|
|
|
if (urlArr.length > 1) return message.warning('只支持单个链接抓取')
|
|
if (urlArr.length > 1) return message.warning('只支持单个链接抓取')
|
|
|
|
|
|
- const base_url = import.meta.env.VITE_NODE_BASE_URL
|
|
|
|
- axios.post(`${base_url}/process-urls`, { urlArr }, { timeout: 60000 }).then(res => {
|
|
|
|
- if (!res?.data || !res?.data?.contents || !res?.data?.contents.length) return
|
|
|
|
- const list = res?.data?.contents
|
|
|
|
- list.forEach(e => {
|
|
|
|
|
|
+
|
|
|
|
+ try {
|
|
|
|
+ const data = await talentWebParsingApi.processUrls({ urlArr })
|
|
|
|
+ const list = data?.contents || []
|
|
|
|
+ if (!list || !list.length) return
|
|
|
|
+
|
|
|
|
+ list.forEach(e => {
|
|
contents.value.push({
|
|
contents.value.push({
|
|
...e,
|
|
...e,
|
|
publish_time: null,
|
|
publish_time: null,
|
|
@@ -257,12 +259,9 @@ const handleAnalysis = async () => {
|
|
})
|
|
})
|
|
|
|
|
|
emit('analysis', contents.value)
|
|
emit('analysis', contents.value)
|
|
- }).catch(err => {
|
|
|
|
- console.log(err, 'error');
|
|
|
|
- message.error(err.message)
|
|
|
|
- }).finally(_ => {
|
|
|
|
|
|
+ } finally {
|
|
loading.close()
|
|
loading.close()
|
|
- })
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|