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 🙏

© 2026 – Pkg Stats / Ryan Hefner

salus-third

v0.0.11

Published

```javascript yarn add salus-third

Downloads

18

Readme

安装

yarn add salus-third

Or

npm i salus-third

引入

一般在入口文件中引入

import Salus from 'salus-third'

Vue.use(Salus)

使用 (看下面最新使用方式👇)

在业务代码中 可以通过 this.$salus 直接访问 Salus 实例。目前提供的功能较少,后期会根据业务添加。

比如直接在 app.vue 中调用

export default {
  name: "App",
  mounted() {
    // 监听info事件,获取平台鉴权数据
    this.$salus.addListener('info', this.onInfo)
    // 请在 addListener 之后调用方法,否则监听不到返回的事件
    this.$salus.getInfo()
    // 设置标题
    this.$salus.setTitle('我是标题')
  },
  beforeDestroy() {
    this.$salus.removeListener('info', this.onInfo)
    // 当不需要和平台交互时,可以调用exit关闭监听
    this.$salus.exit()
  },
  methods: {
    onInfo(data){
      // 包含 deviceCode、hospital、token 等
      console.log('onInfo', data)
    },
    handleSuccess(){
      // 业务处理成功后调用可跳转到配置信息里对应的路由
      this.$salus.done()
    }
  }
};

Function

更多的方法将根据业务需求添加

| 方法名 | 说明 | | --------------------------------- | -------------------------------------------------------- | | setTitle('标签名') | 设置当前页面的标签名(只能设置一次) | | getInfo() | 获取鉴权数据,注:调用该方法前请确保已经监听info事件 | | done() | 业务逻辑处理成功后调用,平台会根据配置跳转页面 | | exit() | 用于移除所有监听,调用后无法监听平台事件 | | addListener(action, (data)=>{}) | 监听平台事件,具体事件见下文 Action 模块 | | removeListener(action, func) | 移除监听 |

Action

更多的事件将根据业务需求添加

| 事件名 | 说明 | | ------ | -------------------------------- | | info | 平台获取到鉴权数据后下发给第三方 |

最新使用方式

新版的sdk使用更优雅的方式与平台进行交互,去掉了使用监听的方式获取父级事件。

API

选择患者
selectPatient(params)

参数说明

  • type:弹窗类型,doctor、charge、medical、nurse、chargeBack

示例

async getUser() {
  let re = await this.$salus.selectPatient({
    type: 'doctor' 
  });
  console.log("patient info", re);
}
获取token
getToken

示例

async getToken() {
  let re = await this.$salus.getToken();
  console.log("token info", re);
}
查看检查报告
showReportDetail(params)

参数说明

  • visitId

  • emrrecid:报告id

示例

getReport() {
  this.$salus.showReportDetail({
    visitId: 7620,
    emrrecid: 4328
  });
}
查看检验报告
showReportPymolDetail(params)

参数说明

  • visitId
  • emrrecid:报告id

示例

getReport2() {
  this.$salus.showReportPymolDetail({
    visitId: 7674,
    emrrecid: 4339
  });
}