Socket
Book a DemoInstallSign in
Socket

@x-edu/client-toolkit

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@x-edu/client-toolkit

``` npm install @x-edu/x-edu-client-toolkit ```

0.0.3
latest
npmnpm
Version published
Maintainers
0
Created
Source

安装

npm install @x-edu/x-edu-client-toolkit

使用

getJumpUrl

传入跳转地址, 获得经过天谕登录信息包装的跳转链接

目前移动云预生产与预生产返回地址相同

import clientToolkit from '@x-edu/client-toolkit'


const url = await clientToolkit.getJumpUrl({
  jumpUrl: extInfo.res_jump_url || extInfo?.link_params?.web,
  clientId: data.client_id,
  uc, // uc实例, 如果isInElectron为true, 则uc必传
  env: 'ncet-xedu-beta', // 移动云预生产
  isInElectron // 是否在pc端中, 默认false
})
window.open(url, '_blank')

入参

参数说明类型默认值是否必传
jumpUrl跳转链接string
clientId应用idstring
isInElectron是否在pc端booleanfalse
ucuc实例, 如果isInElectron为true, 则uc必传any
env项目环境 'ncet-xedu', 'ncet-xedu-beta' 或 'preproduction'string'ncet-xedu'

返回

参数说明类型
url经过天谕登录包装后的urlstring

getClientInfoSimple

传入clientId列表, 获得应用名称

import clientToolkit from '@x-edu/client-toolkit'


const clientIds = items.map((item) => item.client_id).filter((id) => id)
const clientsSimpleInfo = await clientToolkit.getClientInfoSimple({
  clientIds,
  env: 'ncet-xedu-beta'
})

入参

参数说明类型默认值是否必传
clientIds应用idsstring[]
env项目环境 'ncet-xedu', 'ncet-xedu-beta' 或 'preproduction'string'ncet-xedu'

返回

参数说明类型
clientsSimpleInfo应用信息{ [client_id] : { client_id:'xxx', client_name:'xxx' } }

相关文档

https://doc-mgmt-tool-web.sdp.101.com/?sdp-app-id=b4fb92a0-af7f-49c2-b270-8f62afac1133#/mydoc/view/6645c0679feec60010a3fe7c/6645c0679feec60010a3fe7d

https://docs.qq.com/doc/DSHhUdmFUVVVoTWlr

1. 无client_id 直接跳资源地址
2. 有client_id 
  2.1 web内, 直接app/view打开
  2.2 pc内, 跳转到app/index targetUrl = 使用2.1地址传参

FAQs

Package last updated on 31 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.