node-easywechat 2.8.2 → 2.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MiniProgram/Application.d.ts +14 -0
- package/dist/MiniProgram/Application.js +35 -0
- package/dist/MiniProgram/Shop/AccoutClient.d.ts +25 -0
- package/dist/MiniProgram/Shop/AccoutClient.js +42 -0
- package/dist/MiniProgram/Shop/AftersaleClient.d.ts +22 -0
- package/dist/MiniProgram/Shop/AftersaleClient.js +35 -0
- package/dist/MiniProgram/Shop/BasicClient.d.ts +39 -0
- package/dist/MiniProgram/Shop/BasicClient.js +69 -0
- package/dist/MiniProgram/Shop/DeliveryClient.d.ts +20 -0
- package/dist/MiniProgram/Shop/DeliveryClient.js +32 -0
- package/dist/MiniProgram/Shop/OrderClient.d.ts +32 -0
- package/dist/MiniProgram/Shop/OrderClient.js +51 -0
- package/dist/MiniProgram/Shop/RegisterClient.d.ts +25 -0
- package/dist/MiniProgram/Shop/RegisterClient.js +43 -0
- package/dist/MiniProgram/Shop/SpuClient.d.ts +67 -0
- package/dist/MiniProgram/Shop/SpuClient.js +92 -0
- package/node-easywechat.file_cache.easywechat.kernel.access_token.8a9684b45da7de42a06a70ba01a7005a.cache +1 -1
- package/node-easywechat.file_cache.easywechat.kernel.access_token.c3d06edaf326aad75d32f31348df787a.cache +1 -1
- package/package.json +1 -1
|
@@ -21,6 +21,13 @@ import SoterClient from './Soter/SoterClient';
|
|
|
21
21
|
import SubscribeMessageClient from './SubscribeMessage/SubscribeMessageClient';
|
|
22
22
|
import RealtimeLogClient from './RealtimeLog/RealtimeLogClient';
|
|
23
23
|
import SearchClient from './Search/SearchClient';
|
|
24
|
+
import ShopAccoutClient from './Shop/AccoutClient';
|
|
25
|
+
import ShopAftersaleClient from './Shop/AftersaleClient';
|
|
26
|
+
import ShopBasicClient from './Shop/BasicClient';
|
|
27
|
+
import ShopDeliveryClient from './Shop/DeliveryClient';
|
|
28
|
+
import ShopOrderClient from './Shop/OrderClient';
|
|
29
|
+
import ShopRegisterClient from './Shop/RegisterClient';
|
|
30
|
+
import ShopSpuClient from './Shop/SpuClient';
|
|
24
31
|
import ShortLinkClient from './ShortLink/ShortLinkClient';
|
|
25
32
|
import MediaClient from '../BaseService/Media/MediaClient';
|
|
26
33
|
import ContentSecurityClient from '../BaseService/ContentSecurity/ContentSecurityClient';
|
|
@@ -54,6 +61,13 @@ export default class MiniProgram extends BaseApplication {
|
|
|
54
61
|
subscribe_message: SubscribeMessageClient;
|
|
55
62
|
realtime_log: RealtimeLogClient;
|
|
56
63
|
search: SearchClient;
|
|
64
|
+
shop_account: ShopAccoutClient;
|
|
65
|
+
shop_aftersale: ShopAftersaleClient;
|
|
66
|
+
shop_basic: ShopBasicClient;
|
|
67
|
+
shop_delivery: ShopDeliveryClient;
|
|
68
|
+
shop_order: ShopOrderClient;
|
|
69
|
+
shop_register: ShopRegisterClient;
|
|
70
|
+
shop_spu: ShopSpuClient;
|
|
57
71
|
short_link: ShortLinkClient;
|
|
58
72
|
media: MediaClient;
|
|
59
73
|
content_security: ContentSecurityClient;
|
|
@@ -35,6 +35,13 @@ const SoterClient_1 = __importDefault(require("./Soter/SoterClient"));
|
|
|
35
35
|
const SubscribeMessageClient_1 = __importDefault(require("./SubscribeMessage/SubscribeMessageClient"));
|
|
36
36
|
const RealtimeLogClient_1 = __importDefault(require("./RealtimeLog/RealtimeLogClient"));
|
|
37
37
|
const SearchClient_1 = __importDefault(require("./Search/SearchClient"));
|
|
38
|
+
const AccoutClient_1 = __importDefault(require("./Shop/AccoutClient"));
|
|
39
|
+
const AftersaleClient_1 = __importDefault(require("./Shop/AftersaleClient"));
|
|
40
|
+
const BasicClient_1 = __importDefault(require("./Shop/BasicClient"));
|
|
41
|
+
const DeliveryClient_1 = __importDefault(require("./Shop/DeliveryClient"));
|
|
42
|
+
const OrderClient_1 = __importDefault(require("./Shop/OrderClient"));
|
|
43
|
+
const RegisterClient_1 = __importDefault(require("./Shop/RegisterClient"));
|
|
44
|
+
const SpuClient_1 = __importDefault(require("./Shop/SpuClient"));
|
|
38
45
|
const ShortLinkClient_1 = __importDefault(require("./ShortLink/ShortLinkClient"));
|
|
39
46
|
const MediaClient_1 = __importDefault(require("../BaseService/Media/MediaClient"));
|
|
40
47
|
const ContentSecurityClient_1 = __importDefault(require("../BaseService/ContentSecurity/ContentSecurityClient"));
|
|
@@ -69,6 +76,13 @@ class MiniProgram extends BaseApplication_1.default {
|
|
|
69
76
|
this.subscribe_message = null;
|
|
70
77
|
this.realtime_log = null;
|
|
71
78
|
this.search = null;
|
|
79
|
+
this.shop_account = null;
|
|
80
|
+
this.shop_aftersale = null;
|
|
81
|
+
this.shop_basic = null;
|
|
82
|
+
this.shop_delivery = null;
|
|
83
|
+
this.shop_order = null;
|
|
84
|
+
this.shop_register = null;
|
|
85
|
+
this.shop_spu = null;
|
|
72
86
|
this.short_link = null;
|
|
73
87
|
this.media = null;
|
|
74
88
|
this.content_security = null;
|
|
@@ -165,6 +179,27 @@ class MiniProgram extends BaseApplication_1.default {
|
|
|
165
179
|
this.offsetSet('search', function (app) {
|
|
166
180
|
return new SearchClient_1.default(app);
|
|
167
181
|
});
|
|
182
|
+
this.offsetSet('shop_account', function (app) {
|
|
183
|
+
return new AccoutClient_1.default(app);
|
|
184
|
+
});
|
|
185
|
+
this.offsetSet('shop_aftersale', function (app) {
|
|
186
|
+
return new AftersaleClient_1.default(app);
|
|
187
|
+
});
|
|
188
|
+
this.offsetSet('shop_basic', function (app) {
|
|
189
|
+
return new BasicClient_1.default(app);
|
|
190
|
+
});
|
|
191
|
+
this.offsetSet('shop_delivery', function (app) {
|
|
192
|
+
return new DeliveryClient_1.default(app);
|
|
193
|
+
});
|
|
194
|
+
this.offsetSet('shop_order', function (app) {
|
|
195
|
+
return new OrderClient_1.default(app);
|
|
196
|
+
});
|
|
197
|
+
this.offsetSet('shop_register', function (app) {
|
|
198
|
+
return new RegisterClient_1.default(app);
|
|
199
|
+
});
|
|
200
|
+
this.offsetSet('shop_spu', function (app) {
|
|
201
|
+
return new SpuClient_1.default(app);
|
|
202
|
+
});
|
|
168
203
|
this.offsetSet('short_link', function (app) {
|
|
169
204
|
return new ShortLinkClient_1.default(app);
|
|
170
205
|
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import BaseClient from '../../Core/BaseClient';
|
|
2
|
+
export default class AccountClient extends BaseClient {
|
|
3
|
+
/**
|
|
4
|
+
* 获取商家类目列表
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
getCategoryList(): Promise<any>;
|
|
8
|
+
/**
|
|
9
|
+
* 获取商家品牌列表
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
getBrandList(): Promise<any>;
|
|
13
|
+
/**
|
|
14
|
+
* 更新商家信息
|
|
15
|
+
* @param path 小程序path
|
|
16
|
+
* @param phone 客服联系方式
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
updateInfo(path: string, phone: string): Promise<any>;
|
|
20
|
+
/**
|
|
21
|
+
* 获取商家信息
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
getInfo(): Promise<any>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const BaseClient_1 = __importDefault(require("../../Core/BaseClient"));
|
|
7
|
+
class AccountClient extends BaseClient_1.default {
|
|
8
|
+
/**
|
|
9
|
+
* 获取商家类目列表
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
getCategoryList() {
|
|
13
|
+
return this.httpPostJson('shop/account/get_category_list');
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 获取商家品牌列表
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
getBrandList() {
|
|
20
|
+
return this.httpPostJson('shop/account/get_brand_list');
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 更新商家信息
|
|
24
|
+
* @param path 小程序path
|
|
25
|
+
* @param phone 客服联系方式
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
updateInfo(path, phone) {
|
|
29
|
+
return this.httpPostJson('shop/account/update_info', {
|
|
30
|
+
service_agent_path: path,
|
|
31
|
+
service_agent_phone: phone,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* 获取商家信息
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
getInfo() {
|
|
39
|
+
return this.httpPostJson('shop/account/get_info');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.default = AccountClient;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import BaseClient from '../../Core/BaseClient';
|
|
2
|
+
export default class AftersaleClient extends BaseClient {
|
|
3
|
+
/**
|
|
4
|
+
* 创建售后
|
|
5
|
+
* @param aftersale 售后数据
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
add(aftersale: object): Promise<any>;
|
|
9
|
+
/**
|
|
10
|
+
* 获取订单下售后单
|
|
11
|
+
* @param order 订单数据
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
get(order: object): Promise<any>;
|
|
15
|
+
/**
|
|
16
|
+
* 更新售后
|
|
17
|
+
* @param order 订单数据
|
|
18
|
+
* @param aftersale 售后数据
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
update(order: object, aftersale: object): Promise<any>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const BaseClient_1 = __importDefault(require("../../Core/BaseClient"));
|
|
7
|
+
const Utils_1 = require("../../Core/Utils");
|
|
8
|
+
class AftersaleClient extends BaseClient_1.default {
|
|
9
|
+
/**
|
|
10
|
+
* 创建售后
|
|
11
|
+
* @param aftersale 售后数据
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
add(aftersale) {
|
|
15
|
+
return this.httpPostJson('shop/aftersale/add', aftersale);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* 获取订单下售后单
|
|
19
|
+
* @param order 订单数据
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
22
|
+
get(order) {
|
|
23
|
+
return this.httpPostJson('shop/aftersale/get', order);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 更新售后
|
|
27
|
+
* @param order 订单数据
|
|
28
|
+
* @param aftersale 售后数据
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
update(order, aftersale) {
|
|
32
|
+
return this.httpPostJson('shop/aftersale/update', (0, Utils_1.merge)((0, Utils_1.merge)({}, order), aftersale));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.default = AftersaleClient;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import BaseClient from '../../Core/BaseClient';
|
|
2
|
+
export default class BasicClient extends BaseClient {
|
|
3
|
+
/**
|
|
4
|
+
* 获取商品类目
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
getCat(): Promise<any>;
|
|
8
|
+
/**
|
|
9
|
+
* 上传图片
|
|
10
|
+
* @param path
|
|
11
|
+
* @param respType
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
imgUpload(path: string, respType?: number): Promise<any>;
|
|
15
|
+
/**
|
|
16
|
+
* 品牌审核
|
|
17
|
+
* @param brand
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
auditBrand(brand: object): Promise<any>;
|
|
21
|
+
/**
|
|
22
|
+
* 类目审核
|
|
23
|
+
* @param category
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
auditCategory(category: object): Promise<any>;
|
|
27
|
+
/**
|
|
28
|
+
* 获取审核结果
|
|
29
|
+
* @param auditId
|
|
30
|
+
* @returns
|
|
31
|
+
*/
|
|
32
|
+
auditResult(auditId: string): Promise<any>;
|
|
33
|
+
/**
|
|
34
|
+
* 获取小程序资质
|
|
35
|
+
* @param reqType
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
getMiniAppCertificate(reqType?: number): Promise<any>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const BaseClient_1 = __importDefault(require("../../Core/BaseClient"));
|
|
7
|
+
class BasicClient extends BaseClient_1.default {
|
|
8
|
+
/**
|
|
9
|
+
* 获取商品类目
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
getCat() {
|
|
13
|
+
return this.httpPostJson('shop/cat/get');
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 上传图片
|
|
17
|
+
* @param path
|
|
18
|
+
* @param respType
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
imgUpload(path, respType = 1) {
|
|
22
|
+
return this.httpUpload('customservice/kfaccount/uploadheadimg', {
|
|
23
|
+
media: path,
|
|
24
|
+
}, {
|
|
25
|
+
resp_type: respType,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 品牌审核
|
|
30
|
+
* @param brand
|
|
31
|
+
* @returns
|
|
32
|
+
*/
|
|
33
|
+
auditBrand(brand) {
|
|
34
|
+
return this.httpPostJson('shop/audit/audit_brand', {
|
|
35
|
+
audit_req: brand,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* 类目审核
|
|
40
|
+
* @param category
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
43
|
+
auditCategory(category) {
|
|
44
|
+
return this.httpPostJson('shop/audit/audit_category', {
|
|
45
|
+
audit_req: category,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* 获取审核结果
|
|
50
|
+
* @param auditId
|
|
51
|
+
* @returns
|
|
52
|
+
*/
|
|
53
|
+
auditResult(auditId) {
|
|
54
|
+
return this.httpPostJson('shop/audit/result', {
|
|
55
|
+
audit_id: auditId,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* 获取小程序资质
|
|
60
|
+
* @param reqType
|
|
61
|
+
* @returns
|
|
62
|
+
*/
|
|
63
|
+
getMiniAppCertificate(reqType = 2) {
|
|
64
|
+
return this.httpPostJson('shop/audit/get_miniapp_certificate', {
|
|
65
|
+
req_type: reqType,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.default = BasicClient;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import BaseClient from '../../Core/BaseClient';
|
|
2
|
+
export default class DeliveryClient extends BaseClient {
|
|
3
|
+
/**
|
|
4
|
+
* 获取快递公司列表
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
getCompanyList(): Promise<any>;
|
|
8
|
+
/**
|
|
9
|
+
* 订单发货
|
|
10
|
+
* @param order
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
send(order: object): Promise<any>;
|
|
14
|
+
/**
|
|
15
|
+
* 订单确认收货
|
|
16
|
+
* @param order
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
recieve(order: object): Promise<any>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const BaseClient_1 = __importDefault(require("../../Core/BaseClient"));
|
|
7
|
+
class DeliveryClient extends BaseClient_1.default {
|
|
8
|
+
/**
|
|
9
|
+
* 获取快递公司列表
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
getCompanyList() {
|
|
13
|
+
return this.httpPostJson('shop/delivery/get_company_list');
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 订单发货
|
|
17
|
+
* @param order
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
send(order) {
|
|
21
|
+
return this.httpPostJson('shop/delivery/send', order);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 订单确认收货
|
|
25
|
+
* @param order
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
recieve(order) {
|
|
29
|
+
return this.httpPostJson('shop/delivery/recieve', order);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.default = DeliveryClient;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import BaseClient from '../../Core/BaseClient';
|
|
2
|
+
export default class OrderClient extends BaseClient {
|
|
3
|
+
/**
|
|
4
|
+
* 检查场景值是否在支付校验范围内
|
|
5
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/order/check_scene.html
|
|
6
|
+
* @param scene
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
sceneCheck(scene: number): Promise<any>;
|
|
10
|
+
/**
|
|
11
|
+
* 生成订单
|
|
12
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/order/add_order.html
|
|
13
|
+
* @param order
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
add(order: object): Promise<any>;
|
|
17
|
+
/**
|
|
18
|
+
* 获取订单详情
|
|
19
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/order/get_order.html
|
|
20
|
+
* @param openid 用户的openid
|
|
21
|
+
* @param orderIds {order_id, out_order_id} 二选一
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
get(openid: string, orderIds: object): Promise<any>;
|
|
25
|
+
/**
|
|
26
|
+
* 同步订单支付结果
|
|
27
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/order/pay_order.html
|
|
28
|
+
* @param object
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
pay(params: object): Promise<any>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const BaseClient_1 = __importDefault(require("../../Core/BaseClient"));
|
|
7
|
+
const Utils_1 = require("../../Core/Utils");
|
|
8
|
+
class OrderClient extends BaseClient_1.default {
|
|
9
|
+
/**
|
|
10
|
+
* 检查场景值是否在支付校验范围内
|
|
11
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/order/check_scene.html
|
|
12
|
+
* @param scene
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
sceneCheck(scene) {
|
|
16
|
+
return this.httpPostJson('shop/scene/check', {
|
|
17
|
+
scene,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 生成订单
|
|
22
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/order/add_order.html
|
|
23
|
+
* @param order
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
add(order) {
|
|
27
|
+
return this.httpPostJson('shop/order/add', order);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 获取订单详情
|
|
31
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/order/get_order.html
|
|
32
|
+
* @param openid 用户的openid
|
|
33
|
+
* @param orderIds {order_id, out_order_id} 二选一
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
get(openid, orderIds) {
|
|
37
|
+
return this.httpPostJson('shop/order/get', (0, Utils_1.merge)((0, Utils_1.merge)({}, orderIds), {
|
|
38
|
+
openid,
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* 同步订单支付结果
|
|
43
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/order/pay_order.html
|
|
44
|
+
* @param object
|
|
45
|
+
* @returns
|
|
46
|
+
*/
|
|
47
|
+
pay(params) {
|
|
48
|
+
return this.httpPostJson('shop/order/pay', params);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.default = OrderClient;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import BaseClient from '../../Core/BaseClient';
|
|
2
|
+
export default class RegisterClient extends BaseClient {
|
|
3
|
+
/**
|
|
4
|
+
* 接入申请
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
apply(): Promise<any>;
|
|
8
|
+
/**
|
|
9
|
+
* 获取接入状态
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
check(): Promise<any>;
|
|
13
|
+
/**
|
|
14
|
+
* 完成接入任务
|
|
15
|
+
* @param accessInfoItem 6:完成spu接口,7:完成订单接口,8:完成物流接口,9:完成售后接口,10:测试完成,11:发版完成
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
finishAccessInfo(accessInfoItem: number): Promise<any>;
|
|
19
|
+
/**
|
|
20
|
+
* 场景接入申请
|
|
21
|
+
* @param sceneGroupId 1:视频号、公众号场景
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
applyScene(sceneGroupId: number): Promise<any>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const BaseClient_1 = __importDefault(require("../../Core/BaseClient"));
|
|
7
|
+
class RegisterClient extends BaseClient_1.default {
|
|
8
|
+
/**
|
|
9
|
+
* 接入申请
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
apply() {
|
|
13
|
+
return this.httpPostJson('shop/register/apply');
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 获取接入状态
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
check() {
|
|
20
|
+
return this.httpPostJson('shop/register/check');
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 完成接入任务
|
|
24
|
+
* @param accessInfoItem 6:完成spu接口,7:完成订单接口,8:完成物流接口,9:完成售后接口,10:测试完成,11:发版完成
|
|
25
|
+
* @returns
|
|
26
|
+
*/
|
|
27
|
+
finishAccessInfo(accessInfoItem) {
|
|
28
|
+
return this.httpPostJson('shop/register/finish_access_info', {
|
|
29
|
+
access_info_item: accessInfoItem,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* 场景接入申请
|
|
34
|
+
* @param sceneGroupId 1:视频号、公众号场景
|
|
35
|
+
* @returns
|
|
36
|
+
*/
|
|
37
|
+
applyScene(sceneGroupId) {
|
|
38
|
+
return this.httpPostJson('shop/register/apply_scene', {
|
|
39
|
+
scene_group_id: sceneGroupId,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.default = RegisterClient;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import BaseClient from '../../Core/BaseClient';
|
|
2
|
+
export default class SpuClient extends BaseClient {
|
|
3
|
+
/**
|
|
4
|
+
* 添加商品
|
|
5
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/SPU/add_spu.html
|
|
6
|
+
* @param product
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
add(product: object): Promise<any>;
|
|
10
|
+
/**
|
|
11
|
+
* 删除商品
|
|
12
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/SPU/del_spu.html
|
|
13
|
+
* @param params
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
del(params: object): Promise<any>;
|
|
17
|
+
/**
|
|
18
|
+
* 获取商品
|
|
19
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/SPU/get_spu.html
|
|
20
|
+
* @param params
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
23
|
+
get(params: object): Promise<any>;
|
|
24
|
+
/**
|
|
25
|
+
* 获取商品列表
|
|
26
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/SPU/get_spu_list.html
|
|
27
|
+
* @param product
|
|
28
|
+
* @param page
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
getList(product: object, page: object): Promise<any>;
|
|
32
|
+
/**
|
|
33
|
+
* 撤回商品审核
|
|
34
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/SPU/del_spu_audit.html
|
|
35
|
+
* @param params
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
delAudit(params: object): Promise<any>;
|
|
39
|
+
/**
|
|
40
|
+
* 更新商品
|
|
41
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/SPU/update_spu.html
|
|
42
|
+
* @param params
|
|
43
|
+
* @returns
|
|
44
|
+
*/
|
|
45
|
+
update(params: object): Promise<any>;
|
|
46
|
+
/**
|
|
47
|
+
* 免审更新商品
|
|
48
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/SPU/update_spu_without_audit.html
|
|
49
|
+
* @param params
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
updateWithoutAudit(params: object): Promise<any>;
|
|
53
|
+
/**
|
|
54
|
+
* 上架商品
|
|
55
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/SPU/listing_spu.html
|
|
56
|
+
* @param params
|
|
57
|
+
* @returns
|
|
58
|
+
*/
|
|
59
|
+
listing(params: object): Promise<any>;
|
|
60
|
+
/**
|
|
61
|
+
* 下架商品
|
|
62
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/SPU/delisting_spu.html
|
|
63
|
+
* @param params
|
|
64
|
+
* @returns
|
|
65
|
+
*/
|
|
66
|
+
delisting(params: object): Promise<any>;
|
|
67
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const BaseClient_1 = __importDefault(require("../../Core/BaseClient"));
|
|
7
|
+
const Utils_1 = require("../../Core/Utils");
|
|
8
|
+
class SpuClient extends BaseClient_1.default {
|
|
9
|
+
/**
|
|
10
|
+
* 添加商品
|
|
11
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/SPU/add_spu.html
|
|
12
|
+
* @param product
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
add(product) {
|
|
16
|
+
return this.httpPostJson('shop/spu/add', product);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 删除商品
|
|
20
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/SPU/del_spu.html
|
|
21
|
+
* @param params
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
del(params) {
|
|
25
|
+
return this.httpPostJson('shop/spu/del', params);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* 获取商品
|
|
29
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/SPU/get_spu.html
|
|
30
|
+
* @param params
|
|
31
|
+
* @returns
|
|
32
|
+
*/
|
|
33
|
+
get(params) {
|
|
34
|
+
return this.httpPostJson('shop/spu/get', params);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 获取商品列表
|
|
38
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/SPU/get_spu_list.html
|
|
39
|
+
* @param product
|
|
40
|
+
* @param page
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
43
|
+
getList(product, page) {
|
|
44
|
+
return this.httpPostJson('shop/spu/get_list', (0, Utils_1.merge)((0, Utils_1.merge)({}, product), page));
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* 撤回商品审核
|
|
48
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/SPU/del_spu_audit.html
|
|
49
|
+
* @param params
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
delAudit(params) {
|
|
53
|
+
return this.httpPostJson('shop/spu/del_audit', params);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* 更新商品
|
|
57
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/SPU/update_spu.html
|
|
58
|
+
* @param params
|
|
59
|
+
* @returns
|
|
60
|
+
*/
|
|
61
|
+
update(params) {
|
|
62
|
+
return this.httpPostJson('shop/spu/update', params);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* 免审更新商品
|
|
66
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/SPU/update_spu_without_audit.html
|
|
67
|
+
* @param params
|
|
68
|
+
* @returns
|
|
69
|
+
*/
|
|
70
|
+
updateWithoutAudit(params) {
|
|
71
|
+
return this.httpPostJson('shop/spu/update_without_audit', params);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* 上架商品
|
|
75
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/SPU/listing_spu.html
|
|
76
|
+
* @param params
|
|
77
|
+
* @returns
|
|
78
|
+
*/
|
|
79
|
+
listing(params) {
|
|
80
|
+
return this.httpPostJson('shop/spu/listing', params);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* 下架商品
|
|
84
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/SPU/delisting_spu.html
|
|
85
|
+
* @param params
|
|
86
|
+
* @returns
|
|
87
|
+
*/
|
|
88
|
+
delisting(params) {
|
|
89
|
+
return this.httpPostJson('shop/spu/delisting', params);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.default = SpuClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"data":{"errcode":0,"errmsg":"ok","access_token":"moke-token","expires_in":7200},"lifeTime":
|
|
1
|
+
{"data":{"errcode":0,"errmsg":"ok","access_token":"moke-token","expires_in":7200},"lifeTime":1642619272}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"data":{"errcode":0,"errmsg":"ok"},"lifeTime":
|
|
1
|
+
{"data":{"errcode":0,"errmsg":"ok"},"lifeTime":1642619272}
|