From 3f957f1b2edf8ad7e35f6c3f64b47f7704fa366d Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Tue, 08 Mar 2022 11:18:08 +0800
Subject: [PATCH] 二维码参数更改,左侧实景,监控更改
---
src/router/axios.js | 74 ++++++++++++++++++------------------
1 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/src/router/axios.js b/src/router/axios.js
index e0a4d55..93c7de0 100644
--- a/src/router/axios.js
+++ b/src/router/axios.js
@@ -5,58 +5,58 @@
* isSerialize是否开启form表单提交
* isToken是否需要token
*/
-import axios from "axios";
-let httpName = window.location.protocol + "//" + window.location.hostname;
-let url = httpName + "/apis";
+import axios from 'axios'
+const httpName = window.location.protocol + '//' + window.location.hostname
+const url = httpName + '/apis'
// setTimeout(() => {
// console.log(window.location);
// console.log(url);
// }, 3000);
-window.$apiUrls = "http://171.34.197.243:782";
-// window.$apiUrls = "http://192.168.0.110:82";
+// window.$apiUrls = "http://171.34.197.243:782";
+window.$apiUrls = 'http://192.168.0.110:82'
const service = axios.create({
- // baseURL: 'http://192.168.0.107:83',
+ // baseURL: 'http://192.168.0.107:83',
- // baseURL: "http://localhost:82",
- // baseURL: "http://192.168.0.107:82",
- // baseURL: "http://192.168.0.107:80",
- // baseURL: "http://192.168.0.110:82", //唐
- // baseURL: "http://171.34.197.243:790", //正常接口
- baseURL: window.$apiUrls, //2
- // baseURL: "http://171.34.197.243:82", //3
- // baseURL: "http://171.34.197.243:82/api", //验收
- // baseURL: "https://6e78efa6.cpolar.io/apis", //https接口
- // baseURL: url, //https接口
- // baseURL: 'http://s16s652780.51mypc.cn/api',
- timeout: 600000, // request timeout
-});
+ // baseURL: "http://localhost:82",
+ // baseURL: "http://192.168.0.107:82",
+ // baseURL: "http://192.168.0.107:80",
+ // baseURL: "http://192.168.0.110:82", //唐
+ // baseURL: "http://171.34.197.243:790", //正常接口
+ baseURL: window.$apiUrls, // 2
+ // baseURL: "http://171.34.197.243:82", //3
+ // baseURL: "http://171.34.197.243:82/api", //验收
+ // baseURL: "https://6e78efa6.cpolar.io/apis", //https接口
+ // baseURL: url, //https接口
+ // baseURL: 'http://s16s652780.51mypc.cn/api',
+ timeout: 600000 // request timeout
+})
// 返回其他状态码
service.defaults.validateStatus = function (status) {
- return status >= 200 && status <= 500;
-};
+ return status >= 200 && status <= 500
+}
// 跨域请求,允许保存cookie
-service.defaults.withCredentials = true;
+service.defaults.withCredentials = true
// http request拦截
service.interceptors.request.use(
- (config) => {
- return config;
- },
- (error) => {
- return Promise.reject(error);
- }
-);
+ (config) => {
+ return config
+ },
+ (error) => {
+ return Promise.reject(error)
+ }
+)
// http response 拦截
service.interceptors.response.use(
- (res) => {
- return res;
- },
- (error) => {
- return Promise.reject(new Error(error));
- }
-);
+ (res) => {
+ return res
+ },
+ (error) => {
+ return Promise.reject(new Error(error))
+ }
+)
-export default service;
\ No newline at end of file
+export default service
--
Gitblit v1.9.3