This commit is contained in:
2024-08-30 17:31:35 +08:00
parent 2262031abd
commit 2c952e71a3
15 changed files with 250 additions and 279 deletions

View File

@@ -45,7 +45,8 @@ 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/wxApi"
// api = "http://127.0.0.1:4523/m1/4143821-0-default"
@@ -247,4 +248,9 @@ export function getPageUrl() {
const currentPage = pages[pages.length-1] //获取当前页面的对象
const url = currentPage.route //当前页面url
return url
}
/** 根据文件路径获取文件名 */
export function getFileName(path) {
return path.slice(path.lastIndexOf("/") + 1, -1)
}

View File

@@ -85,6 +85,10 @@ const parseResponse = function (response, url) {
// const { statusCode } = response;
const { code } = response?.data || {};
console.log('url', url,'code', code, 'response.data', response.data)
if (!code) {
alertError("服务异常")
return
}
if (code === 401) {
const currentUrl = getPageUrl()