From cb44a3caa6c1f067fe1b96c63b3e45a831bc9fb5 Mon Sep 17 00:00:00 2001 From: caohongqing Date: Thu, 16 May 2019 10:38:14 +0800 Subject: [PATCH] test --- src/router.js | 1 - src/views/app/index.vue | 2 +- src/views/data/dcontent/index.vue | 2 +- src/views/data/dleft/index.vue | 2 +- src/views/data/index.vue | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/router.js b/src/router.js index fbd8093..71ab874 100644 --- a/src/router.js +++ b/src/router.js @@ -6,7 +6,6 @@ import data from "@/views/data"; Vue.use(Router); export default new Router({ - mode: "history", base: process.env.BASE_URL, routes: [ { diff --git a/src/views/app/index.vue b/src/views/app/index.vue index bf7afce..727d79c 100644 --- a/src/views/app/index.vue +++ b/src/views/app/index.vue @@ -126,7 +126,7 @@ export default { return; } else { this.$axios - .get("/api/users/" + name) + .get("https://api.github.com/users/" + name) .then(response => { let res = JSON.parse(JSON.stringify(response)); if (res.status === 200) { diff --git a/src/views/data/dcontent/index.vue b/src/views/data/dcontent/index.vue index eb88a18..d361078 100644 --- a/src/views/data/dcontent/index.vue +++ b/src/views/data/dcontent/index.vue @@ -121,7 +121,7 @@ export default { }, methods: { getData(username) { - let comUrl = "/api/users/"; + let comUrl = "https://api.github.com/users/"; let url1 = comUrl + username + "/events"; let url2 = comUrl + username + "/repos"; this.$axios diff --git a/src/views/data/dleft/index.vue b/src/views/data/dleft/index.vue index 27ef1d4..3c825e1 100644 --- a/src/views/data/dleft/index.vue +++ b/src/views/data/dleft/index.vue @@ -79,7 +79,7 @@ export default { methods: { getData(username) { this.$axios - .get("/api/users/" + username + "/repos") + .get("https://api.github.com/users/" + username + "/repos") .then(response => { let data = JSON.parse(JSON.stringify(response.data)); if (data.length < 1) { diff --git a/src/views/data/index.vue b/src/views/data/index.vue index 122c271..ac708d6 100644 --- a/src/views/data/index.vue +++ b/src/views/data/index.vue @@ -51,7 +51,7 @@ export default { methods: { getData(username) { this.$axios - .get("/api/users/" + username) + .get("https://api.github.com/users/" + username) .then(response => { let res = JSON.parse(JSON.stringify(response)); if (res.status === 200) {