diff --git a/index.html b/index.html
index af994f7..695423e 100644
--- a/index.html
+++ b/index.html
@@ -6,7 +6,13 @@
Vite App
-
+
+
+
diff --git a/package-lock.json b/package-lock.json
index 548ffcf..12bb256 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -465,6 +465,14 @@
"postcss-value-parser": "^4.1.0"
}
},
+ "axios": {
+ "version": "0.21.1",
+ "resolved": "https://registry.npm.taobao.org/axios/download/axios-0.21.1.tgz",
+ "integrity": "sha1-IlY0gZYvTWvemnbVFu8OXTwJsrg=",
+ "requires": {
+ "follow-redirects": "^1.10.0"
+ }
+ },
"balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.2.tgz",
@@ -866,6 +874,11 @@
"to-regex-range": "^5.0.1"
}
},
+ "follow-redirects": {
+ "version": "1.14.1",
+ "resolved": "https://registry.nlark.com/follow-redirects/download/follow-redirects-1.14.1.tgz?cache=0&sync_timestamp=1620555300559&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.14.1.tgz",
+ "integrity": "sha1-2RFN7Qoc/dM04WTmZirQK/2R/0M="
+ },
"fs-extra": {
"version": "10.0.0",
"resolved": "https://registry.nlark.com/fs-extra/download/fs-extra-10.0.0.tgz",
diff --git a/package.json b/package.json
index f54ab0e..e7d1b21 100644
--- a/package.json
+++ b/package.json
@@ -8,6 +8,7 @@
"dependencies": {
"@tailwindcss/postcss7-compat": "^2.2.4",
"autoprefixer": "^9.8.6",
+ "axios": "^0.21.1",
"postcss": "^7.0.36",
"sass": "^1.35.2",
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.4",
diff --git a/src/api/home.ts b/src/api/home.ts
new file mode 100644
index 0000000..a45ec61
--- /dev/null
+++ b/src/api/home.ts
@@ -0,0 +1,34 @@
+import request from "@/utils/request";
+import { IHotSinger } from "@/type/singer";
+import { ISearchKeyword } from "@/type/search";
+import { IPlayListSort } from "@/type/playlist";
+import { IRecommendMusic } from "@/type/music";
+
+interface IHotSingerParams {
+ offset: number;
+ limit: number;
+}
+
+interface IRecommendMusicParams {
+ limit: number;
+}
+
+// 获取热门歌手
+export const getHotSinger = (params: IHotSingerParams) => {
+ return request.get("/top/artists", { params });
+};
+
+// 获取搜索推荐词
+export const getSearchKeyword = () => {
+ return request.get("/search/default");
+};
+
+// 获取歌单分类
+export const getPlaylistCategory = () => {
+ return request.get("/playlist/catlist");
+};
+
+// 获取推荐音乐
+export const getRecommendMusic = (params: IRecommendMusicParams) => {
+ return request.get("/personalized/newsong", { params });
+};
diff --git a/src/layout/AppLayout.vue b/src/layout/AppLayout.vue
index 0e8a598..c36cf26 100644
--- a/src/layout/AppLayout.vue
+++ b/src/layout/AppLayout.vue
@@ -2,31 +2,80 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/layout/components/AppMenu.vue b/src/layout/components/AppMenu.vue
index c582c66..9b2cb01 100644
--- a/src/layout/components/AppMenu.vue
+++ b/src/layout/components/AppMenu.vue
@@ -4,12 +4,12 @@