1
guanqb
2023-01-04 a9a198b5c606ef7734f7738e752506bae84a8ae0
1
2 files modified
12 ■■■■■ changed files
src/api/dept/index.js 1 ●●●● patch | view | raw | blame | history
src/router/axios.js 11 ●●●● patch | view | raw | blame | history
src/api/dept/index.js
@@ -47,6 +47,7 @@
    return request({
        url: '/sf3d/area/info',
        method: 'get',
        authorization: false,
        requestBaseUrl: 'fengt',
        params: {
            area_id,
src/router/axios.js
@@ -45,14 +45,15 @@
            // config.baseURL = "http://192.168.0.129:18185/api"
        } else if (config.requestBaseUrl == "fengt") {
            // feng tu 数据
            config.baseURL = "http://10.141.11.11:18080"
            // config.baseURL = "http://10.141.11.11:18080"
            config.baseURL = "http://192.168.0.112:18080"
        }
        //headers判断是否需要
        const authorization = config.authorization === false
        if (!authorization) {
            config.headers["Authorization"] = `Basic ${Base64.encode("saber:saber_secret")}`
        }
        // const authorization = config.authorization === false
        // if (!authorization) {
        //     config.headers["Authorization"] = `Basic ${Base64.encode("saber:saber_secret")}`
        // }
        //让每个请求携带token
        const meta = config.meta || {}
        const isToken = meta.isToken === false