UNPKG

tlk

Version:

查询指定车次的所有站点的余票信息

31 lines (26 loc) 760 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _axios = _interopRequireDefault(require("axios")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * @params date {string} 2019-03-03 */ var _default = async (train_no, date) => { const options = { url: 'https://order.tieyou.com/index.php', params: { param: 'dataApi/checi.html', requestType: 'remjy', checi: train_no, date, cAuth: '68BC43F5B535D521213488CC7194D9EE8C14B4A3C4CF073B5376CBFA1B29E613' } }; const res = await (0, _axios.default)(options); const stations = res.data.data.stations; return stations; }; exports.default = _default;