|
@@ -1,8 +1,11 @@
|
|
|
import axios from "axios";
|
|
|
+import { useRoute } from 'vue-router'
|
|
|
|
|
|
-const BaseUrl =
|
|
|
- process.env.NODE_ENV === "production" ? process.env.VUE_APP_BASE_URL : "api/";
|
|
|
+// const BaseUrl =
|
|
|
+// process.env.NODE_ENV === "production" ? process.env.VUE_APP_BASE_URL : "api/";
|
|
|
|
|
|
export function get(url: string) {
|
|
|
+ const route = useRoute()
|
|
|
+ const BaseUrl = route.name === 'Share'? process.env.VUE_APP_BASE_URL:process.env.VUE_APP_TEST_BASE_URL
|
|
|
return axios.get(BaseUrl + url);
|
|
|
}
|