From 8232791a58cfd8bb8bb54a86d4c8ba152d40b37f Mon Sep 17 00:00:00 2001 From: h_mo <596417202@qq.com> Date: Mon, 1 May 2023 11:01:03 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E8=8E=B7=E5=8F=96Platform=EF=BC=88?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=EF=BC=89=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/enums/platformEnum.ts | 84 +-------------------------------------- 1 file changed, 1 insertion(+), 83 deletions(-) diff --git a/src/enums/platformEnum.ts b/src/enums/platformEnum.ts index 0fe4f82..3362faf 100644 --- a/src/enums/platformEnum.ts +++ b/src/enums/platformEnum.ts @@ -23,87 +23,5 @@ export enum PLATFORMS { QUICKAPP_WEBVIEW_HUAWEI = 'QUICKAPP-WEBVIEW-HUAWEI' /* 快应用华为 */, } -/** - * 平台环境 - * @constructor - */ -function PLATFORM_ENV() { - let platform = PLATFORMS.DEFAULT; - - /* #ifdef VUE3 */ - platform = PLATFORMS.VUE3; - /* #endif */ - - /* #ifdef APP-PLUS */ - platform = PLATFORMS.APP_PLUS; - /* #endif */ - - /* #ifdef APP-PLUS-NVUE */ - platform = PLATFORMS.APP_PLUS_NVUE; - /* #endif */ - - /* #ifdef APP-NVUE */ - platform = PLATFORMS.APP_NVUE; - /* #endif */ - - /* #ifdef H5 */ - platform = PLATFORMS.H5; - /* #endif */ - - /* #ifdef MP */ - platform = PLATFORMS.MP; - /* #endif */ - - /* #ifdef MP-WEIXIN */ - platform = PLATFORMS.MP_WEIXIN; - /* #endif */ - - /* #ifdef MP-ALIPAY */ - platform = PLATFORMS.MP_ALIPAY; - /* #endif */ - - /* #ifdef MP_BAIDU */ - platform = PLATFORMS.MP_BAIDU; - /* #endif */ - - /* #ifdef MP-TOUTIAO */ - platform = PLATFORMS.MP_TOUTIAO; - /* #endif */ - - /* #ifdef MP-LARK */ - platform = PLATFORMS.MP_LARK; - /* #endif */ - - /* #ifdef MP-QQ */ - platform = PLATFORMS.MP_QQ; - /* #endif */ - - /* #ifdef MP-KUAISHOU */ - platform = PLATFORMS.MP_KUAISHOU; - /* #endif */ - - /* #ifdef MP-JD */ - platform = PLATFORMS.MP_JD; - /* #endif */ - - /* #ifdef MP-360 */ - platform = PLATFORMS.MP_360; - /* #endif */ - - /* #ifdef QUICKAPP-WEBVIEW */ - platform = PLATFORMS.QUICKAPP_WEBVIEW; - /* #endif */ - - /* #ifdef QUICKAPP-WEBVIEW-UNION */ - platform = PLATFORMS.QUICKAPP_WEBVIEW_UNION; - /* #endif */ - - /* #ifdef QUICKAPP-WEBVIEW-HUAWEI */ - platform = PLATFORMS.QUICKAPP_WEBVIEW_HUAWEI; - /* #endif */ - - return platform; -} - /* 当前平台 */ -export const CURRENT_PLATFORM = PLATFORM_ENV(); +export const CURRENT_PLATFORM = process.env['UNI_PLATFORM'];