修改工作台开户建筑必填和优化报错信息,账单支持峰谷
This commit is contained in:
@@ -45,9 +45,9 @@ export function getConfigByEnv() {
|
||||
switch (envVersion) {
|
||||
// 开发版
|
||||
case 'develop':
|
||||
// api = "http://localhost:8000"
|
||||
api = "http://localhost:8000"
|
||||
// api = "https://zgd.hbhcbn.com/api3"
|
||||
// api = "https://zgd.hbhcbn.com/api3"
|
||||
api = "https://zgd.hbhcbn.com/api3"
|
||||
// api = "https://zgd.hbhcbn.com/wxApi"
|
||||
// api = "http://127.0.0.1:4523/m1/4143821-0-default"
|
||||
break;
|
||||
|
@@ -35,10 +35,10 @@ const request = async function (options, config = {}) {
|
||||
try {
|
||||
response = await requestWithoutCookie(options);
|
||||
// 服务器没有返回200直接报错
|
||||
// if (!response || response.statusCode !== 200) {
|
||||
// alertError(response?.data?.message || "发生错误,请稍后重试")
|
||||
// return;
|
||||
// }
|
||||
if (!response || response.statusCode !== 200) {
|
||||
alertError(response?.data?.message || "发生错误,请稍后重试")
|
||||
return;
|
||||
}
|
||||
|
||||
// 处理cookie
|
||||
const setCookie = response.header['set-cookie'] || response.header['Set-Cookie'];
|
||||
@@ -78,9 +78,11 @@ const request = async function (options, config = {}) {
|
||||
|
||||
// 处理返回结果,默认直接返回数据
|
||||
const parseResponse = function (response, url) {
|
||||
console.log('response', response)
|
||||
if (!response) {
|
||||
alertError("服务异常")
|
||||
alertError("服务无响应")
|
||||
return
|
||||
|
||||
}
|
||||
const { statusCode } = response;
|
||||
if (!statusCode) {
|
||||
|
Reference in New Issue
Block a user