wq před 2 roky
rodič
revize
0b76a27c17
3 změnil soubory, kde provedl 22 přidání a 27 odebrání
  1. 4
    2
      datas/fileURL.js
  2. 15
    2
      utils/network/api.js
  3. 3
    23
      utils/network/request.js

+ 4
- 2
datas/fileURL.js Zobrazit soubor

@@ -1,4 +1,6 @@
import { envs } from '@/utils/network/api.js'

// export const fileURL = 'http://47.94.96.52/'
// export const fileURL = 'http://222.85.144.89:19002/default-bucket/'
export const downloadFileURL = 'http://192.168.100.63:8087/user-export-excel/'
export const fileURL = 'http://192.168.100.63:8087/default-bucket/'
export const downloadFileURL = 'http://'+ envs[process.env.NODE_ENV].baseUrl +':8087/user-export-excel/'
export const fileURL = 'http://'+ envs[process.env.NODE_ENV].baseUrl +':8087/default-bucket/'

+ 15
- 2
utils/network/api.js Zobrazit soubor

@@ -1,4 +1,19 @@
/* 接口中常量 */
export const URL = "192.168.100.63";
/**
* 配置信息,针对不同的平台进行配置
*/
export const envs = {
//开发环境配置
development: {
baseUrl: "192.168.100.63",
},
//生产环境配置
production: {
baseUrl: "222.85.144.89",
}
}
export const appId = "52030131"; //应用appid 综合业务支撑平台使用
export const loginTime = 86400; //登录有效时间(单位s) 1天
export const wechatPayConfigId = "6a9a54bc01f6443faea7ffe132b19f6"; //支付配置编号 微信小程序支付
@@ -162,8 +177,6 @@ export const quanConfirm = "72"; //圈存确认
export const deviceUpgrade = "896"//BDS-设备升级接口
export const cardModifyConfirm = "898" //ASS-卡信息变更确认
export const pinCodeUnlock = "862" //ASS-卡PIN解锁


//公务车
export const gongWuChefindFormatVehicleInfo = "507"; //制式警车信息查询 ,只用于同步IF01001202206010854

+ 3
- 23
utils/network/request.js Zobrazit soubor

@@ -1,5 +1,5 @@
import {
appId
appId,envs
} from "./api";
import {
encryption
@@ -11,28 +11,12 @@ import {
import {
sm4Key
} from "../network/api.js";
// 引入 sm-crypto 库

import {
SM4Util
} from '../util/sm4.js'
const s4 = new SM4Util()
/**
* 配置信息,针对不同的平台进行配置
*/
const envs = {
//开发环境配置
development: {
baseUrl: "http://192.168.100.63:8087/ifzt/api/interfaceMidGroundIn",
},
//生产环境配置 https://testzeus.etcjz.cn/api/common/transmit/v1/send/zt
production: {
baseUrl: "https://testzeus.etcjz.cn/api/common/transmit/v1/send/zt",
}
}

//https://etcfile.etcjz.cn 文件服务器
//公参
//请求
export function request(code, options = {}) {
//公参
const Common = {
@@ -44,9 +28,7 @@ export function request(code, options = {}) {
loginSource: "69af303ba2eb4608a099163f0d2a5dbd"
}
//Url 地址
//options.url = envs[process.env.NODE_ENV].baseUrl || '' + options.url
options.url = 'http://192.168.100.63:8087/ifzt/api/interfaceMidGroundIn'
// options.url = 'http://222.85.144.89:19002/ifzt/api/interfaceMidGroundIn'
options.url = 'http://'+ envs[process.env.NODE_ENV].baseUrl +':8087/ifzt/api/interfaceMidGroundIn'
//判断baseUri是否为空
if (options.baseUrl) {
options.url = options.baseUrl
@@ -72,7 +54,6 @@ export function request(code, options = {}) {
'appId': appId
}), 2);
}

//是否显示加载中
if (options.showLoading) {
wx.showLoading({
@@ -80,7 +61,6 @@ export function request(code, options = {}) {
mask: true
});
}

//参数返回
return new Promise((resolve, reject) => {
options.success = (res) => {

Načítá se…
Zrušit
Uložit