Lou
2024-03-27 48f15f39afac2c635cbcd54e061b8f96c4e3df17
Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_app
1 files modified
7 ■■■■ changed files
http/api.js 7 ●●●● patch | view | raw | blame | history
http/api.js
@@ -27,7 +27,12 @@
    if (accessToken) {
        config.header['Blade-Auth'] = 'bearer ' + accessToken;
        config.header['roleName'] = uni.getStorageSync("activeRole").roleAlias || "";
        config.header['communityCode'] = uni.getStorageSync("siteInfo").id || ""
        let activeRole = uni.getStorageSync("activeRole")
        if (activeRole.roleAlias === 'inhabitant') {
            config.header['communityCode'] = uni.getStorageSync("siteInfo").neiCode || ""
        } else {
            config.header['communityCode'] = uni.getStorageSync("siteInfo").id || ""
        }
    }
    if (config.params.tenantId) {
        config.header['Tenant-Id'] = config.params.tenantId;