linwe
2024-08-08 3c738f4fe2762bba8087e5a22fc0dc06560eab0e
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;