From f3ae839fea5c5fc64798ff54bce6f9b0eb022350 Mon Sep 17 00:00:00 2001 From: zeus Date: Wed, 13 Jan 2021 13:53:30 +0200 Subject: [PATCH] http changes --- src/store/modules/create_pipelineLLO.js | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/store/modules/create_pipelineLLO.js b/src/store/modules/create_pipelineLLO.js index 63b74c8..0822dad 100644 --- a/src/store/modules/create_pipelineLLO.js +++ b/src/store/modules/create_pipelineLLO.js @@ -1,6 +1,7 @@ import { mapState, mapActions, commit } from 'vuex' import store from '@/store/index' import axios from 'axios' +import {ApiConfig} from "@/config/index"; export default { namespaced: true, @@ -58,7 +59,9 @@ export default { var options = { headers: { 'content-type': 'application/x-www-form-urlencoded',Authorization: `Bearer ${token}` }, }; - var p = await axios.post('http://localhost:8084/run',params,options); + var sock_server_l = ApiConfig.url_80+'/run' + var p = await axios.post(sock_server_l,params,options); + //var p = await axios.post('http://localhost:8084/run',params,options); //console.log(value.token) //console.log(value.swarmlabname) console.log(JSON.stringify(p)) @@ -160,7 +163,9 @@ export default { params: params, headers: { 'content-type': 'application/x-www-form-urlencoded',Authorization: `Bearer ${token}` }, }; - var p = await axios.get('https://localhost:3000/getservicesinfo',options); + var sock_server_l = ApiConfig.url_80+'/getservicesinfo' + var p = await axios.get(sock_server_l,options); + //var p = await axios.get('https://localhost:3000/getservicesinfo',options); return p //console.log(JSON.stringify(p)) //console.log(value.token) @@ -189,7 +194,9 @@ export default { params: params, headers: { 'content-type': 'application/x-www-form-urlencoded',Authorization: `Bearer ${token}` }, }; - var p = await axios.get('https://localhost:3000/getservicesstatus',options); + var sock_server_l = ApiConfig.url_80+'/getservicesstatus' + var p = await axios.get(sock_server_l,options); + //var p = await axios.get('https://localhost:3000/getservicesstatus',options); return p } catch (e) { if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){ @@ -216,7 +223,9 @@ export default { params: params, headers: { 'content-type': 'application/x-www-form-urlencoded',Authorization: `Bearer ${token}` }, }; - var p = await axios.get('https://localhost:3000/create_config',options); + var sock_server_l = ApiConfig.url_80+'/create_config' + var p = await axios.get(sock_server_l,options); + //var p = await axios.get('https://localhost:3000/create_config',options); return p } catch (e) { if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){ @@ -244,7 +253,9 @@ export default { params: params, headers: { 'content-type': 'application/x-www-form-urlencoded',Authorization: `Bearer ${token}` }, }; - var p = await axios.get('https://localhost:3000/get_config',options); + var sock_server_l = ApiConfig.url_80+'/get_config' + var p = await axios.get(sock_server_l,options); + //var p = await axios.get('https://localhost:3000/get_config',options); return p } catch (e) { if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){