Commit b60a54d2 authored by 高东东's avatar 高东东

*)添加插件请求头处理

parent 43f531e6
"use strict";
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.default = void 0;
}), exports.default = exports.initPluginsConfig = void 0;
var _deviceInterface = _interopRequireDefault(require("./view/deviceInterface")),
_deviceProtocol = _interopRequireDefault(require("./view/deviceProtocol")),
_deviceManage = _interopRequireDefault(require("./view/deviceManage")),
......@@ -37,5 +37,12 @@ var plugView = {
iec104client: _client.default,
iec104server: _server.default
},
_default = plugView;
exports.default = plugView, module.exports = exports.default;
initPluginsConfig = function(e) {
e = e.staticHeader;
window.isPluginsToAmos = !0, window.requestInfo = {
staticHeader: e
}
};
exports.initPluginsConfig = initPluginsConfig;
var _default = plugView;
exports.default = plugView;
......@@ -42,7 +42,7 @@ function _defineProperty(e, o, r) {
}) : e[o] = r, e
}
var lsTool = _amosTool.Store.lsTool,
defaultHeaders = {
defaultHeaders = window.isPluginsToAmos ? window.requestInfo.staticHeader : {
appKey: "AMOS_IOT",
product: "AMOS_IOT_WEB"
},
......
......@@ -31,4 +31,13 @@ const plugView = {
iec104server: IECServer
};
export const initPluginsConfig = ({
staticHeader
}) => {
window.isPluginsToAmos = true;
window.requestInfo = {
staticHeader
};
};
export default plugView;
\ No newline at end of file
......@@ -6,7 +6,7 @@ import payload from './payload';
const lsTool = Store.lsTool;
const defaultHeaders = {
const defaultHeaders = window.isPluginsToAmos ? window.requestInfo.staticHeader : {
appKey: 'AMOS_IOT',
product: 'AMOS_IOT_WEB'
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment