platform.js 799 B

1234567891011121314151617181920212223242526272829
  1. import { __spreadArray } from "tslib";
  2. import { compareVersion } from './compareVersion';
  3. export function supportUndefinedProperty() {
  4. var support = true;
  5. return support;
  6. }
  7. export function platform() {
  8. var platform = 'unknown';
  9. platform = 'alipay';
  10. return platform;
  11. }
  12. export function resolveEventValue(value) {
  13. return value;
  14. }
  15. export function resolveEventValues(args1, args2) {
  16. var rest = [];
  17. for (var _i = 2; _i < arguments.length; _i++) {
  18. rest[_i - 2] = arguments[_i];
  19. }
  20. return __spreadArray([args1, args2], rest, true);
  21. }
  22. export function isOldSDKVersion() {
  23. if (platform() === 'wechat') {
  24. return false;
  25. }
  26. var SDKVersion = my.SDKVersion;
  27. var isOldVersion = compareVersion(SDKVersion, '2.0.0') < 0;
  28. return isOldVersion;
  29. }