diff --git a/src/api/home.ts b/src/api/home.ts index a426aa5..7798fae 100644 --- a/src/api/home.ts +++ b/src/api/home.ts @@ -1,6 +1,6 @@ import request from "@/utils/request"; import { IHotSinger } from "@/type/singer"; -import { ISearchKeyword } from "@/type/search"; +import { ISearchKeyword, IHotSearch } from "@/type/search"; import { IPlayListSort } from "@/type/playlist"; import { IRecommendMusic } from "@/type/music"; import { IAlbumNew } from "@/type/album"; @@ -24,6 +24,11 @@ export const getSearchKeyword = () => { return request.get("/search/default"); }; +// 获取热门搜索 +export const getHotSearch = () => { + return request.get("/search/hot/detail"); +}; + // 获取歌单分类 export const getPlaylistCategory = () => { return request.get("/playlist/catlist"); diff --git a/src/api/search.ts b/src/api/search.ts new file mode 100644 index 0000000..8a5e953 --- /dev/null +++ b/src/api/search.ts @@ -0,0 +1,9 @@ +import request from "@/utils/request"; +import { ISearchDetail } from "@/type/search"; + +// 搜索内容 +export const getSearch = (keywords: any) => { + return request.get("/cloudsearch", { + params: { keywords: keywords, type: 1018 }, + }); +}; diff --git a/src/layout/components/PlayBar.vue b/src/layout/components/PlayBar.vue index 7db1a14..317bc63 100644 --- a/src/layout/components/PlayBar.vue +++ b/src/layout/components/PlayBar.vue @@ -1,5 +1,5 @@