From 9df303041dc49dcd7b739310312d382a9b70d3cc Mon Sep 17 00:00:00 2001 From: Z Date: Wed, 2 Oct 2019 16:33:36 -0500 Subject: [PATCH] fixedplot --- mock/user.js | 2 +- src/api/user.js | 2 +- src/utils/request.js | 2 +- src/views/VueUploader/index.vue | 17 ++++------------- 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/mock/user.js b/mock/user.js index 9810b161..6310ff06 100644 --- a/mock/user.js +++ b/mock/user.js @@ -84,7 +84,7 @@ export default [ // plot prediction graph { - url: '/testpredict', + url: '/testpppredict', type: 'get', response: _ => { return { diff --git a/src/api/user.js b/src/api/user.js index 883e00b8..429b7c46 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -29,7 +29,7 @@ export function sendAnalyzeRequest(token) { return request({ url: '/testpredict', method: 'get', - // baseURL: 'http://localhost:8010', + baseURL: 'http://localhost:8010', // authorization: token, // params: { token } }) diff --git a/src/utils/request.js b/src/utils/request.js index 1b76a5d1..d3b97ca8 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -7,7 +7,7 @@ import { getToken } from '@/utils/auth' const service = axios.create({ baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url // withCredentials: true, // send cookies when cross-domain requests - timeout: 5000 // request timeout + timeout: 5000000 // request timeout }) // request interceptor diff --git a/src/views/VueUploader/index.vue b/src/views/VueUploader/index.vue index 9a071405..44a33f94 100644 --- a/src/views/VueUploader/index.vue +++ b/src/views/VueUploader/index.vue @@ -538,24 +538,15 @@ export default { this.listLoading = true sendAnalyzeRequest().then(response => { var token = response['token'] - var para = response['future'] + var future = response['future'] + var past = response['past'] // if the response from the server indicating that it's running the analysis, then redirect to a loading view if (token == 'success') { // this.$router.push({ name: "plot" }) this.$router.push({ name: "plotTest", params: { - past: { - yAxisData: [100, 120, 161, 134, 105, 160, 165, 190,200,250], - xAxisData: ['2019-7-13', '2019-7-14', '2019-7-15', '2019-7-16', '2019-7-17', '2019-7-18', '2019-7-19', '2019-7-20','2019-7-21','2019-7-22'] , - label: 'Past', - colorPicked: '#999997' - }, - future: { - yAxisData: [260, 230, 270, 285, 295, 300, 310,330], - xAxisData: ['2019-8-13', '2019-8-14', '2019-8-15', '2019-8-16', '2019-8-17', '2019-8-18', '2019-8-19', '2019-8-20'] , - label: 'Future', - colorPicked: '#519e19' - } + past, + future }}) } })