1.0.8 • Published 2 years ago

yindu-auth v1.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

银都奥美微信授权

yindu-auth

使用方式

yarn add yindu-auth 
npm/cnpm install --save yindu-auth
import { WeChatAuth, WECHAT_STATE_TYPE }  from 'yindu-auth'

const wa = new WeChatAuth({
  appid: '公众号appid',
  componentAppid: '第三方开发平台 APPid',
  apiHost: '授权接口',
  scope: WECHAT_STATE_TYPE.snsapi_userinfo, // WECHAT_STATE_TYPE.snsapi_userinfo(获取用户信息授权) WECHAT_STATE_TYPE.snsapi_base(静默授权)
  cookieTime: 1, // 1小时 cookie 有效期
  cookieKey: 'yindu_training_online01' // cookie 键值
})
wa.auth().then(res => {
  console.log('授权成功')
}).catch(err => {
  console.log('授权失败')
})
1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago