UNPKG

enoad-component-web

Version:

针对web端的控件

23 lines (22 loc) 835 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getPostBack = void 0; function getPostBack(callback) { fetch("http://localhost:8013/rest/object/json/posts", { method: 'GET', }).then(function (res) { return res && res.json(); }).then(function (result) { if (result.code == 200) { result.data.forEach(function (element) { if (element.time && element.time.month) { element.position = element.time.month.split('-')[1]; //设置位置信息; } }); callback && callback(result); } }).catch(function (error) { callback && callback("网络故障,接口返回失败"); }); } exports.getPostBack = getPostBack; ; //# sourceMappingURL=./components/Header/action.js.map