platform.ts 401 B

1234567891011121314151617
  1. /*
  2. * @Author: 菲鸽
  3. * @Date: 2024-03-28 19:13:55
  4. * @Last Modified by: 菲鸽
  5. * @Last Modified time: 2024-03-28 19:24:55
  6. */
  7. export const platform = __UNI_PLATFORM__
  8. export const isH5 = __UNI_PLATFORM__ === 'h5'
  9. export const isApp = __UNI_PLATFORM__ === 'app'
  10. export const isMp = __UNI_PLATFORM__.startsWith('mp-')
  11. const PLATFORM = {
  12. platform,
  13. isH5,
  14. isApp,
  15. isMp,
  16. }
  17. export default PLATFORM