From ef8cb3c8e76e065c4e72174abf9d9b305081cd26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=9D=A8?= <1711467488@qq.com> Date: Thu, 25 Jan 2018 08:00:48 +0800 Subject: [PATCH] no message Former-commit-id: 3c8b725b82460ee3a1b5c2ff54bdd8e6d78b63c0 Former-commit-id: 3ad6a05be509ffe7268381c01c32074662f0d0af Former-commit-id: 6a8bc07bb5bd109d413d40743c0b0751fcd09caa --- src/components/core/Markdown/index.vue | 2 +- src/pages/core/login/index.vue | 2 +- src/pages/demo/plugins/marked/demo.vue | 2 +- src/pages/demo/plugins/marked/demoHighlight.vue | 2 +- src/pages/demo/plugins/mock/ajax.vue | 2 +- src/plugin/axios/index.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/core/Markdown/index.vue b/src/components/core/Markdown/index.vue index 7444ee4b..e0fe13ea 100644 --- a/src/components/core/Markdown/index.vue +++ b/src/components/core/Markdown/index.vue @@ -50,7 +50,7 @@ export default { }, // 从 url 加载原始数据 async getReadme (name) { - const { data } = await this.$axios.get(name) + const { data } = await this.$http.get(name) return this.marked(data) }, marked (data) { diff --git a/src/pages/core/login/index.vue b/src/pages/core/login/index.vue index 9b6a141e..54f2177d 100644 --- a/src/pages/core/login/index.vue +++ b/src/pages/core/login/index.vue @@ -62,7 +62,7 @@ export default { submit () { this.$refs.loginForm.validate((valid) => { if (valid) { - this.$axios({ + this.$http({ method: 'post', url: '/login', data: { diff --git a/src/pages/demo/plugins/marked/demo.vue b/src/pages/demo/plugins/marked/demo.vue index e363eac7..e8667360 100644 --- a/src/pages/demo/plugins/marked/demo.vue +++ b/src/pages/demo/plugins/marked/demo.vue @@ -36,7 +36,7 @@ export default { }, methods: { async getReadme () { - const { data } = await this.$axios.get('/static/markdownFiles/demo/baseMarkdowmFile.md') + const { data } = await this.$http.get('/static/markdownFiles/demo/baseMarkdowmFile.md') return data } } diff --git a/src/pages/demo/plugins/marked/demoHighlight.vue b/src/pages/demo/plugins/marked/demoHighlight.vue index 63bcb5e8..9140b569 100644 --- a/src/pages/demo/plugins/marked/demoHighlight.vue +++ b/src/pages/demo/plugins/marked/demoHighlight.vue @@ -41,7 +41,7 @@ export default { }, methods: { async getReadme () { - const { data } = await this.$axios.get('/static/markdownFiles/demo/baseMarkdowmFile.md') + const { data } = await this.$http.get('/static/markdownFiles/demo/baseMarkdowmFile.md') return data } } diff --git a/src/pages/demo/plugins/mock/ajax.vue b/src/pages/demo/plugins/mock/ajax.vue index 76320878..186e5a67 100644 --- a/src/pages/demo/plugins/mock/ajax.vue +++ b/src/pages/demo/plugins/mock/ajax.vue @@ -32,7 +32,7 @@ export default { }, methods: { ajax () { - this.$axios.get('/api/demo/001') + this.$http.get('/api/demo/001') .then(res => { this.table.columns = Object.keys(res.data.list[0]).map(e => ({ label: e, diff --git a/src/plugin/axios/index.js b/src/plugin/axios/index.js index f35017fa..fea36023 100644 --- a/src/plugin/axios/index.js +++ b/src/plugin/axios/index.js @@ -1,4 +1,4 @@ import Vue from 'vue' import axios from 'axios' -Vue.prototype.$axios = axios +Vue.prototype.$http = axios