Skip to content

引入

ts
import { getI18nToken } from 't-comm';

// 不支持 tree-shaking 的项目
import { getI18nToken} from 't-comm/lib/i18n/index';

// 只支持 ESM 的项目
import { getI18nToken} from 't-comm/es/i18n/index';

getI18nToken(appId, appKey)

描述

获取 i18n token

参数

参数名类型描述
appIdstring

appId

appKeystring

appKey

返回: Promise.<string>

token

示例

ts
getI18nToken('appId', 'appKey').then(token => {
  console.log('token', token)
})