1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- const EPlatform = {
- AppPlus: 'APP-PLUS',
- /**App*/
- AppPlusNvue: 'APP-PLUS-NVUE',
- /**App nvue*/
- H5: 'H5',
- /**H5*/
- MpAlipay: 'MP-ALIPAY',
- /**支付宝小程序*/
- MpWeixin: 'MP-WEIXIN',
- /**微信小程序*/
- MpBaidu: 'MP-BAIDU',
- /**百度小程序*/
- MpToutiao: 'MP-TOUTIAO',
- /**字节跳动小程序*/
- MpQq: 'MP-QQ',
- /**QQ小程序*/
- Mp360: 'MP-360',
- /**360小程序*/
- QuickappWebview: 'quickapp-webview',
- /**快应用通用(包含联盟、华为)*/
- QuickappWebviewUnion: 'quickapp-webview-union',
- /**快应用联盟*/
- QuickappWebviewHuawei: 'quickapp-webview-huawei' /**快应用华为*/
- }
- export default function ifDefPlatform() {
- let platform = ''
- //#ifdef
- platform = '';
- //#endif
- //#ifdef APP-PLUS
- platform = EPlatform.AppPlus;
- //#endif
- //#ifdef -NVUE
- platform = EPlatform.AppPlusNvue;
- //#endif
- //#ifdef H5
- platform = EPlatform.H5;
- //#endif
- //#ifdef MP-WEIXIN
- platform = EPlatform.MpWeixin;
- //#endif
- //#ifdef MP-ALIPAY
- platform = EPlatform.MpAlipay;
- //#endif
- //#ifdef MP-BAIDU
- platform = EPlatform.MpBaidu;
- //#endif
- //#ifdef MP-TOUTIAO
- platform = EPlatform.MpToutiao;
- //#endif
- //#ifdef MP-QQ
- platform = EPlatform.MpQq;
- //#endif
- //#ifdef MP-360
- platform = EPlatform.Mp360;
- //#endif
- //#ifdef quickapp-webview
- platform = EPlatform.QuickappWebview;
- //#endif
- //#ifdef quickapp-webview-union
- platform = EPlatform.QuickappWebviewUnion;
- //#endif
- //#ifdef quickapp-webview-huawei
- platform = EPlatform.QuickappWebviewHuawei;
- //#endif
- return platform
- }
|