UNPKG

t-comm

Version:

专业、稳定、纯粹的工具库

27 lines (25 loc) 575 B
/** * 获取rtx信息 * @private */ function getRtxInfo() { return new Promise(function (resolve, reject) { var cached = localStorage.getItem('AEGIS_RTX'); if (cached) { resolve(cached); return; } var url = "".concat(location.origin, "/ts:auth/tauth/info.ashx"); fetch(url).then(function (response) { if (response.status === 200) { return response.json(); } return {}; }).then(function (data) { resolve(data); })["catch"](function (err) { reject(err); }); }); } export { getRtxInfo };