mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-24 08:07:23 +08:00
更改热门搜索逻辑为搜索关键词
This commit is contained in:
@@ -49,9 +49,11 @@ const store = useStore();
|
|||||||
|
|
||||||
// 推荐热搜词
|
// 推荐热搜词
|
||||||
const hotSearchKeyword = ref("搜索点什么吧...")
|
const hotSearchKeyword = ref("搜索点什么吧...")
|
||||||
|
const hotSearchValue = ref("")
|
||||||
const loadHotSearchKeyword = async () => {
|
const loadHotSearchKeyword = async () => {
|
||||||
const { data } = await getSearchKeyword();
|
const { data } = await getSearchKeyword();
|
||||||
hotSearchKeyword.value = data.data.showKeyword
|
hotSearchKeyword.value = data.data.showKeyword
|
||||||
|
hotSearchValue.value = data.data.realkeyword
|
||||||
}
|
}
|
||||||
const loadPage = async () => {
|
const loadPage = async () => {
|
||||||
const { data } = await getUserDetail()
|
const { data } = await getUserDetail()
|
||||||
@@ -77,7 +79,7 @@ const search = () => {
|
|||||||
|
|
||||||
let value = searchValue.value
|
let value = searchValue.value
|
||||||
if (value == "") {
|
if (value == "") {
|
||||||
searchValue.value = hotSearchKeyword.value
|
searchValue.value = hotSearchValue.value
|
||||||
} else {
|
} else {
|
||||||
router.push({
|
router.push({
|
||||||
path: "/search",
|
path: "/search",
|
||||||
|
|||||||
Reference in New Issue
Block a user