fix: BUG修改
This commit is contained in:
parent
4601ae3873
commit
fc7ae92eaf
@ -10,9 +10,97 @@ Vue.prototype.$http = axios
|
||||
// Vue.use(ElementUI)
|
||||
var loading
|
||||
let needLoadingRequestCount = 0
|
||||
let showLoadingConfig = ''
|
||||
var COMPANY = ''
|
||||
|
||||
|
||||
export function showFullScreenLoading() {
|
||||
if (needLoadingRequestCount === 0) {
|
||||
startLoading()
|
||||
}
|
||||
needLoadingRequestCount++
|
||||
}
|
||||
|
||||
export function tryHideFullScreenLoading() {
|
||||
if (needLoadingRequestCount <= 0) return
|
||||
needLoadingRequestCount--
|
||||
if (needLoadingRequestCount === 0) {
|
||||
endLoading()
|
||||
}
|
||||
}
|
||||
export function get(url, params, config) {
|
||||
url = url + '?lang=' + getLang()
|
||||
return new Promise((resolve, reject) => {
|
||||
axios
|
||||
.get(url, {
|
||||
params: params,
|
||||
})
|
||||
.then((res) => {
|
||||
if (
|
||||
res.config.url == '/xmgl/progressTask/downloadTemplate?lang=zh_CN'
|
||||
) {
|
||||
resolve(res.data)
|
||||
return
|
||||
}
|
||||
if (res.data.code == 200) {
|
||||
resolve(res.data)
|
||||
} else {
|
||||
Message.error(res.data.message)
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err.data)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* post方法,对应post请求
|
||||
* @param {String} url [请求的url地址]
|
||||
* @param {Object} params [请求时携带的参数]
|
||||
*/
|
||||
export function post(url, params, config) {
|
||||
url = url + '?lang=' + getLang()
|
||||
return new Promise((resolve, reject) => {
|
||||
axios
|
||||
.post(url, params)
|
||||
.then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
resolve(res.data)
|
||||
} else {
|
||||
if (res.data.status !== 'SUCCESS') {
|
||||
Message.error(res.data.message)
|
||||
} else {
|
||||
resolve(res.data)
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err.data)
|
||||
})
|
||||
})
|
||||
}
|
||||
/**
|
||||
* put方法,对应put请求
|
||||
* @param {String} url [请求的url地址]
|
||||
* @param {Object} params [请求时携带的参数]
|
||||
*/
|
||||
export function put(url, params, config) {
|
||||
url = url + '?lang=' + getLang()
|
||||
return new Promise((resolve, reject) => {
|
||||
axios
|
||||
.put(url, params)
|
||||
.then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
resolve(res.data)
|
||||
} else {
|
||||
Message.error(res.data.message)
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err.data)
|
||||
})
|
||||
})
|
||||
}
|
||||
function getLang() {
|
||||
let currentLanguage = store.state.currentLanguage
|
||||
let langParam = ''
|
||||
@ -84,7 +172,7 @@ if (process.env.NODE_ENV == "development") {
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:45011/' //上海优益(上海建工)
|
||||
// axios.defaults.baseURL = 'http://192.168.34.221:28888/' //郭圣雄本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.221:28889/' //郭圣雄本地
|
||||
// axios.defaults.baseURL = "http://192.168.34.221:9111/"; //郭圣雄本地
|
||||
axios.defaults.baseURL = "http://192.168.34.221:9111/"; //郭圣雄本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
|
||||
// axios.defaults.baseURL = 'http://182.90.224.237:51234' //郭圣雄远程
|
||||
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:61212/' //彭洁远程
|
||||
@ -95,7 +183,7 @@ if (process.env.NODE_ENV == "development") {
|
||||
// axios.defaults.baseURL = 'http://125.88.207.86:8099/'//中建四局(沙湖)线上(最新)地址
|
||||
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:15551/'//测试地址
|
||||
// axios.defaults.baseURL = 'http://47.93.215.234:9809/'//鞍钢正式地址(弃用)
|
||||
axios.defaults.baseURL = 'http://42.180.188.17:9809/'//鞍钢正式地址
|
||||
// axios.defaults.baseURL = 'http://42.180.188.17:9809/'//鞍钢正式地址
|
||||
// axios.defaults.baseURL = 'http://47.93.215.234:11211/'//鞍钢测试地址(弃用)
|
||||
// axios.defaults.baseURL = 'http://42.180.188.17:11211/' //鞍钢测试地址
|
||||
// axios.defaults.baseURL = 'http://8.136.222.164:8808/'//中科安信正式地址
|
||||
@ -109,88 +197,6 @@ if (process.env.NODE_ENV == "development") {
|
||||
// axios.defaults.baseURL ='http://192.168.34.216:6023/'
|
||||
// axios.defaults.baseURL = window.location.protocol + "//" + host.split(":")[0] + ":6023" + "/"
|
||||
// axios.defaults.baseURL = 'http://zhgd.loganwy.com/`'
|
||||
if (process.env.NODE_ENV == 'development') {
|
||||
// axios.defaults.baseURL = 'http://8.142.139.165:7080' // 湖里区
|
||||
// axios.defaults.baseURL = 'http://124.71.87.250/'
|
||||
// axios.defaults.baseURL = 'http://139.9.66.234:30/'
|
||||
// axios.defaults.baseURL = 'http://14.29.220.211:6023/'
|
||||
// axios.defaults.baseURL = 'https://zhgd.loganwy.com/' //龙光
|
||||
// axios.defaults.baseURL = 'https://zhgd-uat.logan.com.cn/'
|
||||
// axios.defaults.baseURL = 'http://36.137.53.203:9090/' // 南昌地铁 17512009894 123456789 gdjt 87654321
|
||||
// axios.defaults.baseURL = 'http://192.168.34.125:6023/'
|
||||
// axios.defaults.baseURL = 'http://124.71.178.44:100/' // 河南
|
||||
// tag: 本地
|
||||
// axios.defaults.baseURL = 'http://139.9.66.234:6324/' // 河南春笋
|
||||
// axios.defaults.baseURL ='http://124.71.67.160:8088/' //中建四局线上(旧)地址
|
||||
// axios.defaults.baseURL ='http://47.97.202.104:6023/' //金林湾线上旧
|
||||
// axios.defaults.baseURL = 'http://47.97.202.104:6023/';
|
||||
// axios.defaults.baseURL = 'http://139.9.66.234:8/';
|
||||
// axios.defaults.baseURL = 'http://120.196.217.6:7000/'; // 鹤洲
|
||||
// axios.defaults.baseURL = 'http://182.90.224.237:7000/'; // 广西
|
||||
// axios.defaults.baseURL = 'http://120.196.217.6:7000/' //鹤洲
|
||||
// axios.defaults.baseURL = 'http://117.156.17.59:9090/'; //
|
||||
// axios.defaults.baseURL = 'http://120.236.247.200:9000/'; //横琴线上
|
||||
// axios.defaults.baseURL = 'http://223.82.100.80:9000/'; //南昌地铁
|
||||
// axios.defaults.baseURL = 'http://139.9.66.234:40001/'; //南昌地铁二期
|
||||
// axios.defaults.baseURL = 'http://124.71.178.44:30/';
|
||||
// axios.defaults.baseURL = 'http://192.168.34.125:9090/';
|
||||
// axios.defaults.baseURL = 'http://192.168.88.220:6023/';
|
||||
// axios.defaults.baseURL = 'http://124.71.178.44:9000/'; //中建 cscec101 123456
|
||||
// axios.defaults.baseURL = 'https://jk.cscec1b1.com:5138/';//沃尔
|
||||
// axios.defaults.baseURL = 'http://61.190.32.219:9050/'
|
||||
// axios.defaults.baseURL = 'http://183.95.84.54:5800/'//合展-宿迁 zxsd 123456
|
||||
// axios.defaults.baseURL = 'http://183.95.84.54:9500/'//贵州-敏尚 17512075572 123456
|
||||
// axios.defaults.baseURL = 'http://183.95.84.34:7185/' //测试服
|
||||
// axios.defaults.baseURL = 'http://183.60.227.61:30246/'
|
||||
// axios.defaults.baseURL = 'http://183.60.227.61:30249/' //测试服2
|
||||
// axios.defaults.baseURL = 'http://183.60.227.61:20561/' //龙光地产 龙光地产 123456
|
||||
// axios.defaults.baseURL = 'http://218.92.215.138:9090/' //盐城 新佳城小区 123456
|
||||
// axios.defaults.baseURL = 'http://36.137.53.203:9090/' //盐城 gdjt 123456789
|
||||
// axios.defaults.baseURL = 'http://183.234.150.152:9090/' //华发 huaxin 123456789
|
||||
// axios.defaults.baseURL = 'http://182.90.224.147:18170' //瑞士恒通线上
|
||||
// axios.defaults.baseURL = 'http://58.250.210.9:9090/' //深汕线上
|
||||
// axios.defaults.baseURL = 'http://101.43.164.214:12345/'//内蒙古线上
|
||||
// axios.defaults.baseURL = 'http://121.196.214.246/api/'//金林湾线上新
|
||||
// axios.defaults.baseURL = 'http://42.194.144.62:8088/'//中建四局线上(新)地址
|
||||
// axios.defaults.baseURL = 'http://101.43.164.214:12350/'//中建五局线上
|
||||
// axios.defaults.baseURL = 'http://182.90.224.147:15551/'//港投(成润)项目线上(1)
|
||||
// axios.defaults.baseURL = 'http://118.121.198.147:23232/'//港投(成润)正式
|
||||
// axios.defaults.baseURL ='http://jxj.zhgdyun.com:100/' //演示平台/·
|
||||
// axios.defaults.baseURL ='http://192.168.34.221:8188/' //郭圣雄本地
|
||||
// axios.defaults.baseURL ='http://192.168.34.221:30001/' //郭圣雄本地
|
||||
// axios.defaults.baseURL ='http://192.168.34.221:12350/' //金林湾本地
|
||||
// axios.defaults.baseURL ='http://42.194.144.62:8099/' //坪山沙湖
|
||||
// axios.defaults.baseURL ='http://125.88.207.86:8099/' //坪山沙湖(最新)地址
|
||||
// axios.defaults.baseURL ='http://huli.zjzhiliao.com/jxjgdapi/' //金林湾测试线上
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:45001/' //上海张江
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:45011/' //上海优益(上海建工)
|
||||
// axios.defaults.baseURL = 'http://192.168.34.221:28888/' //郭圣雄本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.221:28889/' //郭圣雄本地
|
||||
axios.defaults.baseURL = 'http://192.168.34.221:9111/' //郭圣雄本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
|
||||
// axios.defaults.baseURL = 'http://182.90.224.237:51234' //郭圣雄远程
|
||||
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:61212/' //彭洁远程
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈
|
||||
// axios.defaults.baseURL ='http://183.249.224.118:9000/' //嘉兴王江泾公用码头
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:11111/' // 百色三标段项目
|
||||
// axios.defaults.baseURL = 'http://125.88.207.86:8088/'//中建四局线上(最新)地址
|
||||
// axios.defaults.baseURL = 'http://125.88.207.86:8099/'//中建四局(沙湖)线上(最新)地址
|
||||
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:15551/'//测试地址
|
||||
// axios.defaults.baseURL = 'http://47.93.215.234:9809/'//鞍钢正式地址(弃用)
|
||||
// axios.defaults.baseURL = 'http://42.180.188.17:9809/'//鞍钢正式地址
|
||||
// axios.defaults.baseURL = 'http://47.93.215.234:11211/'//鞍钢测试地址(弃用)
|
||||
// axios.defaults.baseURL = 'http://42.180.188.17:11211/' //鞍钢测试地址
|
||||
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:19814/'//测试地址
|
||||
|
||||
} else if (process.env.NODE_ENV == 'debug') {
|
||||
axios.defaults.baseURL = 'https://www.ceshi.com'
|
||||
} else if (process.env.NODE_ENV == 'production') {
|
||||
let host = window.location.host
|
||||
// axios.defaults.baseURL = window.location.protocol + '//' + host + '/api/'//金林湾地址
|
||||
axios.defaults.baseURL = window.location.protocol + '//' + host + '/'
|
||||
// axios.defaults.baseURL ='http://192.168.34.216:6023/'
|
||||
// axios.defaults.baseURL = window.location.protocol + "//" + host.split(":")[0] + ":6023" + "/"
|
||||
// axios.defaults.baseURL = 'http://zhgd.loganwy.com/`'
|
||||
}
|
||||
|
||||
// tag: 河南
|
||||
@ -228,10 +234,6 @@ axios.interceptors.request.use(
|
||||
}
|
||||
return config
|
||||
}
|
||||
|
||||
if (showLoadingConfig == '' || showLoadingConfig == undefined) {
|
||||
// showFullScreenLoading()
|
||||
}
|
||||
return config
|
||||
},
|
||||
(error) => {
|
||||
@ -364,98 +366,6 @@ function logout() {
|
||||
window.location.href = '/index.html#/login'
|
||||
}, 1000)
|
||||
}
|
||||
export function get(url, params, config) {
|
||||
showLoadingConfig = config
|
||||
url = url + '?lang=' + getLang()
|
||||
return new Promise((resolve, reject) => {
|
||||
axios
|
||||
.get(url, {
|
||||
params: params,
|
||||
})
|
||||
.then((res) => {
|
||||
if (
|
||||
res.config.url == '/xmgl/progressTask/downloadTemplate?lang=zh_CN'
|
||||
) {
|
||||
resolve(res.data)
|
||||
return
|
||||
}
|
||||
if (res.data.code == 200) {
|
||||
resolve(res.data)
|
||||
} else {
|
||||
Message.error(res.data.message)
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err.data)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* post方法,对应post请求
|
||||
* @param {String} url [请求的url地址]
|
||||
* @param {Object} params [请求时携带的参数]
|
||||
*/
|
||||
export function post(url, params, config) {
|
||||
showLoadingConfig = config
|
||||
url = url + '?lang=' + getLang()
|
||||
return new Promise((resolve, reject) => {
|
||||
axios
|
||||
.post(url, params)
|
||||
.then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
resolve(res.data)
|
||||
} else {
|
||||
if (res.data.status !== 'SUCCESS') {
|
||||
Message.error(res.data.message)
|
||||
} else {
|
||||
resolve(res.data)
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err.data)
|
||||
})
|
||||
})
|
||||
}
|
||||
/**
|
||||
* put方法,对应put请求
|
||||
* @param {String} url [请求的url地址]
|
||||
* @param {Object} params [请求时携带的参数]
|
||||
*/
|
||||
export function put(url, params, config) {
|
||||
showLoadingConfig = config
|
||||
url = url + '?lang=' + getLang()
|
||||
return new Promise((resolve, reject) => {
|
||||
axios
|
||||
.put(url, params)
|
||||
.then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
resolve(res.data)
|
||||
} else {
|
||||
Message.error(res.data.message)
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err.data)
|
||||
})
|
||||
})
|
||||
}
|
||||
export function showFullScreenLoading() {
|
||||
if (needLoadingRequestCount === 0) {
|
||||
startLoading()
|
||||
}
|
||||
needLoadingRequestCount++
|
||||
}
|
||||
|
||||
export function tryHideFullScreenLoading() {
|
||||
if (needLoadingRequestCount <= 0) return
|
||||
needLoadingRequestCount--
|
||||
if (needLoadingRequestCount === 0) {
|
||||
endLoading()
|
||||
}
|
||||
}
|
||||
|
||||
function startLoading() {
|
||||
loading = Loading.service({
|
||||
lock: true,
|
||||
|
||||
@ -52,23 +52,23 @@ export default new Vuex.Store({
|
||||
// FILEURL:'http://182.90.224.237:51234/image/',
|
||||
// UPLOADURL: "http://192.168.34.155:19111/upload/image/", // 洁本地
|
||||
// FILEURL: "http://192.168.34.155:19111/image/", //洁本地
|
||||
// UPLOADURL:'http://192.168.34.221:9111/upload/image/',// 郭圣雄本地
|
||||
// FILEURL:'http://192.168.34.221:9111/image/',//郭圣雄本地
|
||||
// WORKFLOWURL: "http://192.168.34.138:88/#/workspace/forms", //坤工作流地址(本地)
|
||||
UPLOADURL:'http://192.168.34.221:9111/upload/image/',// 郭圣雄本地
|
||||
FILEURL:'http://192.168.34.221:9111/image/',//郭圣雄本地
|
||||
WORKFLOWURL: "http://192.168.34.138:88/#/workspace/forms", //坤工作流地址(本地)
|
||||
// WORKFLOWURL: "http://192.168.34.126:88/#/workspace/forms", //罗峰工作流地址(本地)
|
||||
// UPLOADURL:'http://182.90.224.237:51234/upload/image/',// 郭圣雄远程
|
||||
// FILEURL:'http://182.90.224.237:51234/image/',//郭圣雄远程
|
||||
// UPLOADURL:'http://42.180.188.17:11211/upload/image',//测试
|
||||
// FILEURL:'http://42.180.188.17:11211/image/',//测试
|
||||
BASEURL: baseUrl
|
||||
? baseUrl
|
||||
: window.location.protocol + "//" + window.location.host + "/", //正式环境
|
||||
UPLOADURL:
|
||||
window.location.protocol + "//" + window.location.host + "/upload/image", //正式环境
|
||||
FILEURL: window.location.protocol + "//" + window.location.host + "/image/", //正式环境
|
||||
// BASEURL: baseUrl
|
||||
// ? baseUrl
|
||||
// : window.location.protocol + "//" + window.location.host + "/", //正式环境
|
||||
// UPLOADURL:
|
||||
// window.location.protocol + "//" + window.location.host + "/upload/image", //正式环境
|
||||
// FILEURL: window.location.protocol + "//" + window.location.host + "/image/", //正式环境
|
||||
// // WORKFLOWURL: 'http://47.93.215.234:19998/#/workspace/forms',//鞍钢平台工作流地址(弃用)
|
||||
// // WORKFLOWURL: 'http://47.93.215.234:19098/#/workspace/forms',//鞍钢测试平台工作流地址(弃用)
|
||||
WORKFLOWURL: 'http://42.180.188.17:19998/#/workspace/forms',//鞍钢平台工作流地址
|
||||
// WORKFLOWURL: 'http://42.180.188.17:19998/#/workspace/forms',//鞍钢平台工作流地址
|
||||
// WORKFLOWURL: "http://42.180.188.17:19098/#/workspace/forms", //鞍钢测试平台工作流地址
|
||||
//---------------------------------------------------------------------------------------------
|
||||
// BASEURL: baseUrl
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user