From 6551cca7b2ebe63b618530e927f006489e52c69c Mon Sep 17 00:00:00 2001 From: weijianli Date: Fri, 13 Sep 2019 17:46:50 -0500 Subject: [PATCH] update plot --- src/utils/request.js | 4 ++-- src/views/VueUploader/index.vue | 12 +++++++----- src/views/plot/plot.vue | 9 +++++++++ 3 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 src/views/plot/plot.vue 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..705d4a5c 100644 --- a/src/views/VueUploader/index.vue +++ b/src/views/VueUploader/index.vue @@ -532,12 +532,14 @@ export default { this.$router.push({ name: "analyze" }) this.listLoading = true sendAnalyzeRequest().then(response => { - console.log("success!") - this.list = response.data.items - this.listLoading = false + // console.log("success!") + // this.list = response.data.items + // this.listLoading = false + var token = response['token'] + // if the response from the server indicating that it's running the analysis, then redirect to a loading view - if (this.list.indexOf('anylyzing') >= 0) { - // this.$router.push('@/views/Analyzing/analyzing') + if (token == 'success') { + this.$router.push({ name: "plot" }) // sendAnalyzeRequest().then(response => { // this.list = response.data.items diff --git a/src/views/plot/plot.vue b/src/views/plot/plot.vue new file mode 100644 index 00000000..b85df477 --- /dev/null +++ b/src/views/plot/plot.vue @@ -0,0 +1,9 @@ + + + \ No newline at end of file