@anker-in/ui 0.2.2 → 0.3.0
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/.next-refresh +1 -0
- package/dist/demo-room.js +45 -1
- package/dist/demo-room.js.map +1 -1
- package/dist/demo-room.mjs +45 -1
- package/dist/demo-room.mjs.map +1 -1
- package/dist/index.css +36 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +445 -5
- package/dist/index.d.ts +445 -5
- package/dist/index.js +8846 -4996
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7899 -4055
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/demo-room.mjs
CHANGED
|
@@ -592,7 +592,7 @@ function useDemoRooms(client, params, options) {
|
|
|
592
592
|
return () => {
|
|
593
593
|
cancelled = true;
|
|
594
594
|
};
|
|
595
|
-
}, [client, params.team_code, params.brand_website, params.locale, enabled]);
|
|
595
|
+
}, [client, params.team_code, params.brand_website, params.business_type, params.locale, enabled]);
|
|
596
596
|
return state;
|
|
597
597
|
}
|
|
598
598
|
var AntdMobileIsolated = ({
|
|
@@ -1324,6 +1324,7 @@ var DemoRoomApiClient = class {
|
|
|
1324
1324
|
* 获取门店列表
|
|
1325
1325
|
* @param params.team_code 团队编码
|
|
1326
1326
|
* @param params.brand_website 品牌站点
|
|
1327
|
+
* @param params.business_type 业务类型(可选)
|
|
1327
1328
|
* @param params.locale 语言偏好(可选)
|
|
1328
1329
|
*/
|
|
1329
1330
|
async getDemoRooms(params) {
|
|
@@ -1334,6 +1335,9 @@ var DemoRoomApiClient = class {
|
|
|
1334
1335
|
if (params.brand_website) {
|
|
1335
1336
|
searchParams.append("brand_website", params.brand_website);
|
|
1336
1337
|
}
|
|
1338
|
+
if (params.business_type) {
|
|
1339
|
+
searchParams.append("business_type", params.business_type);
|
|
1340
|
+
}
|
|
1337
1341
|
if (params.locale) {
|
|
1338
1342
|
searchParams.append("locale", params.locale);
|
|
1339
1343
|
}
|
|
@@ -1363,6 +1367,7 @@ var DemoRoomApiClient = class {
|
|
|
1363
1367
|
* @param params.start_date 开始日期 (YYYY-MM-DD)
|
|
1364
1368
|
* @param params.end_date 结束日期 (YYYY-MM-DD)
|
|
1365
1369
|
* @param params.timezone 时区(可选)
|
|
1370
|
+
* @param params.business_type 预约用途类型(可选,如 'pod')
|
|
1366
1371
|
*/
|
|
1367
1372
|
async getTimeslots(code, params) {
|
|
1368
1373
|
const searchParams = new URLSearchParams({
|
|
@@ -1372,6 +1377,9 @@ var DemoRoomApiClient = class {
|
|
|
1372
1377
|
if (params.timezone) {
|
|
1373
1378
|
searchParams.append("timezone", params.timezone);
|
|
1374
1379
|
}
|
|
1380
|
+
if (params.business_type) {
|
|
1381
|
+
searchParams.append("business_type", params.business_type);
|
|
1382
|
+
}
|
|
1375
1383
|
return this.request(
|
|
1376
1384
|
`/api/v1/store/demorooms/${code}/timeslots?${searchParams.toString()}`
|
|
1377
1385
|
);
|
|
@@ -1437,6 +1445,42 @@ var DemoRoomApiClient = class {
|
|
|
1437
1445
|
);
|
|
1438
1446
|
return response.booking;
|
|
1439
1447
|
}
|
|
1448
|
+
/**
|
|
1449
|
+
* 编辑预约
|
|
1450
|
+
* @param token 预约凭证 (cancel_token)
|
|
1451
|
+
* @param data 编辑数据
|
|
1452
|
+
*/
|
|
1453
|
+
async editBooking(token, data) {
|
|
1454
|
+
return this.request(`/api/v1/store/bookings/${token}/edit`, {
|
|
1455
|
+
method: "POST",
|
|
1456
|
+
body: JSON.stringify(data)
|
|
1457
|
+
});
|
|
1458
|
+
}
|
|
1459
|
+
/**
|
|
1460
|
+
* 签到预约(模式1:精确签到)
|
|
1461
|
+
* @param data 签到数据
|
|
1462
|
+
*/
|
|
1463
|
+
async checkinBooking(data) {
|
|
1464
|
+
const response = await this.request(
|
|
1465
|
+
"/api/v1/store/bookings/checkin",
|
|
1466
|
+
{
|
|
1467
|
+
method: "POST",
|
|
1468
|
+
body: JSON.stringify(data)
|
|
1469
|
+
}
|
|
1470
|
+
);
|
|
1471
|
+
return response.booking;
|
|
1472
|
+
}
|
|
1473
|
+
/**
|
|
1474
|
+
* 查询 POD 作品信息(模式1:精确查询)
|
|
1475
|
+
* @param bookingToken 预约凭证
|
|
1476
|
+
*/
|
|
1477
|
+
async getBookingDesign(bookingToken) {
|
|
1478
|
+
const searchParams = new URLSearchParams();
|
|
1479
|
+
searchParams.append("booking_token", bookingToken);
|
|
1480
|
+
return this.request(
|
|
1481
|
+
`/api/v1/store/bookings/design?${searchParams.toString()}`
|
|
1482
|
+
);
|
|
1483
|
+
}
|
|
1440
1484
|
};
|
|
1441
1485
|
function createDemoRoomApi(config) {
|
|
1442
1486
|
return new DemoRoomApiClient(config);
|