@gt6/sdk 1.0.22 → 1.0.23
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;IA0DzE;;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,11 +29,6 @@ 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');
|
37
32
|
// 检查缓存(只对GET请求缓存)
|
38
33
|
if (this.config.cache?.enabled && options.method !== 'POST' && options.method !== 'PUT' && options.method !== 'DELETE') {
|
39
34
|
const cached = this.cache.get(cacheKey);
|
@@ -1362,10 +1357,7 @@ class UsersAPI {
|
|
1362
1357
|
message: '用户未登录'
|
1363
1358
|
};
|
1364
1359
|
}
|
1365
|
-
|
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, {
|
1360
|
+
const response = await this.client.request(`/web/user/addresses?userType=${userType}`, {
|
1369
1361
|
method: 'GET',
|
1370
1362
|
headers: {
|
1371
1363
|
'Authorization': `Bearer ${token}`,
|