env.ts 529 B

123456789101112131415161718
  1. import { getPlatform } from '@tencentcloud/universal-api';
  2. declare const uni: any;
  3. export const isPC = getPlatform() === 'pc';
  4. export const isH5 = getPlatform() === 'h5';
  5. export const isWeChat = getPlatform() === 'wechat';
  6. export const isApp = getPlatform() === 'app';
  7. export const isUniFrameWork = typeof uni !== 'undefined';
  8. // H5, mini programs, and apps are all considered mobile.
  9. // If you need to unify the mobile UI style, you can directly use isMobile to control
  10. export const isMobile = isH5 || isWeChat || isApp;