@x-edu/tenant-sdk
v1.0.0
Published
## docs
Downloads
3
Keywords
Readme
@x-edu/tenant-sdk
docs
demo
import {
DomainSDK,
CDNEnv,
DomainType
} from '../src'
const test = async () => {
// 设置环境
DomainSDK.setEnv(CDNEnv['ncet-xedu'])
// 查找配置
const config1 = await DomainSDK.getSiteDomain({
sdpAppId: 'e5649925-441d-4a53-b525-51a2f1c4e0a8',
type: DomainType.Web
})
console.log(config1, config1.domain)
// 查找配置, 如果存在降级的情况,返回isDown: true
const config2 = await DomainSDK.getSiteDomain({
sdpAppId: 'a685009e-085c-4d18-9928-daa0ec5dd8a4',
type: DomainType.H5
})
console.log(config2, config2.domain, config2.isDown)
}
test()