23 lines
520 B
JavaScript
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
|
|
}; |