0.1.10 • Published 2 years ago
yq-auth v0.1.10
yq-auth
原圈科技H5授权
安装
使用 npm:
npm install yq-auth
import yqAuth from 'yq-auth'
// 微信
const authData = yqAuth.wx()
// 企微 测试
const authData = yqAuth.wxwork({
env: 'test',
corpId: 企业ID,
})
// 企微基础版 测试
const authData = yqAuth.wxworkBase({
env: 'test'
})
script 标签:
<script src="https://assets.rurushishi.com/jssdk/yq-auth.js"></script>
// 使用 window.yqAuth 等同于npm包方式的 yqAuth
Constants
Typedefs
wx ⇒ wxAuthData
微信授权
Kind: global constant
Param | Type | Description |
---|---|---|
params | Object | 参数 |
params.baseURL | String | 接口请求的baseURL 例:https://abc.xxx.com 标品可不填 |
params.scope | string | 可选: snsapi_userinfo (默认), snsapi_base |
wxwork ⇒ wxworkAuthData
企微授权
Kind: global constant
Param | Type | Description |
---|---|---|
params | Object | 参数 |
params.env | String | 环境 测试:test 生产:prod 默认:prod |
params.baseURL | String | 接口请求的baseURL 例:https://abc.xxx.com 标品可不填 |
params.corpId | String | 企业id |
wxworkBase ⇒ wxworkBaseAuthData
企微授权 基础版
Kind: global constant
Param | Type | Description |
---|---|---|
params | Object | 参数 |
params.type | String | 设置类型 基础版:base 默认:无 |
params.env | String | 设置环境 测试:test 生产:prod 默认:prod |
params.baseURL | String | 接口请求的baseURL https://abc.xxx.com 标品可不填 |
params.corpId | String | 非基础版必填corpId |
wxAuthData : Object
Kind: global typedef
Properties
Name | Type |
---|---|
openId | string |
passport | string |
wxworkAuthData : Object
Kind: global typedef
Properties
Name | Type |
---|---|
openUserId | string |
userId | string |
corpId | string |
mobile | string |
wxworkBaseAuthData : Object
Kind: global typedef
Properties
Name | Type |
---|---|
wxgzhWxworkUserId | string |
wxgzhCropid | string |
wxgzhQwUserId | string |
wxgzhQwAppType | string |
avatar | string |
0.1.10
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.8
2 years ago
0.1.7
2 years ago
0.1.9
2 years ago
0.1.4
2 years ago
0.1.3
2 years ago
0.1.6
2 years ago
0.1.5
2 years ago
0.0.11
3 years ago
0.0.10
3 years ago
0.0.9
3 years ago
0.0.8
3 years ago
0.0.7
3 years ago
0.0.6
3 years ago
0.0.5
3 years ago
0.0.4
3 years ago
0.0.3
3 years ago
0.0.2
3 years ago
0.0.1
3 years ago