|
@@ -1,23 +1,8 @@
|
|
|
import axios from "axios"
|
|
|
import mockData from "../input-data/data3.js";
|
|
|
|
|
|
-let AJAX_ORIGIN = ''
|
|
|
-switch (process.env.NODE_ENV) {
|
|
|
- case 'development':
|
|
|
- AJAX_ORIGIN = 'https://uat-laser.4dkankan.com/'
|
|
|
- break;
|
|
|
- case 'production':
|
|
|
- AJAX_ORIGIN = 'https://uat-laser.4dkankan.com/'
|
|
|
- // AJAX_ORIGIN = 'https://laser.4dkankan.com/backend/'
|
|
|
-
|
|
|
- break;
|
|
|
- default:
|
|
|
- AJAX_ORIGIN = ''
|
|
|
- break;
|
|
|
-}
|
|
|
-
|
|
|
export function getWholeData(sceneCode) {
|
|
|
- let url = `${AJAX_ORIGIN}laser/route/${sceneCode}/getRouteInfo`
|
|
|
+ let url = `${process.env.VUE_APP_API_URL_PREFIX}laser/route/${sceneCode}/getRouteInfo`
|
|
|
return axios
|
|
|
.get(url)
|
|
|
.then((res) => {
|
|
@@ -30,7 +15,7 @@ export function getWholeData(sceneCode) {
|
|
|
}
|
|
|
|
|
|
export function uploadWholeData(sceneCode, wholeData) {
|
|
|
- let url = `${AJAX_ORIGIN}laser/route/${sceneCode}/editRouteInfo`
|
|
|
+ let url = `${process.env.VUE_APP_API_URL_PREFIX}laser/route/${sceneCode}/editRouteInfo`
|
|
|
return axios
|
|
|
.post(url, {
|
|
|
list: wholeData,
|
|
@@ -44,7 +29,7 @@ export function uploadWholeData(sceneCode, wholeData) {
|
|
|
}
|
|
|
|
|
|
export function resetWholeData(sceneCode) {
|
|
|
- let url = `${AJAX_ORIGIN}laser/route/resetRouteInfo/${sceneCode}`
|
|
|
+ let url = `${process.env.VUE_APP_API_URL_PREFIX}laser/route/resetRouteInfo/${sceneCode}`
|
|
|
return axios
|
|
|
.get(url).then((res) => {
|
|
|
if (res?.data?.code === 200) {
|