riku
2023-12-18 356f54467f525f437f41271fb62f6be66f2ab1e5
src/api/index.js
@@ -9,7 +9,7 @@
let ip2_file = 'https://fyami.com.cn/';
if (debug) {
  // ip1 = 'http://192.168.0.123:8082/';
  ip1 = 'http://192.168.0.138:8082/';
  // ip1_file = 'http://47.100.191.150:9005/';
  ip2 = 'http://192.168.0.138:8080/';
  // ip2_file = 'https://fyami.com.cn/';
@@ -20,7 +20,7 @@
//飞羽监管
const $fysp = axios.create({
  baseURL: ip1,
  timeout: 10000,
  timeout: 10000
});
$fysp.imgUrl = `${ip1_file}images/`;
$fysp.downloadUrl = `${ip1_file}files/`;
@@ -28,7 +28,7 @@
//飞羽环境
const $fytz = axios.create({
  baseURL: ip2,
  timeout: 10000,
  timeout: 10000
});
$fytz.imgUrl = `${ip2_file}images/`;
@@ -51,7 +51,7 @@
      console.log(error);
      ElMessage({
        message: error,
        type: 'error',
        type: 'error'
      });
      return Promise.reject(error);
    }
@@ -65,17 +65,18 @@
      console.log(response);
      console.log('==>请求结束');
      if (response.status == 200) {
        if (
          response.data.success != undefined &&
          response.data.success != null
        ) {
        if (response.data.success != undefined && response.data.success != null) {
          if (response.data.success == true) {
            return response;
            return response.data;
          } else {
            ElMessage({
              message: response.data.message,
              type: 'error'
            });
            return Promise.reject(response.data.message);
          }
        } else {
          return response;
          return response.data;
        }
      } else {
        return Promise.reject(response);
@@ -88,7 +89,7 @@
      console.log('==>请求结束');
      ElMessage({
        message: error,
        type: 'error',
        type: 'error'
      });
      return Promise.reject(error);
    }