UNPKG

t-comm

Version:

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

23 lines (19 loc) 698 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function addZero(date) { return date < 10 ? "0".concat(date) : "".concat(date); } function getVersion() { var now = new Date(); var year = now.getFullYear(); var month = addZero(now.getMonth() + 1); var day = addZero(now.getDate()); var hour = addZero(now.getHours()); var minute = addZero(now.getMinutes()); var second = addZero(now.getSeconds()); var ms = now.getMilliseconds(); return "".concat(year).concat(month).concat(day).concat(hour).concat(minute).concat(second).concat(ms); } var BASE_URL = 'http://api.rainbow.oa.com:8080'; exports.BASE_URL = BASE_URL; exports.getVersion = getVersion;