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

ys-pay

v0.1.0

Published

> vue、TS、axios等

Downloads

9

Readme

对外jsSDK

vue、TS、axios等

功能简述

  1. 主要包含: vue、TypeScript、webpack、eslint、axios、请求配置、网络监听、http-server、vconsole...

安装预览

安装依赖

npm i || yarn || cnpm

启动本地调试


1.打包压缩
      npm run build || yarn build
2.运行方式:
      方式一:npm install http-server -g
            http-server 6600
            访问/引用链接(在business-demo项目):ip地址:6600/payH5sdk.js(如:http://172.16.16.246:6600/payH5sdk.js)
      方式二:本地起node服务
            将dist下文件放入node项目publish下
            访问/引用链接(在business-demo项目):http://localhost:3000/payH5sdk.js
      方式三:上传代码到dev
            在项目(payH5Sdk)上传任意更改到dev
            访问/引用链接(在business-demo项目):http://pay-h5sdk1.dev.eusdk.com/payH5sdk.js

eslint格式校验

npm run lint


## 项目结构
.
├── README.md  ------------------------ 说明文件
├── package.json  --------------------- 项目配置
├── alipay_in_weixin  ----------------- 支付引导页(页面需放到服务器生成链接使用)
├──  └──pay  -------------------------- 微信内无法使用支付宝支付处理(详见:https://docs.open.alipay.com/203/105285/)
├── build  ---------------------------- webpack配置入口
├──  └──webpack.config.js  ------------ webpack配置
├── dist  ----------------------------- 打包后的文件位置
├──  └── index.html ------------------- 入口页面
├──  └── pay.htm ---------------------- 微信内无法使用支付宝支付处理(详见:https://docs.open.alipay.com/203/105285/)
├──  └── payH5sdk.js ------------------ 打包后的主要文件
└── src  ------------------------------ 源码目录
    ├── payStyle  --------------------- 支付
    ├──  └── alipayH5  ---------------- 支付宝支付
    ├──  └── paypal  ------------------ PayPal支付
    ├──  └── unionPay  ---------------- 银联支付
    ├──  └── wechatH5  ---------------- 微信h5支付
    ├──  └── wechatJsapi  ------------- 微信内支付
    ├── template  --------------------- 模版文件位置
    ├──  └── index   ------------------ 模板文件是./src/template/index.html
    ├── utils  ------------------------ 状态管理
    ├──  └── axios -------------------- 请求函数
    ├──  └── checkoutParams ----------- 参数检查函数(是否缺少参数等)
    ├──  └── encode   ----------------- 编码函数
    ├──  └── os ----------------------- 检测设备环境函数(设备:mobile/pc,是否微信环境)
    ├──  └── osMap -------------------- 环境参数处理(mobile/pc/微信环境)
    ├──  └── productMap --------------- 支付方式判断函数(映射支付产品参数)
    ├──  └── sortParams --------------- 参数排序生成签名函数(排序-赋值-某种顺序拼接-拷贝字符)
    ├── views  ------------------------ 页面集合目录
    ├── index  ------------------------ 主要处理函数(也是打包入口文件)
    └── index.d.js  ------------------- ts全局配置