用工小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
631 B

3 months ago
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.parseRestoreInfo = void 0;
  4. exports.parseRestoreInfo = (originalRestoreInfo) => {
  5. let tempRestoreInfo;
  6. if (originalRestoreInfo) {
  7. tempRestoreInfo = {
  8. ongoingRequest: originalRestoreInfo.includes('true')
  9. };
  10. if (!tempRestoreInfo.ongoingRequest) {
  11. const matchArray = originalRestoreInfo.match(/expiry-date="(.*)"/);
  12. if (matchArray && matchArray[1]) {
  13. tempRestoreInfo.expiryDate = new Date(matchArray[1]);
  14. }
  15. }
  16. }
  17. return tempRestoreInfo;
  18. };