单独写的公用方法,注:mpass项目的小程序都会被判定为MP
const EPlatform = {
AppPlus:'APP-PLUS',
AppPlusNvue:'APP-PLUS-NVUE',
H5:'H5',
MpAlipay:'MP-ALIPAY',
MpWeixin:'MP-WEIXIN',
MpBaidu:'MP-BAIDU',
MpToutiao:'MP-TOUTIAO',
MpQq:'MP-QQ',
Mp360:'MP-360',
Mp:'MP',
QuickappWebview:'quickapp-webview',
QuickappWebviewUnion:'quickapp-webview-union',
QuickappWebviewHuawei:'quickapp-webview-huawei'
}
export default function ifDefPlatform(){
let platform = ''
platform = '';
platform = EPlatform.AppPlusNvue;
platform = EPlatform.H5;
platform = EPlatform.MpWeixin;
platform = EPlatform.MpAlipay;
platform = EPlatform.MpBaidu;
platform = EPlatform.MpToutiao;
platform = EPlatform.MpQq;
platform = EPlatform.Mp360;
platform = EPlatform.Mp;
platform = EPlatform.QuickappWebview;
platform = EPlatform.QuickappWebviewUnion;
platform = EPlatform.QuickappWebviewHuawei;
return platform
}
|