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

ep-open-tool-mini

v1.1.11

Published

蚂蚁资金业务-小程序 SDK

Readme

ep-open-tool-mini

蚂蚁资金业务-小程序 SDK


Usage

依赖安装

npm i ep-open-tool-mini --save

场景使用-因公付

因公付-员工侧支付宝端内签约

仅获取签约地址

import { EntPay } from 'ep-open-tool-mini';

const signUrl = EntPay.Staff.getSignUrl({
  bizSceneCode: '接入时约定的bizSceneCode',
  accountId: '企业的id',
});

自动跳转到支付端内签约页面

import { EntPay } from 'ep-open-tool-mini';

// 跳转员工端签约页面
EntPay.Staff.goToSign({
  bizSceneCode: '接入时约定的bizSceneCode',
  accountId: '企业的id',
});

参数说明

| signParam 内容 | 字段说明 | 类型 | 默认值 | 是否必填 | | :------------- | :------------------------ | :----- | :----- | :------- | | bizSceneCode | 接入时约定的 bizSceneCode | string | 无 | 是 | | accountId | 企业的 id | string | 无 | 是 | | returnUrl | 签约完成之后的回跳地址 | string | 无 | 否 |

支卡通

支卡通-V2

自动跳转到支付端内开通页面

import { ZCard } from 'ep-open-tool-mini';

// 跳转开通页面
ZCard.goToSignV2({
  bizProductCode:'接入时约定的birProductCode',
  bizSceneCode: '接入时约定的bizScene',
  applyToken: '绑定时的token值',
});

参数说明

| signParam 内容 | 字段说明 | 类型 | 默认值 | 是否必填 | | :------------- | :-------------------- | :----- | :----- | :------- | | bizProductCode | 接入时约定的 bizProductCode | string | 无 | 是 | | bizSceneCode | 接入时约定的 bizSceneCode | string | 无 | 是 | | subBizSceneCode | 接入时约定的 subBizSceneCode | string | 无 | 是 | | applyToken | 绑定时的 applyToken 值 | string | 无 | 是 | | returnUrl | 绑定成功回跳链接 | string | 无 | 否 | | showResultPage | 是否展示结果页 | Y | N | 无 | 否 |

支卡通-V1 (已停止维护,后续接入请使用V2版本)

自动跳转到支付端内开通页面

import { ZCard } from 'ep-open-tool-mini';

// 跳转开通页面
ZCard.goToSign({
  bizScene: '接入时约定的bizScene',
  bindToken: '绑定时的token值',
});

参数说明

| signParam 内容 | 字段说明 | 类型 | 默认值 | 是否必填 | | :------------- | :-------------------- | :----- | :----- | :------- | | bizScene | 接入时约定的 bizScene | string | 无 | 是 | | bindToken | 绑定时的 token 值 | string | 无 | 是 | | returnUrl | 绑定成功回跳链接 | string | 无 | 否 | | showResultPage | 是否展示结果页 | Y | N | 无 | 否 |

通用场景钱包

场景钱包-支付宝端内签约

自动跳转到支付端内签约页面(推荐)

import { SceneWallet } from 'ep-open-tool-mini';

// 跳转场景钱包端签约页面
SceneWallet.goToSign({
  bizScene: '接入时约定的bizScene',
  bindToken: '绑定凭证',
});

仅获取签约地址

import { SceneWallet } from 'ep-open-tool-mini';

const signUrl = SceneWallet.getSignUrl({
  bizScene: '接入时约定的bizScene',
  bindToken: '绑定凭证',
});

方法参数说明

| signParam 内容 | 字段说明 | 类型 | 默认值 | 是否必填 | | :------------- | :-------------------- | :----- | :----- | :------- | | bizScene | 接入时约定的 bizScene | string | 无 | 是 | | bindToken | 绑定凭证 | string | 无 | 是 | | returnUrl | 回跳链接 | string | 无 | 否 | | skipResult | 跳过结果页 | Y | N | 无 | 否 |

网商场景钱包

网商场景钱包-支付宝端内签约

自动跳转到支付端内签约页面(推荐)

import { MYBankSceneWallet } from 'ep-open-tool-mini';

// 跳转网商场景钱包端签约页面
MYBankSceneWallet.goToSign({
  bizScene: '接入时约定的bizScene',
  bindToken: '绑定凭证',
});

仅获取签约地址

import { MYBankSceneWallet } from 'ep-open-tool-mini';

const signUrl = MYBankSceneWallet.getSignUrl({
  bizScene: '接入时约定的bizScene',
  bindToken: '绑定凭证',
});

方法参数说明

| signParam 内容 | 字段说明 | 类型 | 默认值 | 是否必填 | | :------------- | :-------------------- | :----- | :----- | :------- | | bizScene | 接入时约定的 bizScene | string | 无 | 是 | | bindToken | 绑定凭证 | string | 无 | 是 | | returnUrl | 回跳链接 | string | 无 | 否 | | skipResult | 跳过结果页 | Y | N | 无 | 否 |

常见问题 FAQ

1.使用 npm 包报错

遇到 The keyword 'const' is reserved 如下的报错?

解决:项目中的 mini.project.json 中保证 enableNodeModuleBabelTransform 配置开关为 true

2.returnUrl 支持那些类型?

当前支持的跳转链接需要满足下面的格式之一: 1.需要是 https://开头域名链接地址; 2.需要是 alipays://开头的支付宝小程序链接

需要保证传入的 returnUrl 链接能够有效访问,可以通过草料二维码转换成二维码,支付宝扫码验证是否能打开;

3.returnUrl 无法正常跳转

⚠️⚠️⚠️ 注意: 1.整体 returnUrl 不需要额外的 encode,SDK 内部已经处理过了; 2.如果是跳转地址的链接需要 url 中有页面参数,则需要自己 encode 拼接好;比如跳转小程序的 pages/index/index 页面想带参数,则需要:'alipays://platformapi/startapp?appId=2021003126648243&page='+ encodeURIComponent('pages/index/index?参数 key=参数 value')