提交 57e3e319 作者: 翁进城

feat: 请求带p_id

上级 4fcf1632
...@@ -24,9 +24,11 @@ $axios.interceptors.request.use( ...@@ -24,9 +24,11 @@ $axios.interceptors.request.use(
config.baseURL = store.state.baseUrl; config.baseURL = store.state.baseUrl;
const token = store.state.token; const token = store.state.token;
const TenantId = store.state.TenantId; const TenantId = store.state.TenantId;
const projectId = store.state.projectId;
config.headers["Authorization"] = "Bearer " + token; config.headers["Authorization"] = "Bearer " + token;
config.headers["Tenant-Id"] = TenantId; config.headers["Tenant-Id"] = TenantId;
config.headers["terminal"] = 2; // 1 为管理后台 2 为前端项目 config.headers["terminal"] = 2; // 1 为管理后台 2 为前端项目
config.headers["p_id"] = projectId;
return config; return config;
}, },
(error) => { (error) => {
......
...@@ -110,6 +110,10 @@ export default { ...@@ -110,6 +110,10 @@ export default {
value: this.userInfo.TenantId, value: this.userInfo.TenantId,
}); });
this.$store.commit("MMCFlightControlCenter/setState", { this.$store.commit("MMCFlightControlCenter/setState", {
key: "projectId",
value: this.userInfo.projectId,
});
this.$store.commit("MMCFlightControlCenter/setState", {
key: "userInfo", key: "userInfo",
value: this.userInfo, value: this.userInfo,
}); });
......
...@@ -9,6 +9,7 @@ export default { ...@@ -9,6 +9,7 @@ export default {
devMode: false, //开发模式, 使用开发环境接口 devMode: false, //开发模式, 使用开发环境接口
token: "", //登录token token: "", //登录token
TenantId: "", //租户id TenantId: "", //租户id
projectId: "", //项目id
userInfo: null, //用户信息 userInfo: null, //用户信息
cesiumViewer: null, // cesium的viewer实例 cesiumViewer: null, // cesium的viewer实例
cesiumImagesLayers: { cesiumImagesLayers: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论