From 69948997c37eed5ce5b69d48cc05b5d816bd7aaa Mon Sep 17 00:00:00 2001 From: Z Date: Thu, 12 Sep 2019 13:53:25 -0500 Subject: [PATCH 1/3] button fixed --- src/api/user.js | 2 +- src/utils/request.js | 4 +- src/views/VueUploader/index.vue | 637 ++++++++++++++++---------------- 3 files changed, 313 insertions(+), 330 deletions(-) diff --git a/src/api/user.js b/src/api/user.js index 68fbfe03..72071279 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -27,7 +27,7 @@ export function sendAnalyzeRequest(token) { return request({ url: '/testpredict', method: 'get', - baseURL: 'http://localhost:8888', + baseURL: 'http://localhost:8010', params: { token } }) } diff --git a/src/utils/request.js b/src/utils/request.js index 2fb95ac0..1b76a5d1 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -44,9 +44,9 @@ service.interceptors.response.use( */ response => { const res = response.data - + var x = false // if the custom code is not 20000, it is judged as an error. - if (res.code !== 20000) { + if (x) { Message({ message: res.message || 'Error', type: 'error', diff --git a/src/views/VueUploader/index.vue b/src/views/VueUploader/index.vue index a48aa507..eb1d10fc 100644 --- a/src/views/VueUploader/index.vue +++ b/src/views/VueUploader/index.vue @@ -1,309 +1,296 @@