Skip to content

Commit 7f5298b

Browse files
committed
稳定版本一提交
稳定版本一提交
0 parents  commit 7f5298b

20 files changed

+8090
-0
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
composer.phar
2+
/vendor/
3+
vendor/*
4+
composer.lock
5+
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
6+
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
7+
# composer.lock

README.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
2+
## Zzyc-supply-php-sdk
3+
4+
Zzyc-supply-php-sdk是中泽云仓官方SDK的Composer封装,支持php项目的中台API对接。
5+
## 安装
6+
7+
* 通过composer,这是推荐的方式,可以使用composer.json 声明依赖,或者运行下面的命令。
8+
```bash
9+
$ composer require Zzyc-supply/php-sdk
10+
```
11+
* 直接下载安装,SDK 没有依赖其他第三方库,但需要参照 composer的autoloader,增加一个自己的autoloader程序。
12+
13+
## 运行环境
14+
15+
php: >=7.0
16+
17+
## 使用方法
18+
19+
```php
20+
21+
/**
22+
* Created by PhpStorm.
23+
* User: Zzyc
24+
* Date: 2022/4/17
25+
* Time: 2:04 PM
26+
*/
27+
28+
use Zzyc\Api\SupplyClient;
29+
30+
$appKey = "your appkey";
31+
$appSecret = "your appSecret";
32+
33+
try {
34+
$supplyClient = new SupplyClient($appKey,$appSecret);
35+
} catch (OssException $e) {
36+
printf(__FUNCTION__ . "creating supplyClient instance: FAILED\n");
37+
printf($e->getMessage() . "\n");
38+
return null;
39+
}
40+
41+
$param = [
42+
'cate_id'=>3, //分类id
43+
'order'=>'price_asc', //排序方式: 'is_new', 新品 'price_asc', 价格升序 'price_desc', 价格降序 'rate', 评分 'sales' 销量 默认传空或不传
44+
'price_on'=>1, //价格区间 最低价
45+
'price_off'=>10, //价格区间 最高价
46+
'brand_id'=> '', //品牌id
47+
'keyword'=>'绿豆', //搜索关键字
48+
'page'=>1,
49+
'limit'=>10
50+
];
51+
$response = json_decode($supplyClient->getApiResponse("get","/api/product/spu/lst",$param));
52+
53+
```
54+
55+
## 供应链平台
56+
57+
官网网址 https://www.xzwl1688.com/
58+
59+
浙江中台H5网址 https://zj.center.xzwl1688.com/
60+
61+
安徽中台H5网址 https://ah.center.xzwl1688.com/
62+
63+
江西中台H5网址 https://jx.center.xzwl1688.com/

autoload.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
/**
3+
* Created by PhpStorm.
4+
* User: Zzyc
5+
* Date: 2022/4/17
6+
* Time: 2:04 PM
7+
*/
8+
9+
function classLoader($class)
10+
{
11+
$path = str_replace('\\', DIRECTORY_SEPARATOR, $class);
12+
$file = __DIR__ . '/src/' . $path . '.php';
13+
14+
if (file_exists($file)) {
15+
require_once $file;
16+
}
17+
}
18+
spl_autoload_register('classLoader');

composer.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "Zzyc-supply/php-sdk",
3+
"description": "Zzyc supply API SDK for PHP",
4+
"type": "library",
5+
"keywords": ["supply", "Zzyc", "sdk"],
6+
"require": {
7+
"php": ">=7.0"
8+
},
9+
"homepage": "http://www.xzwl1688.com/",
10+
"license": "MIT",
11+
"authors": [
12+
{
13+
"name": "lihuidao",
14+
"email": "1069945237@qq.com",
15+
"homepage": "http://www.xzwl1688.com/"
16+
}
17+
],
18+
"minimum-stability": "stable",
19+
"autoload": {
20+
"psr-4": {
21+
"Zzyc\\Api\\": "src/Zzyc/Api"
22+
}
23+
}
24+
}

doc/一.准备工作20220429163733.html

Lines changed: 613 additions & 0 deletions
Large diffs are not rendered by default.

doc/三.下单20220429163809.html

Lines changed: 1586 additions & 0 deletions
Large diffs are not rendered by default.

doc/二.商品20220429163801.html

Lines changed: 1477 additions & 0 deletions
Large diffs are not rendered by default.

doc/五.财务管理20220429163821.html

Lines changed: 544 additions & 0 deletions
Large diffs are not rendered by default.

doc/六.工单管理20220429163826.html

Lines changed: 1052 additions & 0 deletions
Large diffs are not rendered by default.

doc/四.物流及售后20220429163814.html

Lines changed: 1567 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)