Commit 5fb0c7f6 authored by ganjingcun's avatar ganjingcun

fix user link

parent e3c927e5
......@@ -48,12 +48,12 @@ export default class Api {
static getDeckInfo(opt) {
var tmp = "http://localhost:3000/api"
return Vue.http.get(`${tmp}/deckinfo`, { 'params': opt });
return Vue.http.get(`${URL}/deckinfo`, { 'params': opt });
}
static saveDeck(opt) {
var tmp = "http://localhost:3000/api"
const url = `${tmp}/deckinfo`
const url = `${URL}/deckinfo`
return Vue.http.post(url, opt, { 'emulateJSON': true });
}
......
......@@ -228,6 +228,7 @@
mounted: function () {
this.init2();
window.onhashchange = this.init;
},
computed: {
......@@ -314,14 +315,14 @@
var userscorea = row[4];
var userscoreb = row[5];
if (userscorea < 0) {
return "<a href='userinfo.html?username=" + data + "'><span class='label label-danger'>" + data + "</span></a>";
return "<a href='#/userinfo?username=" + data + "'><span class='label label-danger'>" + data + "</span></a>";
}
if (userscorea > userscoreb) {
return "<a href='userinfo.html?username=" + data + "'><span class='label label-success'>" + data + "</span></a>";
return "<a href='#/userinfo?username=" + data + "'><span class='label label-success'>" + data + "</span></a>";
}
return "<a href='userinfo.html?username=" + data + "'><span class='label label-info'>" + data + "</span></a>";
return "<a href='#/userinfo?username=" + data + "'><span class='label label-info'>" + data + "</span></a>";
},
"targets": 0
},
......@@ -330,14 +331,14 @@
var userscorea = row[4];
var userscoreb = row[5];
if (userscoreb < 0) {
return "<a href='userinfo.html?username=" + data + "'><span class='label label-danger'>" + data + "</span></a>";
return "<a href='#/userinfo?username=" + data + "'><span class='label label-danger'>" + data + "</span></a>";
}
if (userscorea < userscoreb) {
return "<a href='userinfo.html?username=" + data + "'><span class='label label-success'>" + data + "</span></a>";
return "<a href='#/userinfo?username=" + data + "'><span class='label label-success'>" + data + "</span></a>";
}
return "<a href='userinfo.html?username=" + data + "'><span class='label label-info'>" + data + "</span></a>";
return "<a href='#/userinfo?username=" + data + "'><span class='label label-info'>" + data + "</span></a>";
},
"targets": 1
},
......
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