# payx-jssdk

> PayX客户端 =========

Latest version **1.0.1** (published 2016-07-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install payx-jssdk
pnpm add payx-jssdk
yarn add payx-jssdk
bun add payx-jssdk
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-07-21 |
| First published | 2016-07-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | liangali |
| Maintainers | payx |
| Keywords | payx, jssdk |

## Links

- npm: https://www.npmjs.com/package/payx-jssdk
- Repository: https://github.com/10cella/payx-jssdk
- Homepage: https://github.com/10cella/payx-jssdk#readme
- Issues: https://github.com/10cella/payx-jssdk/issues
- npm.io page: https://npm.io/package/payx-jssdk

## Dependencies (5)

- [reqwest](https://npm.io/package/reqwest.md) ^2.0.5
- [js-cookie](https://npm.io/package/js-cookie.md) ^2.1.2
- [babel-core](https://npm.io/package/babel-core.md) ^6.9.1
- [querystring](https://npm.io/package/querystring.md) ^0.2.0
- [babel-loader](https://npm.io/package/babel-loader.md) ^6.2.4

## Recent versions

- 1.0.1 (latest) — 2016-07-21
- 1.0.0 — 2016-07-21

## README

PayX客户端
=========

## 安装

###npm

```
npm install payx

```

```<script src="//wxjs.vifii.com/dist/{version}/payx.min.js"></script>```


### 发布源代码

```
 npm run publish
```

### 接口使用

```js

import PayX from 'payx';

var payX = new PayX({
  clientId: 'test'
});

// 登陆判断
if (!payX.isLogined()) {
  payX.login();
}

// 获取当前用户信息
payX.profile(function(error, profile) {
  console.log(profile);
});

// 支付
payX.pay({
  amount: 1.00,
  subject: '测试商品来一发'
});

//微信jssdk使用
payX.wxReady(function() {
  wx.onMenuShareTimeline({
    title: 'hahahahahah', // 分享标题
    link: 'http://127.0.0.1/haha.html', // 分享链接
    imgUrl: 'https://tpc.googlesyndication.com/simgad/5673222705765011533', // 分享图标
    success: function() {
      // 用户确认分享后执行的回调函数
      alert('ok');
    },
    cancel: function() {
      // 用户取消分享后执行的回调函数
      alert('cancel');
    }
  });

  wx.onMenuShareAppMessage({
    title: '测试分享链接', // 分享标题
    desc: 'fuck', // 分享描述
    link: 'http://wxjs.vifii.com/test/pay.html', // 分享链接
    imgUrl: 'https://tpc.googlesyndication.com/simgad/5673222705765011533', // 分享图标
    type: 'link', // 分享类型,music、video或link，不填默认为link
    dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
    success: function() {
      // 用户确认分享后执行的回调函数
    },
    cancel: function() {
      // 用户取消分享后执行的回调函数
    }
  });

  wx.getNetworkType({
    success: function(res) {
      var networkType = res.networkType; // 返回网络类型2g，3g，4g，wifi
      alert('您的网络' + networkType);
    }
  });
});

```

---
_Source: https://npm.io/package/payx-jssdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
