PHPackages                             zmoyi/jstan - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. zmoyi/jstan

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zmoyi/jstan
===========

聚水潭-php-sdk

1.05(9mo ago)153.8k↑50%101MITPHPPHP &gt;=8.1

Since Dec 7Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/zmoyi/JsTan)[ Packagist](https://packagist.org/packages/zmoyi/jstan)[ RSS](/packages/zmoyi-jstan/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (7)Used By (1)

聚水潭 sdk（2.0）
============

[](#聚水潭-sdk20)

[![Latest Stable Version](https://camo.githubusercontent.com/60948ca40cde71c4ceb254897d85c80ba46ef9f22efd1c19390d61a251d290c1/68747470733a2f2f706f7365722e707567782e6f72672f7a6d6f79692f6a7374616e2f76)](https://packagist.org/packages/zmoyi/jstan) [![Total Downloads](https://camo.githubusercontent.com/8fbab874b44fc165740311030e420751d343bf66e2dc719b737c1e6cfd82747d/68747470733a2f2f706f7365722e707567782e6f72672f7a6d6f79692f6a7374616e2f646f776e6c6f616473)](https://packagist.org/packages/zmoyi/jstan) [![Latest Unstable Version](https://camo.githubusercontent.com/e150a29e22063b93be8f7df4cfcefe5fa431c4b24f6f4c956cf8942c07895293/68747470733a2f2f706f7365722e707567782e6f72672f7a6d6f79692f6a7374616e2f762f756e737461626c65)](https://packagist.org/packages/zmoyi/jstan) [![License](https://camo.githubusercontent.com/ac6df0ef4cf6bdc759d36761c7a5196082f963400d4dd56ec2b4b4fd05d4608f/68747470733a2f2f706f7365722e707567782e6f72672f7a6d6f79692f6a7374616e2f6c6963656e7365)](https://packagist.org/packages/zmoyi/jstan) [![PHP Version Require](https://camo.githubusercontent.com/e7c29d091b03d600fbd6da0b60ad7d2208ead3b27ac517f849595e0591e3ef54/68747470733a2f2f706f7365722e707567782e6f72672f7a6d6f79692f6a7374616e2f726571756972652f706870)](https://packagist.org/packages/zmoyi/jstan)

介绍
--

[](#介绍)

时隔一年，没有怎么维护旧版本，并且有很多问题，代码如屎山，这次进行了重构，2.0 版本（虽然代码还是屎山）

聚水潭php-sdk

遇到问题先去查阅官方文档 [聚水潭文档](https://openweb.jushuitan.com/dev-doc)

要求
--

[](#要求)

- php &gt;= 8.1（其他 php 版本理论支持，但是未经过测试，请自行修改 php 版本号）

安装
--

[](#安装)

```
composer require zmoyi/jstan

```

### laravel 使用移步至 [laravel-jsTan](https://github.com/zmoyi/laravel-jstan)

[](#laravel-使用移步至-laravel-jstan)

配置
--

[](#配置)

> 如果下面的示例比较晦涩，请查看测试用例

`config`全局配置

```
private array $config = [
  // 授权地址
  'authUrl' => 'https://openweb.jushuitan.com/auth',
  // 接口地址
  'baseUrl' => 'https://dev-api.jushuitan.com/',
  // 授权接口地址
  'apiUrl' => 'https://openapi.jushuitan.com/',
  // 授权token
  'accessToken' => 'b7e3b1e24e174593af8ca5c397e53dad',
  // 应用key
  'appKey' => 'b0b7d1db226d4216a3d58df9ffa2dde5',
  // 应用secret
  'appSecret' => '99c4cef262f34ca882975a7064de0b87',
  // 版本号
  'version' => '2',
  // 时间戳
  'timestamp' => time(),
  // 字符集
  'charset' => 'utf-8',
  // 是否验证证书
  'verify' => false,
  // 超时时间
  'timeout' => 0,
   // 强制覆盖GuzzleHttp请求参数
  'httpClientConfig' => [
      // 'proxy' => 'http://username:password@192.168.16.1:10'
  ],
];
```

### api调用

[](#api调用)

```
use JsTan\Client;
use JsTan\Route;

/****/

$client = Client::getInstance($this->config);
$route = Route::getInstance();

//路由可使用 Route::QUERY_SHOPS || $route->getRoute('QUERY_SHOPS') || 'open/logisticscompany/query'
// 常量传入，getRoute 传入，字符串传入，看自己喜好

/**
* 查询门店列表（请求示例）
*/
$response = $client->request($route->getRoute('QUERY_SHOPS'), [
  'page_index' => 1,
  'page_size' => 10
]);

/**
* 获取access_token （请求示例）
*/
$response = $client->getAccessToken('001');

/**
* 刷新access_token （请求示例）
*/
$response = $client->refreshToken('001');

print_r($response);
```

License
-------

[](#license)

JsTan is made available under the MIT License (MIT). Please see License File for more information.

交流
--

[](#交流)

点击链接加入群聊[【聚水潭phpsdk使用交流Q】](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=kz7Ytn8pSTbFeYzF3pVgrof2_PbsTNzk&authKey=XhdLyWKahlJlDOMVin3toWxkpwF6R6OEN5Ijw2epahb7kQ9a5LuIpXOdjAIBxijI&noverify=0&group_code=689699469)

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance60

Regular maintenance activity

Popularity31

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~154 days

Total

5

Last Release

273d ago

PHP version history (2 changes)1.02PHP &gt;=8.1

1.03.56PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/0279bdbd2a26484dd71a7a2408d7d2dbf3a29a87b78079e882e1406a2dc323ff?d=identicon)[zmoyi](/maintainers/zmoyi)

---

Top Contributors

[![zmoyi](https://avatars.githubusercontent.com/u/48953751?v=4)](https://github.com/zmoyi "zmoyi (25 commits)")[![wslsq](https://avatars.githubusercontent.com/u/12254744?v=4)](https://github.com/wslsq "wslsq (5 commits)")[![fangmuke](https://avatars.githubusercontent.com/u/26641510?v=4)](https://github.com/fangmuke "fangmuke (1 commits)")

---

Tags

erpjushuitanERPjushuitan

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zmoyi-jstan/health.svg)

```
[![Health](https://phpackages.com/badges/zmoyi-jstan/health.svg)](https://phpackages.com/packages/zmoyi-jstan)
```

###  Alternatives

[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[hubleto/erp

Business Application Hub. Opensource ERP and CRM.

341.4k3](/packages/hubleto-erp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
