diff --git a/README.md b/README.md index 29fda30..b31e027 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,36 @@ -# DailyHot +
+logo +

今日热榜

+

汇聚全网热点,热门尽览无余

+
+ +
-This template should help get you started developing with Vue 3 in Vite. -## Recommended IDE Setup +## 示例 -[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin). +> 这里是示例站点 -## Customize configuration +- [今日热榜 - https://hot.imsyy.top/](https://hot.imsyy.top/) -See [Vite Configuration Reference](https://vitejs.dev/config/). -## Project Setup +## 部署 -```sh -npm install +```bash +// 安装依赖 +pnpm install + +// 开发 +pnpm dev + +// 打包 +pnpm build ``` -### Compile and Hot-Reload for Development +## Vercel 部署 -```sh -npm run dev -``` +现已支持 Vercel 一键部署,无需服务器 -### Compile and Minify for Production +> 请注意,需要修改环境变量中的 API 地址 -```sh -npm run build -``` +![Powered by Vercel](./public/ico/powered-by-vercel.svg) diff --git a/package.json b/package.json index 052ba41..3770026 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "description": "今日热榜", "author": "imsyy", "github": "https://github.com/imsyy", - "version": "0.2.1", + "version": "1.0.0", "private": true, "scripts": { "dev": "vite", diff --git a/public/favicon.png b/public/favicon.png new file mode 100644 index 0000000..e74ac2f Binary files /dev/null and b/public/favicon.png differ diff --git a/public/ico/powered-by-vercel.svg b/public/ico/powered-by-vercel.svg new file mode 100644 index 0000000..8778286 --- /dev/null +++ b/public/ico/powered-by-vercel.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/public/logo/douban_new.png b/public/logo/douban_new.png new file mode 100644 index 0000000..da766fa Binary files /dev/null and b/public/logo/douban_new.png differ diff --git a/public/logo/genshin.png b/public/logo/genshin.png new file mode 100644 index 0000000..d9f6746 Binary files /dev/null and b/public/logo/genshin.png differ diff --git a/public/logo/kuaishou.png b/public/logo/kuaishou.png new file mode 100644 index 0000000..91c665a Binary files /dev/null and b/public/logo/kuaishou.png differ diff --git a/public/logo/lol.png b/public/logo/lol.png new file mode 100644 index 0000000..034c85f Binary files /dev/null and b/public/logo/lol.png differ diff --git a/public/logo/netease.png b/public/logo/netease.png new file mode 100644 index 0000000..a3de340 Binary files /dev/null and b/public/logo/netease.png differ diff --git a/public/logo/weread.png b/public/logo/weread.png new file mode 100644 index 0000000..4dd5ebf Binary files /dev/null and b/public/logo/weread.png differ diff --git a/screenshots/main.jpg b/screenshots/main.jpg new file mode 100644 index 0000000..8f7a7cc Binary files /dev/null and b/screenshots/main.jpg differ diff --git a/src/App.vue b/src/App.vue index 681e27b..d1617d3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -36,6 +36,16 @@ const headerShow = ref(false); const backTopChange = (val) => { headerShow.value = val; }; + +onMounted(() => { + store.checkNewsUpdate(); + // 写入默认 + nextTick(() => { + if (store.newsArr.length === 0) { + store.newsArr = store.defaultNewsArr; + } + }); +});