Commit 76c48de4 authored by SpinShare's avatar SpinShare

fix add review/spinplays button

parent d57fefc3
{ {
"name": "spinshare-client", "name": "spinshare-client",
"version": "2.2.0", "version": "2.2.1",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"description": "SpinSha.re Client", "description": "SpinSha.re Client",
"homepage": "https://spinsha.re", "homepage": "https://spinsha.re",
"copyright": "Copyright © SpinSha.re", "copyright": "Copyright © SpinSha.re",
"version": "2.2.1", "version": "2.2.2",
"author": "SpinSha.re", "author": "SpinSha.re",
"private": true, "private": true,
"scripts": { "scripts": {
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
openOnSpinShare: function() { openOnSpinShare: function() {
if(this.isSpinShare) { if(this.isSpinShare) {
if(this.isSpinShare.includes("spinshare_")) { if(this.isSpinShare.includes("spinshare_")) {
this.$router.push({ name: 'SongDetail', params: { id: this.isSpinShare } }); this.$router.push({ name: 'SongDetailReviews', params: { id: this.isSpinShare } });
} }
} }
}, },
......
...@@ -2,7 +2,7 @@ const axios = require('axios'); ...@@ -2,7 +2,7 @@ const axios = require('axios');
class SSAPI { class SSAPI {
constructor(isDev) { constructor(isDev) {
if(isDev) { if(!isDev) {
this.apiBase = "http://localhost/www/spinshare/server/public/index.php/api/"; this.apiBase = "http://localhost/www/spinshare/server/public/index.php/api/";
} else { } else {
this.apiBase = "https://spinsha.re/api/"; this.apiBase = "https://spinsha.re/api/";
......
...@@ -178,6 +178,11 @@ ...@@ -178,6 +178,11 @@
ssapi.getSongDetail(this.$route.params.id).then((data) => { ssapi.getSongDetail(this.$route.params.id).then((data) => {
if(data.status == 200) { if(data.status == 200) {
// transform filereference to id
if(this.$route.params.id.includes("spinshare_")) {
this.$router.push({ name: 'SongDetailReviews', params: { id: data.data.id } });
}
this.$data.id = data.data.id; this.$data.id = data.data.id;
this.$data.cover = data.data.paths.cover; this.$data.cover = data.data.paths.cover;
this.$data.title = data.data.title; this.$data.title = data.data.title;
......
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