sd-passport

1.0.3 • Public • Published

sd-passport

水滴多平台登录认证

INSTALL

yarn add sd-passport

USEAGE

import account from 'sd-passport'

Vue.use(account, {
  ua: '', // 可选,默认取`navigator.userAgent`
  appid: '新浪开放平台App Key',
  thirdType: 372,
  url: '应用地址回调,需要与开放平台中配置一致',
  state: '回调状态'
})

// 登陆
this.$sdPassport.login().then((res) => {
  console.log('login success')
}).catch(e => {
  console.log('login fail')
})

// 或者重置参数, 注意:ua参数不支持重置
this.$sdPassport.login({
  appid: '',
  thirdType: 0,
  url: ''
}).then((res) => {
  console.log('login success')
}).catch(e => {
  console.log('login fail')
})

API

平台 API详情地址
微信 sd-account
小程序 sd-miniprogram-account
QQ小程序 sd-qq-miniprogram-account
微博 sd-sina-account

Readme

Keywords

Package Sidebar

Install

npm i sd-passport

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

3.73 kB

Total Files

3

Last publish

Collaborators

  • shuidifed