From e2e420e6998d5f4814f13822a0e98b580f5fe331 Mon Sep 17 00:00:00 2001 From: yma16 <17685043634@163.com> Date: Sun, 24 Jul 2022 23:37:58 +0800 Subject: [PATCH] =?UTF-8?q?perf:=E6=94=B9=E8=BF=9Baxios=E5=92=8C=E8=B7=AF?= =?UTF-8?q?=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Article.vue | 5 +- src/components/Csslearn.vue | 3 +- src/components/Mavoneditor.vue | 98 +++++++++++++----------------- src/components/Onlinewebsocket.vue | 13 ++-- src/components/Register.vue | 3 +- src/cookieoption/index.js | 34 +++++------ src/echarts/Map.vue | 11 ++-- src/importElement.js | 4 +- src/main.js | 17 ++++-- src/plugins/axios.js | 58 +++++++++--------- src/router/index.js | 85 ++++++++++++-------------- src/store/index.js | 23 +++---- src/store/modules/user.js | 66 ++++++++++---------- 13 files changed, 203 insertions(+), 217 deletions(-) diff --git a/src/components/Article.vue b/src/components/Article.vue index f170dbf..5d52ca6 100644 --- a/src/components/Article.vue +++ b/src/components/Article.vue @@ -217,7 +217,6 @@ import Email from '@/components/email/Email' import VueMarkdown from 'vue-markdown' import ArticleComment from '@/comment/ArticleComment' import EchartWeather from '@/weather/EchartWeather' -import axios from 'axios' export default { components: { VueMarkdown, // 显示markdown的组件 @@ -447,7 +446,7 @@ export default { parseInt(page + (that.currentPage - 1) * that.splitLength) ] // 提交数据 page从0开始 - axios + that.$axios .post(that.baseurl + 'article/index/', { value: page + (that.currentPage - 1) * that.splitLength // 传入索引 @@ -475,7 +474,7 @@ export default { created: function () { // 初始化 let that = this - axios + that.$axios .get(that.baseurl + 'article/index/') .then((res) => { let resdata = res.data diff --git a/src/components/Csslearn.vue b/src/components/Csslearn.vue index c4597ac..fc6f9c2 100644 --- a/src/components/Csslearn.vue +++ b/src/components/Csslearn.vue @@ -28,7 +28,6 @@