mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-24 05:24:23 +00:00
feat: restructure README, remove Google and Yahoo components, and implement hot news display
This commit is contained in:
parent
8198010268
commit
a5af4c04f7
6 changed files with 60 additions and 40 deletions
39
pages/app/hot/index.vue
Normal file
39
pages/app/hot/index.vue
Normal file
|
@ -0,0 +1,39 @@
|
|||
<script lang="ts" setup>
|
||||
const ffeed = ref();
|
||||
const ass = ['健康2.0', '中天', 'TVBS', '香港01', "ETtoday"];
|
||||
|
||||
try {
|
||||
const { data } = await useFetch('/api/rss/google')
|
||||
ffeed.value = data.value
|
||||
} catch (error) {
|
||||
console.error('Error:', error)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-for="item in ffeed" class="justify-center align-center text-center p-4 border border-white rounded-lg m-4">
|
||||
{{ item }}
|
||||
<span class="text-xl text-bold text-gray-100">{{ item.title }}
|
||||
<span v-if="ass.some((app) =>
|
||||
item.title.includes(app)
|
||||
)"
|
||||
class="text-red-500 text-sm">
|
||||
- 疑似來自有中資背景公司
|
||||
</span>
|
||||
</span>
|
||||
<h4 class="text-gray-500 text-sm">{{ new Date(item.date).toLocaleString() }}</h4>
|
||||
類似新聞:
|
||||
<div v-for="itit in item.content">
|
||||
<ul v-for="ititit in itit">
|
||||
<li v-if="ititit.content?.[0].content[0] !== item.title">
|
||||
- <a :href="ititit.content?.[0].attributes?.href">{{ ititit.content?.[0].content[0] }}</a> - <a :href="'/find/newsOrg?name=' + ititit.content?.[2].content[0]">{{ ititit.content?.[2].content[0] }}</a>
|
||||
<span v-if="ass.some((app) => ititit.content?.[2].content[0].includes(app))"
|
||||
class="text-red-500 text-sm">
|
||||
- 疑似來自有中資背景公司
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
|
@ -1,36 +0,0 @@
|
|||
<script lang="ts" setup>
|
||||
const ffeed = ref();
|
||||
|
||||
try {
|
||||
const { data } = await useFetch('/api/rss/google')
|
||||
ffeed.value = data.value
|
||||
} catch (error) {
|
||||
console.error('Error:', error)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<hr/>
|
||||
<div v-for="item in ffeed">
|
||||
<span>{{ item.title }}
|
||||
<span v-if="item.title.includes('.cn') || item.title.includes('健康2.0') ||
|
||||
item.title.includes('中天') || item.title.includes('TVBS') ||
|
||||
item.title.includes('香港01')"
|
||||
class="text-red-500 text-sm">
|
||||
- 疑似來自有中資背景公司
|
||||
</span>
|
||||
</span>
|
||||
<h4>{{ item.date }}</h4>
|
||||
類似新聞:
|
||||
<div v-for="itit in item.content">
|
||||
{{ itit }}
|
||||
<ul v-for="ititit in itit">
|
||||
<li>
|
||||
- {{ ititit.content?.[0].content[0] }} - {{ ititit.content?.[2].content[0] }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr/>
|
||||
</div>
|
||||
</template>
|
|
@ -1,3 +0,0 @@
|
|||
<template>
|
||||
https://tw.news.yahoo.com/rss/
|
||||
</template>
|
Loading…
Add table
Add a link
Reference in a new issue