Commit b7768e2e authored by ganjingcun's avatar ganjingcun

deck demo

parent bc44545b
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
"element-ui": "^1.2.8", "element-ui": "^1.2.8",
"moment": "^2.18.1", "moment": "^2.18.1",
"shelljs": "^0.7.7", "shelljs": "^0.7.7",
"swiper": "^3.4.2",
"vue": "^2.2.2", "vue": "^2.2.2",
"vue-resource": "^1.3.1", "vue-resource": "^1.3.1",
"vue-router": "^2.2.0", "vue-router": "^2.2.0",
......
...@@ -10,6 +10,14 @@ const URL = "https://api.mycard.moe/ygopro/arena" ...@@ -10,6 +10,14 @@ const URL = "https://api.mycard.moe/ygopro/arena"
export default class Api { export default class Api {
static uploadUrl = `${URL}/upload`
static getDownloadUrl(url) {
url = url.slice(7)
var downloadUrl = `${URL}/download/${url}`
return downloadUrl
}
static getCount(opt) { static getCount(opt) {
var request = query.stringify(opt); var request = query.stringify(opt);
const url = `${config.COUNTER_URL}?${request}`; const url = `${config.COUNTER_URL}?${request}`;
...@@ -47,14 +55,17 @@ export default class Api { ...@@ -47,14 +55,17 @@ export default class Api {
} }
static getDeckInfo(opt) { static getDeckInfo(opt) {
var tmp = "http://localhost:3000/api"
return Vue.http.get(`${URL}/deckinfo`, { 'params': opt }); return Vue.http.get(`${URL}/deckinfo`, { 'params': opt });
} }
static saveDeck(opt) { static saveDeck(opt) {
var tmp = "http://localhost:3000/api"
const url = `${URL}/deckinfo` const url = `${URL}/deckinfo`
return Vue.http.post(url, opt, { 'emulateJSON': true }); return Vue.http.post(url, opt, { 'emulateJSON': true });
} }
static saveDeckDemo(opt) {
const url = `${URL}/deckdemo`
return Vue.http.post(url, opt, { 'emulateJSON': true });
}
} }
This diff is collapsed.
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