sa2kit 1.6.113 → 1.6.114

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.
Files changed (63) hide show
  1. package/dist/{index-CdtT3qtg.d.ts → index-CL4cXTf2.d.ts} +9 -92
  2. package/dist/{index-BQVl--uZ.d.mts → index-D78lqnFG.d.mts} +1 -1
  3. package/dist/{index-DGuqvsv-.d.ts → index-Dw9P_FAX.d.ts} +1 -1
  4. package/dist/{index-CcKFeVut.d.mts → index-DyTrbHIH.d.mts} +9 -92
  5. package/dist/{index-C0YVsYpz.d.ts → index-Sy5rj_Et.d.ts} +2 -2
  6. package/dist/{index-DPd4bnYA.d.mts → index-anBAKrnN.d.mts} +2 -2
  7. package/dist/index.d.mts +3 -3
  8. package/dist/index.d.ts +3 -3
  9. package/dist/index.js +53 -70
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.mjs +53 -70
  12. package/dist/index.mjs.map +1 -1
  13. package/dist/showmasterpiece/core.js +41 -50
  14. package/dist/showmasterpiece/core.js.map +1 -1
  15. package/dist/showmasterpiece/core.mjs +41 -50
  16. package/dist/showmasterpiece/core.mjs.map +1 -1
  17. package/dist/showmasterpiece/db.js +2 -2
  18. package/dist/showmasterpiece/db.js.map +1 -1
  19. package/dist/showmasterpiece/db.mjs +2 -2
  20. package/dist/showmasterpiece/db.mjs.map +1 -1
  21. package/dist/showmasterpiece/index.js +40 -45
  22. package/dist/showmasterpiece/index.js.map +1 -1
  23. package/dist/showmasterpiece/index.mjs +40 -45
  24. package/dist/showmasterpiece/index.mjs.map +1 -1
  25. package/dist/showmasterpiece/logic/index.js +41 -50
  26. package/dist/showmasterpiece/logic/index.js.map +1 -1
  27. package/dist/showmasterpiece/logic/index.mjs +41 -50
  28. package/dist/showmasterpiece/logic/index.mjs.map +1 -1
  29. package/dist/showmasterpiece/server/index.js +2 -2
  30. package/dist/showmasterpiece/server/index.js.map +1 -1
  31. package/dist/showmasterpiece/server/index.mjs +2 -2
  32. package/dist/showmasterpiece/server/index.mjs.map +1 -1
  33. package/dist/showmasterpiece/service/client-business/index.d.mts +1 -1
  34. package/dist/showmasterpiece/service/client-business/index.d.ts +1 -1
  35. package/dist/showmasterpiece/service/client-business/index.js +45 -62
  36. package/dist/showmasterpiece/service/client-business/index.js.map +1 -1
  37. package/dist/showmasterpiece/service/client-business/index.mjs +45 -62
  38. package/dist/showmasterpiece/service/client-business/index.mjs.map +1 -1
  39. package/dist/showmasterpiece/service/index.d.mts +2 -2
  40. package/dist/showmasterpiece/service/index.d.ts +2 -2
  41. package/dist/showmasterpiece/service/index.js +45 -62
  42. package/dist/showmasterpiece/service/index.js.map +1 -1
  43. package/dist/showmasterpiece/service/index.mjs +45 -62
  44. package/dist/showmasterpiece/service/index.mjs.map +1 -1
  45. package/dist/showmasterpiece/service/web/index.d.mts +2 -2
  46. package/dist/showmasterpiece/service/web/index.d.ts +2 -2
  47. package/dist/showmasterpiece/service/web/index.js +45 -62
  48. package/dist/showmasterpiece/service/web/index.js.map +1 -1
  49. package/dist/showmasterpiece/service/web/index.mjs +45 -62
  50. package/dist/showmasterpiece/service/web/index.mjs.map +1 -1
  51. package/dist/showmasterpiece/ui/miniapp/index.js +5 -5
  52. package/dist/showmasterpiece/ui/miniapp/index.js.map +1 -1
  53. package/dist/showmasterpiece/ui/miniapp/index.mjs +5 -5
  54. package/dist/showmasterpiece/ui/miniapp/index.mjs.map +1 -1
  55. package/dist/showmasterpiece/ui/web/index.js +40 -45
  56. package/dist/showmasterpiece/ui/web/index.js.map +1 -1
  57. package/dist/showmasterpiece/ui/web/index.mjs +40 -45
  58. package/dist/showmasterpiece/ui/web/index.mjs.map +1 -1
  59. package/dist/showmasterpiece/web/index.js +40 -45
  60. package/dist/showmasterpiece/web/index.js.map +1 -1
  61. package/dist/showmasterpiece/web/index.mjs +40 -45
  62. package/dist/showmasterpiece/web/index.mjs.map +1 -1
  63. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { A as ArtCollection, M as MasterpiecesConfig, h as CollectionFormData, i as ArtworkFormData, j as ArtworkPage, k as Cart, l as AddToCartRequest, U as UpdateCartItemRequest, R as RemoveFromCartRequest, c as BatchBookingRequest, d as BatchBookingResponse, b as CreateBookingRequest, B as Booking, e as BookingListParams, f as BookingListResponse, m as UpdateBookingRequest, a as CollectionSummary, n as CartHistory, o as CartHistoryItem } from './booking-XgzSe0NL.js';
1
+ import { A as ArtCollection, M as MasterpiecesConfig, h as CollectionFormData, i as ArtworkFormData, j as ArtworkPage, k as Cart, l as AddToCartRequest, U as UpdateCartItemRequest, R as RemoveFromCartRequest, c as BatchBookingRequest, d as BatchBookingResponse, e as BookingListParams, b as CreateBookingRequest, B as Booking, f as BookingListResponse, m as UpdateBookingRequest, a as CollectionSummary, n as CartHistory, o as CartHistoryItem } from './booking-XgzSe0NL.js';
2
2
  import { b as bookingAdminService } from './bookingAdminService-Bo5jQssD.js';
3
3
  import { e as ExportField } from './types-DszP7SAQ.js';
4
4
 
@@ -414,112 +414,29 @@ declare namespace cartService {
414
414
 
415
415
  /**
416
416
  * ShowMasterpiece 模块 - 预订服务
417
- *
418
- * 提供画集预订功能的前端API调用服务,包括:
419
- * - 创建预订
420
- * - 查询预订列表
421
- * - 更新预订状态
422
- * - 获取画集简略信息
423
- *
424
- * @fileoverview 预订服务
425
417
  */
426
418
 
427
- /**
428
- * 预订服务类
429
- *
430
- * 提供预订功能相关的API调用方法,使用面向对象的方式封装HTTP请求。
431
- */
419
+ type BookingCredentials = Pick<BookingListParams, 'qqNumber' | 'phoneNumber'>;
432
420
  declare class BookingService {
433
421
  private static readonly BASE_URL;
434
- /**
435
- * 创建新预订
436
- *
437
- * @param data 预订数据
438
- * @returns 创建的预订信息
439
- */
440
422
  static createBooking(data: CreateBookingRequest): Promise<Booking>;
441
- /**
442
- * 获取预订列表
443
- *
444
- * @param params 查询参数
445
- * @returns 预订列表和分页信息
446
- */
447
423
  static getBookings(params?: BookingListParams): Promise<BookingListResponse>;
448
- /**
449
- * 获取单个预订详情
450
- *
451
- * @param id 预订ID
452
- * @returns 预订详情
453
- */
454
- static getBooking(id: number): Promise<Booking>;
455
- /**
456
- * 更新预订状态
457
- *
458
- * @param id 预订ID
459
- * @param data 更新数据
460
- * @returns 更新后的预订信息
461
- */
424
+ static getBooking(id: number, credentials?: BookingCredentials): Promise<Booking>;
462
425
  static updateBooking(id: number, data: UpdateBookingRequest): Promise<Booking>;
463
426
  /**
464
- * 删除预订
465
- *
466
- * @param id 预订ID
467
- */
468
- static deleteBooking(id: number): Promise<void>;
469
- /**
470
- * 获取可预订的画集列表
471
- *
472
- * @returns 画集简略信息列表
427
+ * 删除预订(须携带与下单一致的 QQ + 手机号,与 profile-v1 API 约定一致)
473
428
  */
429
+ static deleteBooking(id: number, credentials: BookingCredentials): Promise<void>;
474
430
  static getBookableCollections(): Promise<CollectionSummary[]>;
475
431
  }
476
- /**
477
- * 预订服务函数集
478
- *
479
- * 提供函数式的API调用接口,作为服务类的补充。
480
- */
481
- /**
482
- * 创建新预订
483
- *
484
- * @param data 预订数据
485
- * @returns 创建的预订信息
486
- */
487
432
  declare const createBooking: (data: CreateBookingRequest) => Promise<Booking>;
488
- /**
489
- * 获取预订列表
490
- *
491
- * @param params 查询参数
492
- * @returns 预订列表和分页信息
493
- */
494
433
  declare const getBookings: (params?: BookingListParams) => Promise<BookingListResponse>;
495
- /**
496
- * 获取单个预订详情
497
- *
498
- * @param id 预订ID
499
- * @returns 预订详情
500
- */
501
- declare const getBooking: (id: number) => Promise<Booking>;
502
- /**
503
- * 更新预订状态
504
- *
505
- * @param id 预订ID
506
- * @param data 更新数据
507
- * @returns 更新后的预订信息
508
- */
434
+ declare const getBooking: (id: number, credentials?: BookingCredentials) => Promise<Booking>;
509
435
  declare const updateBooking: (id: number, data: UpdateBookingRequest) => Promise<Booking>;
510
- /**
511
- * 删除预订
512
- *
513
- * @param id 预订ID
514
- */
515
- declare const deleteBooking: (id: number) => Promise<void>;
516
- /**
517
- * 获取可预订的画集列表
518
- *
519
- * @returns 画集简略信息列表
520
- */
436
+ declare const deleteBooking: (id: number, credentials: BookingCredentials) => Promise<void>;
521
437
  declare const getBookableCollections: () => Promise<CollectionSummary[]>;
522
438
 
439
+ type bookingService_BookingCredentials = BookingCredentials;
523
440
  type bookingService_BookingService = BookingService;
524
441
  declare const bookingService_BookingService: typeof BookingService;
525
442
  declare const bookingService_createBooking: typeof createBooking;
@@ -529,7 +446,7 @@ declare const bookingService_getBooking: typeof getBooking;
529
446
  declare const bookingService_getBookings: typeof getBookings;
530
447
  declare const bookingService_updateBooking: typeof updateBooking;
531
448
  declare namespace bookingService {
532
- export { bookingService_BookingService as BookingService, bookingService_createBooking as createBooking, bookingService_deleteBooking as deleteBooking, bookingService_getBookableCollections as getBookableCollections, bookingService_getBooking as getBooking, bookingService_getBookings as getBookings, bookingService_updateBooking as updateBooking };
449
+ export { type bookingService_BookingCredentials as BookingCredentials, bookingService_BookingService as BookingService, bookingService_createBooking as createBooking, bookingService_deleteBooking as deleteBooking, bookingService_getBookableCollections as getBookableCollections, bookingService_getBooking as getBooking, bookingService_getBookings as getBookings, bookingService_updateBooking as updateBooking };
533
450
  }
534
451
 
535
452
  /**
@@ -1,7 +1,7 @@
1
1
  import { a as CollectionSummary, b as CreateBookingRequest, B as Booking, c as BatchBookingRequest, d as BatchBookingResponse, e as BookingListParams, f as BookingListResponse } from './booking-XgzSe0NL.mjs';
2
2
  import { P as PopupConfig } from './popup-BAgWsa4O.mjs';
3
3
  import { CollectionOverview } from './showmasterpiece/service/api/index.mjs';
4
- import { i as index$1 } from './index-CcKFeVut.mjs';
4
+ import { i as index$1 } from './index-DyTrbHIH.mjs';
5
5
 
6
6
  declare const DEFAULT_WEB_BASE_URL = "";
7
7
  declare const getCollectionsOverview: (baseUrl?: string) => Promise<CollectionOverview[]>;
@@ -1,7 +1,7 @@
1
1
  import { a as CollectionSummary, b as CreateBookingRequest, B as Booking, c as BatchBookingRequest, d as BatchBookingResponse, e as BookingListParams, f as BookingListResponse } from './booking-XgzSe0NL.js';
2
2
  import { P as PopupConfig } from './popup-BAgWsa4O.js';
3
3
  import { CollectionOverview } from './showmasterpiece/service/api/index.js';
4
- import { i as index$1 } from './index-CdtT3qtg.js';
4
+ import { i as index$1 } from './index-CL4cXTf2.js';
5
5
 
6
6
  declare const DEFAULT_WEB_BASE_URL = "";
7
7
  declare const getCollectionsOverview: (baseUrl?: string) => Promise<CollectionOverview[]>;
@@ -1,4 +1,4 @@
1
- import { A as ArtCollection, M as MasterpiecesConfig, h as CollectionFormData, i as ArtworkFormData, j as ArtworkPage, k as Cart, l as AddToCartRequest, U as UpdateCartItemRequest, R as RemoveFromCartRequest, c as BatchBookingRequest, d as BatchBookingResponse, b as CreateBookingRequest, B as Booking, e as BookingListParams, f as BookingListResponse, m as UpdateBookingRequest, a as CollectionSummary, n as CartHistory, o as CartHistoryItem } from './booking-XgzSe0NL.mjs';
1
+ import { A as ArtCollection, M as MasterpiecesConfig, h as CollectionFormData, i as ArtworkFormData, j as ArtworkPage, k as Cart, l as AddToCartRequest, U as UpdateCartItemRequest, R as RemoveFromCartRequest, c as BatchBookingRequest, d as BatchBookingResponse, e as BookingListParams, b as CreateBookingRequest, B as Booking, f as BookingListResponse, m as UpdateBookingRequest, a as CollectionSummary, n as CartHistory, o as CartHistoryItem } from './booking-XgzSe0NL.mjs';
2
2
  import { b as bookingAdminService } from './bookingAdminService-BdnjVRY8.mjs';
3
3
  import { e as ExportField } from './types-DszP7SAQ.mjs';
4
4
 
@@ -414,112 +414,29 @@ declare namespace cartService {
414
414
 
415
415
  /**
416
416
  * ShowMasterpiece 模块 - 预订服务
417
- *
418
- * 提供画集预订功能的前端API调用服务,包括:
419
- * - 创建预订
420
- * - 查询预订列表
421
- * - 更新预订状态
422
- * - 获取画集简略信息
423
- *
424
- * @fileoverview 预订服务
425
417
  */
426
418
 
427
- /**
428
- * 预订服务类
429
- *
430
- * 提供预订功能相关的API调用方法,使用面向对象的方式封装HTTP请求。
431
- */
419
+ type BookingCredentials = Pick<BookingListParams, 'qqNumber' | 'phoneNumber'>;
432
420
  declare class BookingService {
433
421
  private static readonly BASE_URL;
434
- /**
435
- * 创建新预订
436
- *
437
- * @param data 预订数据
438
- * @returns 创建的预订信息
439
- */
440
422
  static createBooking(data: CreateBookingRequest): Promise<Booking>;
441
- /**
442
- * 获取预订列表
443
- *
444
- * @param params 查询参数
445
- * @returns 预订列表和分页信息
446
- */
447
423
  static getBookings(params?: BookingListParams): Promise<BookingListResponse>;
448
- /**
449
- * 获取单个预订详情
450
- *
451
- * @param id 预订ID
452
- * @returns 预订详情
453
- */
454
- static getBooking(id: number): Promise<Booking>;
455
- /**
456
- * 更新预订状态
457
- *
458
- * @param id 预订ID
459
- * @param data 更新数据
460
- * @returns 更新后的预订信息
461
- */
424
+ static getBooking(id: number, credentials?: BookingCredentials): Promise<Booking>;
462
425
  static updateBooking(id: number, data: UpdateBookingRequest): Promise<Booking>;
463
426
  /**
464
- * 删除预订
465
- *
466
- * @param id 预订ID
467
- */
468
- static deleteBooking(id: number): Promise<void>;
469
- /**
470
- * 获取可预订的画集列表
471
- *
472
- * @returns 画集简略信息列表
427
+ * 删除预订(须携带与下单一致的 QQ + 手机号,与 profile-v1 API 约定一致)
473
428
  */
429
+ static deleteBooking(id: number, credentials: BookingCredentials): Promise<void>;
474
430
  static getBookableCollections(): Promise<CollectionSummary[]>;
475
431
  }
476
- /**
477
- * 预订服务函数集
478
- *
479
- * 提供函数式的API调用接口,作为服务类的补充。
480
- */
481
- /**
482
- * 创建新预订
483
- *
484
- * @param data 预订数据
485
- * @returns 创建的预订信息
486
- */
487
432
  declare const createBooking: (data: CreateBookingRequest) => Promise<Booking>;
488
- /**
489
- * 获取预订列表
490
- *
491
- * @param params 查询参数
492
- * @returns 预订列表和分页信息
493
- */
494
433
  declare const getBookings: (params?: BookingListParams) => Promise<BookingListResponse>;
495
- /**
496
- * 获取单个预订详情
497
- *
498
- * @param id 预订ID
499
- * @returns 预订详情
500
- */
501
- declare const getBooking: (id: number) => Promise<Booking>;
502
- /**
503
- * 更新预订状态
504
- *
505
- * @param id 预订ID
506
- * @param data 更新数据
507
- * @returns 更新后的预订信息
508
- */
434
+ declare const getBooking: (id: number, credentials?: BookingCredentials) => Promise<Booking>;
509
435
  declare const updateBooking: (id: number, data: UpdateBookingRequest) => Promise<Booking>;
510
- /**
511
- * 删除预订
512
- *
513
- * @param id 预订ID
514
- */
515
- declare const deleteBooking: (id: number) => Promise<void>;
516
- /**
517
- * 获取可预订的画集列表
518
- *
519
- * @returns 画集简略信息列表
520
- */
436
+ declare const deleteBooking: (id: number, credentials: BookingCredentials) => Promise<void>;
521
437
  declare const getBookableCollections: () => Promise<CollectionSummary[]>;
522
438
 
439
+ type bookingService_BookingCredentials = BookingCredentials;
523
440
  type bookingService_BookingService = BookingService;
524
441
  declare const bookingService_BookingService: typeof BookingService;
525
442
  declare const bookingService_createBooking: typeof createBooking;
@@ -529,7 +446,7 @@ declare const bookingService_getBooking: typeof getBooking;
529
446
  declare const bookingService_getBookings: typeof getBookings;
530
447
  declare const bookingService_updateBooking: typeof updateBooking;
531
448
  declare namespace bookingService {
532
- export { bookingService_BookingService as BookingService, bookingService_createBooking as createBooking, bookingService_deleteBooking as deleteBooking, bookingService_getBookableCollections as getBookableCollections, bookingService_getBooking as getBooking, bookingService_getBookings as getBookings, bookingService_updateBooking as updateBooking };
449
+ export { type bookingService_BookingCredentials as BookingCredentials, bookingService_BookingService as BookingService, bookingService_createBooking as createBooking, bookingService_deleteBooking as deleteBooking, bookingService_getBookableCollections as getBookableCollections, bookingService_getBooking as getBooking, bookingService_getBookings as getBookings, bookingService_updateBooking as updateBooking };
533
450
  }
534
451
 
535
452
  /**
@@ -1,6 +1,6 @@
1
1
  import { CollectionOverview, HttpMethod, RequestExecutor, RequestOptions, ShowmasterpieceClient, createShowmasterpieceClient } from './showmasterpiece/service/api/index.js';
2
- import { i as index$3 } from './index-DGuqvsv-.js';
3
- import { i as index$1 } from './index-CdtT3qtg.js';
2
+ import { i as index$3 } from './index-Dw9P_FAX.js';
3
+ import { i as index$1 } from './index-CL4cXTf2.js';
4
4
  import { i as index$2 } from './index-Qwpwc57i.js';
5
5
 
6
6
  declare const index_CollectionOverview: typeof CollectionOverview;
@@ -1,6 +1,6 @@
1
1
  import { CollectionOverview, HttpMethod, RequestExecutor, RequestOptions, ShowmasterpieceClient, createShowmasterpieceClient } from './showmasterpiece/service/api/index.mjs';
2
- import { i as index$3 } from './index-BQVl--uZ.mjs';
3
- import { i as index$1 } from './index-CcKFeVut.mjs';
2
+ import { i as index$3 } from './index-D78lqnFG.mjs';
3
+ import { i as index$1 } from './index-DyTrbHIH.mjs';
4
4
  import { i as index$2 } from './index-D-KPo7uD.mjs';
5
5
 
6
6
  declare const index_CollectionOverview: typeof CollectionOverview;
package/dist/index.d.mts CHANGED
@@ -10,7 +10,7 @@ export { U as AlertDialog, a4 as AlertDialogAction, a5 as AlertDialogCancel, a3
10
10
  export { B as Ball, C as CollisionBalls, a as CollisionBallsConfig, T as Timeline, b as TimelineConfig, c as TimelineItem } from './CollisionBalls-BY-JQrI2.mjs';
11
11
  import { A as ArtCollection, i as ArtworkFormData, j as ArtworkPage, y as CategoryDescription, z as CategoryInfo, C as CategoryOption, v as CollectionCategory, p as CollectionCategoryType, h as CollectionFormData, D as ConfigFormData, H as HomeTabConfigItem, M as MasterpiecesConfig, E as MiniappFloatingButtonsConfig, F as buildDefaultHomeTabConfig, G as categories, I as defaultHomeTabCategoryOrder, J as defaultMiniappFloatingButtonsConfig, w as getAvailableCategories, K as getCategoryDisplayName$1, L as getCategoryInfo, x as isValidCategory, N as normalizeHomeTabConfig, O as normalizeMiniappFloatingButtonsConfig } from './booking-XgzSe0NL.mjs';
12
12
  import { C as CartContextState, i as index$3 } from './index-p1Lg6gVF.mjs';
13
- import { i as index$6 } from './index-DPd4bnYA.mjs';
13
+ import { i as index$6 } from './index-anBAKrnN.mjs';
14
14
  import { i as index$5 } from './index-DUqkAhoA.mjs';
15
15
  import { i as index$7 } from './index-BU8-ydQ6.mjs';
16
16
  import { i as index$4 } from './index-fr-gztbr.mjs';
@@ -54,8 +54,8 @@ import 'class-variance-authority/types';
54
54
  import 'class-variance-authority';
55
55
  import './bookingAdminService-BdnjVRY8.mjs';
56
56
  import './showmasterpiece/service/api/index.mjs';
57
- import './index-BQVl--uZ.mjs';
58
- import './index-CcKFeVut.mjs';
57
+ import './index-D78lqnFG.mjs';
58
+ import './index-DyTrbHIH.mjs';
59
59
  import './types-DszP7SAQ.mjs';
60
60
  import './index-D-KPo7uD.mjs';
61
61
  import './client-DS3Al7ly.mjs';
package/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@ export { U as AlertDialog, a4 as AlertDialogAction, a5 as AlertDialogCancel, a3
10
10
  export { B as Ball, C as CollisionBalls, a as CollisionBallsConfig, T as Timeline, b as TimelineConfig, c as TimelineItem } from './CollisionBalls-BY-JQrI2.js';
11
11
  import { A as ArtCollection, i as ArtworkFormData, j as ArtworkPage, y as CategoryDescription, z as CategoryInfo, C as CategoryOption, v as CollectionCategory, p as CollectionCategoryType, h as CollectionFormData, D as ConfigFormData, H as HomeTabConfigItem, M as MasterpiecesConfig, E as MiniappFloatingButtonsConfig, F as buildDefaultHomeTabConfig, G as categories, I as defaultHomeTabCategoryOrder, J as defaultMiniappFloatingButtonsConfig, w as getAvailableCategories, K as getCategoryDisplayName$1, L as getCategoryInfo, x as isValidCategory, N as normalizeHomeTabConfig, O as normalizeMiniappFloatingButtonsConfig } from './booking-XgzSe0NL.js';
12
12
  import { C as CartContextState, i as index$3 } from './index-Brow50m0.js';
13
- import { i as index$6 } from './index-C0YVsYpz.js';
13
+ import { i as index$6 } from './index-Sy5rj_Et.js';
14
14
  import { i as index$5 } from './index-DUqkAhoA.js';
15
15
  import { i as index$7 } from './index-BU8-ydQ6.js';
16
16
  import { i as index$4 } from './index-dD5bvyC_.js';
@@ -54,8 +54,8 @@ import 'class-variance-authority/types';
54
54
  import 'class-variance-authority';
55
55
  import './bookingAdminService-Bo5jQssD.js';
56
56
  import './showmasterpiece/service/api/index.js';
57
- import './index-DGuqvsv-.js';
58
- import './index-CdtT3qtg.js';
57
+ import './index-Dw9P_FAX.js';
58
+ import './index-CL4cXTf2.js';
59
59
  import './types-DszP7SAQ.js';
60
60
  import './index-Qwpwc57i.js';
61
61
  import './client-B9PRAxXu.js';
package/dist/index.js CHANGED
@@ -7963,46 +7963,46 @@ __export(bookingService_exports, {
7963
7963
  getBookings: () => getBookings2,
7964
7964
  updateBooking: () => updateBooking
7965
7965
  });
7966
+ function appendBookingCredentials(path4, credentials) {
7967
+ if (!credentials?.qqNumber?.trim() || !credentials?.phoneNumber?.trim()) {
7968
+ return path4;
7969
+ }
7970
+ const params = new URLSearchParams({
7971
+ qqNumber: credentials.qqNumber.trim(),
7972
+ phoneNumber: credentials.phoneNumber.trim()
7973
+ });
7974
+ return `${path4}?${params.toString()}`;
7975
+ }
7976
+ function bookingCredentialsBody(credentials) {
7977
+ if (!credentials?.qqNumber?.trim() || !credentials?.phoneNumber?.trim()) {
7978
+ return void 0;
7979
+ }
7980
+ return JSON.stringify({
7981
+ qqNumber: credentials.qqNumber.trim(),
7982
+ phoneNumber: credentials.phoneNumber.trim()
7983
+ });
7984
+ }
7985
+ async function parseErrorMessage(response, fallback) {
7986
+ const data = await response.json().catch(() => ({}));
7987
+ if (typeof data?.error === "string" && data.error) return data.error;
7988
+ if (typeof data?.message === "string" && data.message) return data.message;
7989
+ return fallback;
7990
+ }
7966
7991
  var BookingService = class {
7967
- /**
7968
- * 创建新预订
7969
- *
7970
- * @param data 预订数据
7971
- * @returns 创建的预订信息
7972
- */
7973
7992
  static async createBooking(data) {
7974
7993
  return createBooking(data);
7975
7994
  }
7976
- /**
7977
- * 获取预订列表
7978
- *
7979
- * @param params 查询参数
7980
- * @returns 预订列表和分页信息
7981
- */
7982
7995
  static async getBookings(params = {}) {
7983
7996
  return getBookings(params);
7984
7997
  }
7985
- /**
7986
- * 获取单个预订详情
7987
- *
7988
- * @param id 预订ID
7989
- * @returns 预订详情
7990
- */
7991
- static async getBooking(id2) {
7992
- const response = await fetch(`${this.BASE_URL}/${id2}`);
7998
+ static async getBooking(id2, credentials) {
7999
+ const url = appendBookingCredentials(`${this.BASE_URL}/${id2}`, credentials);
8000
+ const response = await fetch(url);
7993
8001
  if (!response.ok) {
7994
- const error = await response.json().catch(() => ({ message: "\u83B7\u53D6\u9884\u8BA2\u8BE6\u60C5\u5931\u8D25" }));
7995
- throw new Error(error.message || "\u83B7\u53D6\u9884\u8BA2\u8BE6\u60C5\u5931\u8D25");
8002
+ throw new Error(await parseErrorMessage(response, "\u83B7\u53D6\u9884\u8BA2\u8BE6\u60C5\u5931\u8D25"));
7996
8003
  }
7997
8004
  return response.json();
7998
8005
  }
7999
- /**
8000
- * 更新预订状态
8001
- *
8002
- * @param id 预订ID
8003
- * @param data 更新数据
8004
- * @returns 更新后的预订信息
8005
- */
8006
8006
  static async updateBooking(id2, data) {
8007
8007
  const response = await fetch(`${this.BASE_URL}/${id2}`, {
8008
8008
  method: "PUT",
@@ -8012,53 +8012,36 @@ var BookingService = class {
8012
8012
  body: JSON.stringify(data)
8013
8013
  });
8014
8014
  if (!response.ok) {
8015
- const error = await response.json().catch(() => ({ message: "\u66F4\u65B0\u9884\u8BA2\u5931\u8D25" }));
8016
- throw new Error(error.message || "\u66F4\u65B0\u9884\u8BA2\u5931\u8D25");
8015
+ throw new Error(await parseErrorMessage(response, "\u66F4\u65B0\u9884\u8BA2\u5931\u8D25"));
8017
8016
  }
8018
8017
  return response.json();
8019
8018
  }
8020
8019
  /**
8021
- * 删除预订
8022
- *
8023
- * @param id 预订ID
8020
+ * 删除预订(须携带与下单一致的 QQ + 手机号,与 profile-v1 API 约定一致)
8024
8021
  */
8025
- static async deleteBooking(id2) {
8026
- const response = await fetch(`${this.BASE_URL}/${id2}`, {
8027
- method: "DELETE"
8022
+ static async deleteBooking(id2, credentials) {
8023
+ const url = appendBookingCredentials(`${this.BASE_URL}/${id2}`, credentials);
8024
+ const body = bookingCredentialsBody(credentials);
8025
+ const response = await fetch(url, {
8026
+ method: "DELETE",
8027
+ headers: body ? { "Content-Type": "application/json" } : void 0,
8028
+ body
8028
8029
  });
8029
8030
  if (!response.ok) {
8030
- const error = await response.json().catch(() => ({ message: "\u5220\u9664\u9884\u8BA2\u5931\u8D25" }));
8031
- throw new Error(error.message || "\u5220\u9664\u9884\u8BA2\u5931\u8D25");
8031
+ throw new Error(await parseErrorMessage(response, "\u5220\u9664\u9884\u8BA2\u5931\u8D25"));
8032
8032
  }
8033
8033
  }
8034
- /**
8035
- * 获取可预订的画集列表
8036
- *
8037
- * @returns 画集简略信息列表
8038
- */
8039
8034
  static async getBookableCollections() {
8040
8035
  return getBookableCollections();
8041
8036
  }
8042
8037
  };
8043
8038
  BookingService.BASE_URL = "/api/showmasterpiece/bookings";
8044
- var createBooking2 = (data) => {
8045
- return BookingService.createBooking(data);
8046
- };
8047
- var getBookings2 = (params) => {
8048
- return BookingService.getBookings(params);
8049
- };
8050
- var getBooking = (id2) => {
8051
- return BookingService.getBooking(id2);
8052
- };
8053
- var updateBooking = (id2, data) => {
8054
- return BookingService.updateBooking(id2, data);
8055
- };
8056
- var deleteBooking = (id2) => {
8057
- return BookingService.deleteBooking(id2);
8058
- };
8059
- var getBookableCollections2 = () => {
8060
- return BookingService.getBookableCollections();
8061
- };
8039
+ var createBooking2 = (data) => BookingService.createBooking(data);
8040
+ var getBookings2 = (params) => BookingService.getBookings(params);
8041
+ var getBooking = (id2, credentials) => BookingService.getBooking(id2, credentials);
8042
+ var updateBooking = (id2, data) => BookingService.updateBooking(id2, data);
8043
+ var deleteBooking = (id2, credentials) => BookingService.deleteBooking(id2, credentials);
8044
+ var getBookableCollections2 = () => BookingService.getBookableCollections();
8062
8045
 
8063
8046
  // src/business/showmasterpiece/logic/hooks/useBooking.ts
8064
8047
  function useBooking(_props = {}) {
@@ -12451,10 +12434,10 @@ var BookingQueryService = class {
12451
12434
  conditions.push(drizzleOrm.eq(comicUniverseBookings.collectionId, input.collectionId));
12452
12435
  }
12453
12436
  if (input.qqNumber) {
12454
- conditions.push(drizzleOrm.like(comicUniverseBookings.qqNumber, `%${input.qqNumber}%`));
12437
+ conditions.push(drizzleOrm.eq(comicUniverseBookings.qqNumber, input.qqNumber.trim()));
12455
12438
  }
12456
12439
  if (input.phoneNumber) {
12457
- conditions.push(drizzleOrm.like(comicUniverseBookings.phoneNumber, `%${input.phoneNumber}%`));
12440
+ conditions.push(drizzleOrm.eq(comicUniverseBookings.phoneNumber, input.phoneNumber.trim()));
12458
12441
  }
12459
12442
  if (input.status) {
12460
12443
  conditions.push(drizzleOrm.eq(comicUniverseBookings.status, input.status));
@@ -19354,7 +19337,7 @@ var CartHistoryPage = ({
19354
19337
  const handleDeleteBooking = async (bookingId) => {
19355
19338
  if (confirm("\u786E\u5B9A\u8981\u5220\u9664\u8FD9\u6761\u9884\u8BA2\u8BB0\u5F55\u5417\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002")) {
19356
19339
  try {
19357
- await BookingService.deleteBooking(bookingId);
19340
+ await BookingService.deleteBooking(bookingId, { qqNumber, phoneNumber });
19358
19341
  console.log("\u9884\u8BA2\u8BB0\u5F55\u5220\u9664\u6210\u529F");
19359
19342
  await loadBookings();
19360
19343
  } catch (error2) {
@@ -20416,8 +20399,8 @@ var HistoryMiniappPage = ({ apiBaseUrl = DEFAULT_BASE_URL }) => {
20416
20399
  return;
20417
20400
  }
20418
20401
  setPrivacyConsented(true);
20419
- if (!qqNumber.trim() && !phoneNumber.trim()) {
20420
- Taro2__default.default.showToast({ title: "\u8BF7\u8F93\u5165QQ\u53F7\u6216\u8054\u7CFB\u65B9\u5F0F", icon: "none" });
20402
+ if (!qqNumber.trim() || !phoneNumber.trim()) {
20403
+ Taro2__default.default.showToast({ title: "\u8BF7\u540C\u65F6\u586B\u5199QQ\u53F7\u4E0E\u8054\u7CFB\u65B9\u5F0F", icon: "none" });
20421
20404
  return;
20422
20405
  }
20423
20406
  setLoading(true);
@@ -20426,8 +20409,8 @@ var HistoryMiniappPage = ({ apiBaseUrl = DEFAULT_BASE_URL }) => {
20426
20409
  try {
20427
20410
  const result = await getBookings3(
20428
20411
  {
20429
- qqNumber: qqNumber.trim() || void 0,
20430
- phoneNumber: phoneNumber.trim() || void 0,
20412
+ qqNumber: qqNumber.trim(),
20413
+ phoneNumber: phoneNumber.trim(),
20431
20414
  page: 1,
20432
20415
  limit: 50
20433
20416
  },
@@ -20456,7 +20439,7 @@ var HistoryMiniappPage = ({ apiBaseUrl = DEFAULT_BASE_URL }) => {
20456
20439
  completedCount
20457
20440
  };
20458
20441
  }, [records]);
20459
- return /* @__PURE__ */ React53__namespace.default.createElement(components.View, { className: "min-h-screen bg-gradient-to-br from-white to-prussian-blue-100 pb-12 text-rich-black" }, /* @__PURE__ */ React53__namespace.default.createElement(PageHeader_default, { title: "\u5386\u53F2\u8BB0\u5F55\u67E5\u8BE2", subtitle: "\u8F93\u5165 QQ \u6216\u8054\u7CFB\u65B9\u5F0F\u67E5\u8BE2\u9884\u8BA2\u8BB0\u5F55" }), /* @__PURE__ */ React53__namespace.default.createElement(components.View, { className: "mx-4 mt-5 rounded-3xl border border-prussian-blue-200 bg-white px-5 py-5 shadow-sm" }, /* @__PURE__ */ React53__namespace.default.createElement(
20442
+ return /* @__PURE__ */ React53__namespace.default.createElement(components.View, { className: "min-h-screen bg-gradient-to-br from-white to-prussian-blue-100 pb-12 text-rich-black" }, /* @__PURE__ */ React53__namespace.default.createElement(PageHeader_default, { title: "\u5386\u53F2\u8BB0\u5F55\u67E5\u8BE2", subtitle: "\u8BF7\u540C\u65F6\u586B\u5199 QQ \u53F7\u4E0E\u8054\u7CFB\u65B9\u5F0F\u67E5\u8BE2\u9884\u8BA2\u8BB0\u5F55" }), /* @__PURE__ */ React53__namespace.default.createElement(components.View, { className: "mx-4 mt-5 rounded-3xl border border-prussian-blue-200 bg-white px-5 py-5 shadow-sm" }, /* @__PURE__ */ React53__namespace.default.createElement(
20460
20443
  FormInput,
20461
20444
  {
20462
20445
  label: "QQ\u53F7",