@gt6/sdk 1.0.21 → 1.0.22
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.
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/core/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAY,MAAM,SAAS,CAAC;AAE9C,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,KAAK,CAAgD;gBAEjD,MAAM,EAAE,SAAS;IAY7B;;OAEG;IACG,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/core/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAY,MAAM,SAAS,CAAC;AAE9C,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,KAAK,CAAgD;gBAEjD,MAAM,EAAE,SAAS;IAY7B;;OAEG;IACG,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,CAAC,CAAC;IAgEzE;;OAEG;IACH,SAAS,IAAI,SAAS;IAItB;;OAEG;IACH,UAAU,IAAI,IAAI;IAIlB;;OAEG;IACH,aAAa,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,KAAK,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE;CAWhF"}
|
package/dist/gt6-sdk.cjs.js
CHANGED
@@ -29,6 +29,11 @@ class GT6Client {
|
|
29
29
|
async request(endpoint, options = {}) {
|
30
30
|
const url = `${this.config.baseUrl}${endpoint}`;
|
31
31
|
const cacheKey = `${options.method || 'GET'}:${url}`;
|
32
|
+
// 添加调试信息
|
33
|
+
console.log('🔍 SDK client.request - endpoint:', endpoint);
|
34
|
+
console.log('🔍 SDK client.request - baseUrl:', this.config.baseUrl);
|
35
|
+
console.log('🔍 SDK client.request - 完整URL:', url);
|
36
|
+
console.log('🔍 SDK client.request - method:', options.method || 'GET');
|
32
37
|
// 检查缓存(只对GET请求缓存)
|
33
38
|
if (this.config.cache?.enabled && options.method !== 'POST' && options.method !== 'PUT' && options.method !== 'DELETE') {
|
34
39
|
const cached = this.cache.get(cacheKey);
|
@@ -1357,7 +1362,10 @@ class UsersAPI {
|
|
1357
1362
|
message: '用户未登录'
|
1358
1363
|
};
|
1359
1364
|
}
|
1360
|
-
|
1365
|
+
// 构建URL,确保查询参数正确编码
|
1366
|
+
const url = `/web/user/addresses?userType=${encodeURIComponent(userType.toString())}`;
|
1367
|
+
console.log('🔍 SDK getAddresses - 构建的URL:', url);
|
1368
|
+
const response = await this.client.request(url, {
|
1361
1369
|
method: 'GET',
|
1362
1370
|
headers: {
|
1363
1371
|
'Authorization': `Bearer ${token}`,
|