feat: 新增 SGS SDK 数据适配器与腾讯地图服务
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
18
src/repositories/createGuideRepository.ts
Normal file
18
src/repositories/createGuideRepository.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import {
|
||||
dataSourceConfig
|
||||
} from '@/config/dataSource'
|
||||
import {
|
||||
SgsSdkGuideRepository,
|
||||
StaticGuideRepository,
|
||||
type GuideRepository
|
||||
} from '@/repositories/GuideRepository'
|
||||
|
||||
export const createGuideRepository = (): GuideRepository => {
|
||||
if (dataSourceConfig.mode === 'api' || dataSourceConfig.mode === 'sdk') {
|
||||
return new SgsSdkGuideRepository()
|
||||
}
|
||||
|
||||
return new StaticGuideRepository()
|
||||
}
|
||||
|
||||
export const guideRepository = createGuideRepository()
|
||||
Reference in New Issue
Block a user