Commit 116f77d5 authored by Andreas Heimann's avatar Andreas Heimann

fixed hot tab

parent 9efc481b
......@@ -4,7 +4,7 @@
"description": "SpinSha.re Client",
"homepage": "https://spinsha.re",
"copyright": "Copyright © SpinSha.re",
"version": "2.4.4",
"version": "2.4.6",
"author": "SpinSha.re",
"private": true,
"scripts": {
......
......@@ -114,24 +114,8 @@ class SSAPI {
});
}
async getHotSongs(_offset) {
let apiPath = this.apiBase + "songs/hot/" + _offset;
let supportedVersion = this.supportedVersion;
return axios.get(apiPath)
.then(function(response) {
if(response.data.version !== supportedVersion) {
throw new Error("Client is outdated!");
}
return response.data.data;
}).catch(function(error) {
throw new Error(error);
});
}
async getPopularSongs(_offset) {
let apiPath = this.apiBase + "songs/popular/" + _offset;
async getHotThisWeekSongs(_offset) {
let apiPath = this.apiBase + "songs/hotThisWeek/" + _offset;
let supportedVersion = this.supportedVersion;
return axios.get(apiPath)
......
......@@ -7,7 +7,7 @@
<template v-slot:song-list>
<SongItemPlaceholder
v-if="isHotSongsLoading"
v-for="n in 9"
v-for="n in 10"
v-bind:key="n" />
<SongItem
v-if="!isHotSongsLoading"
......@@ -36,7 +36,7 @@
mounted: function() {
let ssapi = new SSAPI();
ssapi.getHotSongs(this.$data.hotSongsOffset).then((data) => {
ssapi.getHotThisWeekSongs(this.$data.hotSongsOffset).then((data) => {
this.$data.isHotSongsLoading = false;
this.$data.hotSongs = data;
});
......@@ -63,7 +63,7 @@
let ssapi = new SSAPI();
this.$data.isHotSongsLoading = true;
ssapi.getHotSongs(this.$data.hotSongsOffset).then((data) => {
ssapi.getHotThisWeekSongs(this.$data.hotSongsOffset).then((data) => {
this.$data.isHotSongsLoading = false;
this.$data.hotSongs = data;
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment