youdas/common/platform/PlatformFactory.js
2025-06-20 16:06:03 +08:00

23 lines
433 B
JavaScript

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