|
| 1 | +"use strict"; |
| 2 | +var __extends = (this && this.__extends) || (function () { |
| 3 | + var extendStatics = function (d, b) { |
| 4 | + extendStatics = Object.setPrototypeOf || |
| 5 | + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || |
| 6 | + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; |
| 7 | + return extendStatics(d, b); |
| 8 | + }; |
| 9 | + return function (d, b) { |
| 10 | + extendStatics(d, b); |
| 11 | + function __() { this.constructor = d; } |
| 12 | + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); |
| 13 | + }; |
| 14 | +})(); |
| 15 | +exports.__esModule = true; |
| 16 | +var Base = /** @class */ (function () { |
| 17 | + function Base() { |
| 18 | + this.data = {}; |
| 19 | + } |
| 20 | + Base.prototype.get = function (key) { |
| 21 | + return key ? this.data[key] : this.data; |
| 22 | + }; |
| 23 | + Base.prototype.set = function (key, val) { |
| 24 | + this.data[key] = val; |
| 25 | + return this; |
| 26 | + }; |
| 27 | + Base.prototype.reset = function (obj) { |
| 28 | + this.clear(); |
| 29 | + Object.assign(this.data, obj); |
| 30 | + return this; |
| 31 | + }; |
| 32 | + Base.prototype.clear = function () { |
| 33 | + for (var key in this.data) { |
| 34 | + delete this.data[key]; |
| 35 | + } |
| 36 | + return this; |
| 37 | + }; |
| 38 | + return Base; |
| 39 | +}()); |
| 40 | +var Server = /** @class */ (function (_super) { |
| 41 | + __extends(Server, _super); |
| 42 | + function Server() { |
| 43 | + var _this = _super !== null && _super.apply(this, arguments) || this; |
| 44 | + _this.data = { |
| 45 | + login: false |
| 46 | + }; |
| 47 | + return _this; |
| 48 | + } |
| 49 | + return Server; |
| 50 | +}(Base)); |
| 51 | +var User = /** @class */ (function (_super) { |
| 52 | + __extends(User, _super); |
| 53 | + function User() { |
| 54 | + var _this = _super !== null && _super.apply(this, arguments) || this; |
| 55 | + _this.data = {}; |
| 56 | + return _this; |
| 57 | + } |
| 58 | + return User; |
| 59 | +}(Base)); |
| 60 | +var Config = /** @class */ (function (_super) { |
| 61 | + __extends(Config, _super); |
| 62 | + function Config() { |
| 63 | + var _this = _super !== null && _super.apply(this, arguments) || this; |
| 64 | + _this.data = { |
| 65 | + username: 'admin', |
| 66 | + password: '123456', |
| 67 | + retryUrl: 'http://localhost:3030/info' |
| 68 | + }; |
| 69 | + return _this; |
| 70 | + } |
| 71 | + return Config; |
| 72 | +}(Base)); |
| 73 | +exports.server = new Server; |
| 74 | +exports.user = new User; |
| 75 | +exports.config = new Config; |
| 76 | +exports.crossDomain = { |
| 77 | + 'Access-Control-Allow-Origin': '*', |
| 78 | + 'Access-Control-Allow-Methods': '*', |
| 79 | + 'Access-Control-Allow-Headers': '*', |
| 80 | + 'Access-Control-Allow-Credentials': true |
| 81 | +}; |
| 82 | +exports["default"] = { |
| 83 | + user: exports.user, |
| 84 | + server: exports.server, |
| 85 | + config: exports.config, |
| 86 | + crossDomain: exports.crossDomain |
| 87 | +}; |
0 commit comments