@gt6/sdk 1.0.25 → 1.0.26
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/core/types.d.ts +1 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/gt6-sdk.cjs.js +15 -0
- package/dist/gt6-sdk.cjs.js.map +1 -1
- package/dist/gt6-sdk.esm.js +15 -0
- package/dist/gt6-sdk.esm.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/modules/products.d.ts +4 -0
- package/dist/modules/products.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/gt6-sdk.esm.js
CHANGED
@@ -657,6 +657,15 @@ class ProductsAPI {
|
|
657
657
|
const response = await this.client.request(`/product-categories/platform-${config.platformId_p}-root-${categoryId}.json`);
|
658
658
|
return response.categories;
|
659
659
|
}
|
660
|
+
/**
|
661
|
+
* 2.2. 获取平台产品分类列表
|
662
|
+
*/
|
663
|
+
async getCategories_b(productRootCategoryId) {
|
664
|
+
const config = this.client.getConfig();
|
665
|
+
const categoryId = productRootCategoryId || config.productRootCategoryId;
|
666
|
+
const response = await this.client.request(`/big-product-categories/platform-${config.platformId}-root-${categoryId}.json`);
|
667
|
+
return response.categories;
|
668
|
+
}
|
660
669
|
/**
|
661
670
|
* 3. 获取产品标签列表
|
662
671
|
*/
|
@@ -2627,6 +2636,12 @@ class GT6SDK {
|
|
2627
2636
|
async getProduct_p(productId) {
|
2628
2637
|
return this.products.getProduct_p(productId);
|
2629
2638
|
}
|
2639
|
+
/**
|
2640
|
+
* 8.2. 便捷方法:获取父平台产品分类列表
|
2641
|
+
*/
|
2642
|
+
async getCategories_b(rootCategoryId) {
|
2643
|
+
return this.products.getCategories_b(rootCategoryId);
|
2644
|
+
}
|
2630
2645
|
/**
|
2631
2646
|
* 9. 便捷方法:获取产品分类列表
|
2632
2647
|
*/
|