UNPKG

tsp-component

Version:

提供多端和react版本的UI组件

41 lines (40 loc) 1.33 kB
import Exception from '../exception'; var Global = (function () { function Global() { this.routerHistory = []; } Object.defineProperty(Global.prototype, "account", { get: function () { return localStorage.getItem('account') ? localStorage.getItem('account') : ''; }, set: function (account) { Exception.account = account; localStorage.setItem('account', account); }, enumerable: true, configurable: true }); Object.defineProperty(Global.prototype, "openId", { get: function () { return localStorage.getItem('openId') ? localStorage.getItem('openId') : ''; }, set: function (openId) { Exception.openId = openId; localStorage.setItem('openId', openId); }, enumerable: true, configurable: true }); Object.defineProperty(Global.prototype, "webviewSrc", { get: function () { return localStorage.getItem('webviewSrc') ? localStorage.getItem('webviewSrc') : ''; }, set: function (url) { localStorage.setItem('webviewSrc', url); }, enumerable: true, configurable: true }); return Global; }()); export default Global;