目录

引入

import { loginByIntl } from 't-comm';

// or
import { loginByIntl} from 't-comm/lib/intl/index';

# loginByIntl(options)

描述

通过 intl 登录

参数

参数名 类型 描述
options Options

参数

示例

function loginIntl() {
  const checkLoginAPI = res => new Promise((resolve, reject) => {
    getScheList({
      query: {
        ...INTL_CONFIG.extraQueryObject,
        appid: INTL_CONFIG.gameID,
        channelid: res.channel_info?.channelId,
      },
    }).then((res) => {
      resolve(res);
    })
      .catch((err) => {
        reject(err);
      });
  });

  return loginByIntl({
    cookieDomain: COOKIE_DOMAIN,
    env: INTL_CONFIG.env,
    gameID: INTL_CONFIG.gameID,
    appID: INTL_CONFIG.appID,
    webID: INTL_CONFIG.webID,
    checkLoginAPI,
  });
}

Last Updated: 2025/4/15 14:15:55