@gt6/sdk 1.0.25 → 1.0.27
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 +30 -0
- package/dist/gt6-sdk.cjs.js.map +1 -1
- package/dist/gt6-sdk.esm.js +30 -0
- package/dist/gt6-sdk.esm.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/modules/articles.d.ts +4 -0
- package/dist/modules/articles.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
@@ -127,6 +127,15 @@ class ArticlesAPI {
|
|
127
127
|
const response = await this.client.request(`/article-categories/platform-${config.platformId_p}-root-${categoryId}.json`);
|
128
128
|
return response.categories;
|
129
129
|
}
|
130
|
+
/**
|
131
|
+
* 2.2 获取文章分类列表(使用下级平台ID)
|
132
|
+
*/
|
133
|
+
async getCategories_a(rootCategoryId) {
|
134
|
+
const config = this.client.getConfig();
|
135
|
+
const categoryId = rootCategoryId || config.rootCategoryId;
|
136
|
+
const response = await this.client.request(`/big-article-categories/platform-${config.platformId}-root-${categoryId}.json`);
|
137
|
+
return response.categories;
|
138
|
+
}
|
130
139
|
/**
|
131
140
|
* 3. 获取文章标签列表
|
132
141
|
*/
|
@@ -657,6 +666,15 @@ class ProductsAPI {
|
|
657
666
|
const response = await this.client.request(`/product-categories/platform-${config.platformId_p}-root-${categoryId}.json`);
|
658
667
|
return response.categories;
|
659
668
|
}
|
669
|
+
/**
|
670
|
+
* 2.2. 获取平台产品分类列表
|
671
|
+
*/
|
672
|
+
async getCategories_b(productRootCategoryId) {
|
673
|
+
const config = this.client.getConfig();
|
674
|
+
const categoryId = productRootCategoryId || config.productRootCategoryId;
|
675
|
+
const response = await this.client.request(`/big-product-categories/platform-${config.platformId}-root-${categoryId}.json`);
|
676
|
+
return response.categories;
|
677
|
+
}
|
660
678
|
/**
|
661
679
|
* 3. 获取产品标签列表
|
662
680
|
*/
|
@@ -2555,6 +2573,12 @@ class GT6SDK {
|
|
2555
2573
|
async getCategories_p(rootCategoryId_p) {
|
2556
2574
|
return this.articles.getCategories_p(rootCategoryId_p);
|
2557
2575
|
}
|
2576
|
+
/**
|
2577
|
+
* 2.2. 便捷方法:获取文章分类列表(使用下级平台ID)
|
2578
|
+
*/
|
2579
|
+
async getCategories_a(rootCategoryId) {
|
2580
|
+
return this.articles.getCategories_a(rootCategoryId);
|
2581
|
+
}
|
2558
2582
|
/**
|
2559
2583
|
* 3. 便捷方法:获取文章标签列表
|
2560
2584
|
*/
|
@@ -2627,6 +2651,12 @@ class GT6SDK {
|
|
2627
2651
|
async getProduct_p(productId) {
|
2628
2652
|
return this.products.getProduct_p(productId);
|
2629
2653
|
}
|
2654
|
+
/**
|
2655
|
+
* 8.2. 便捷方法:获取父平台产品分类列表
|
2656
|
+
*/
|
2657
|
+
async getCategories_b(rootCategoryId) {
|
2658
|
+
return this.products.getCategories_b(rootCategoryId);
|
2659
|
+
}
|
2630
2660
|
/**
|
2631
2661
|
* 9. 便捷方法:获取产品分类列表
|
2632
2662
|
*/
|