tools.ts 455 B

1234567891011121314151617181920
  1. import { config } from "../config/config";
  2. import { log } from "./log";
  3. export class tools {
  4. public static platform:string = config.Platform.H5
  5. public static initPlatform(){
  6. // #ifdef MP-WEIXIN
  7. tools.platform = config.Platform.WEIXIN
  8. // #endif
  9. // #ifdef MP-TOUTIAO
  10. tools.platform = config.Platform.TOUTIAO
  11. // #endif
  12. log.Debug("当前运行平台:",tools.platform)
  13. }
  14. public static getCurPlatform(){
  15. return tools.platform
  16. }
  17. }