npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@binlun/sso-methods

v1.0.5

Published

sso methods function lib

Downloads

1

Readme

@lishi/sso-methods

这是sso-methods的npm工具包, 提供对接运营中台单点登录的功能, 原版本文档

使用方法

// 在 main.ts 中进行初始化配置
import { init } from '@lishi/sso-methods'
import { message } from 'ant-design-vue'
init({
  // 单点登录中转页url
  // 正式环境: http://dali-sso-center-prod.lishicloud.com/proxy.html
  // 测试环境: http://sso-center.dev.lishicloud.com/proxy.html
  ssoProxy: 'http://sso-center.dev.lishicloud.com/proxy.html',
  // 登录失败(返回状态码为8302)时的回调, 一般做一些清除缓存的操作, 以下为vue3项目的例子
  failCallback: () => {
    const userInfoStore = useUserInfo()
    const tokenStore = useToken()
    userInfoStore.clearUserInfo()
    tokenStore.clearToken()
  },
  // 用作消息提示, 传入ant-design-vue / element-ui 的message方法
  message: message
})
// 在api文件中 在api/login.ts中使用
import { send } from '@lishi/sso-methods'
import { message } from 'ant-design-vue'
// 登录
export function login(param: loginForm) {
  return send('login', {
    userName: param.userName,
    password: param.password,
    verificationCode: 'test'
  })
}
//退出登录
export function logout() {
  return send('logout')
}
// login / logout 方法返回一个Promise
// 在其他文件中直接使用login / logout方法就像使用其他api一样