youdas/common/platform/PlatformFactory.js
2025-06-20 19:20:36 +08:00

23 lines
520 B
JavaScript

import BasePlatform from './BasePlatform.js';
import AppPlatform from './AppPlatform';
//#ifdef APP
// import AppPlatform from './AppPlatform';
//#endif
class PlatformFactory {
static create() {
console.log('获取平台获取平台获取平台获取平台获取平台获取平台');
//#ifdef APP
return new AppPlatform();
//#endif
// 默认返回
return new AppPlatform();
}
}
// 使用示例
const platform = PlatformFactory.create();
export {
platform
};