zcw-shared 1.49.4 → 2.1.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.
Files changed (83) hide show
  1. package/README.md +9 -0
  2. package/dist/functions/deploy/publishToPgyer.d.ts +16 -0
  3. package/dist/functions/deploy/publishToPgyer.js +96 -0
  4. package/dist/functions/deploy/publishToPgyer.js.map +1 -0
  5. package/dist/functions/fake/generateFakeBankCard.d.ts +87 -0
  6. package/dist/functions/fake/generateFakeBankCard.js +152 -0
  7. package/dist/functions/fake/generateFakeBankCard.js.map +1 -0
  8. package/dist/functions/fake/generateFakeBusinessLicense.d.ts +21 -0
  9. package/dist/functions/fake/generateFakeBusinessLicense.js +160 -0
  10. package/dist/functions/fake/generateFakeBusinessLicense.js.map +1 -0
  11. package/dist/functions/fake/generateFakeDrivingLicense.d.ts +31 -0
  12. package/dist/functions/fake/generateFakeDrivingLicense.js +119 -0
  13. package/dist/functions/fake/generateFakeDrivingLicense.js.map +1 -0
  14. package/dist/functions/fake/generateFakeIdCard.d.ts +30 -0
  15. package/dist/functions/fake/generateFakeIdCard.js +123 -0
  16. package/dist/functions/fake/generateFakeIdCard.js.map +1 -0
  17. package/dist/functions/fake/generateFakeLicensePlate.d.ts +13 -0
  18. package/dist/functions/fake/generateFakeLicensePlate.js +87 -0
  19. package/dist/functions/fake/generateFakeLicensePlate.js.map +1 -0
  20. package/dist/functions/file/getIconfontNameByExtension.d.ts +7 -0
  21. package/dist/functions/file/getIconfontNameByExtension.js +140 -0
  22. package/dist/functions/file/getIconfontNameByExtension.js.map +1 -0
  23. package/dist/functions/image/renderBankCard.d.ts +1 -1
  24. package/dist/functions/image/renderBusinessLicense.d.ts +1 -1
  25. package/dist/functions/image/renderDrivingLicense.d.ts +1 -1
  26. package/dist/functions/image/renderIdCard.d.ts +1 -1
  27. package/dist/functions/image/renderLicensePlate.d.ts +1 -1
  28. package/dist/functions/qiankun/createQiankunVueApp.d.ts +17 -0
  29. package/dist/functions/qiankun/createQiankunVueApp.js +40 -0
  30. package/dist/functions/qiankun/createQiankunVueApp.js.map +1 -0
  31. package/dist/functions/uniapp/api/audio.d.ts +28 -0
  32. package/dist/functions/uniapp/api/audio.js +49 -0
  33. package/dist/functions/uniapp/api/audio.js.map +1 -0
  34. package/dist/functions/uniapp/api/auth.d.ts +44 -0
  35. package/dist/functions/uniapp/api/auth.js +59 -0
  36. package/dist/functions/uniapp/api/auth.js.map +1 -0
  37. package/dist/functions/uniapp/api/dom.d.ts +2 -0
  38. package/dist/functions/uniapp/api/dom.js +7 -0
  39. package/dist/functions/uniapp/api/dom.js.map +1 -0
  40. package/dist/functions/uniapp/api/index.d.ts +10 -0
  41. package/dist/functions/uniapp/api/index.js +11 -0
  42. package/dist/functions/uniapp/api/index.js.map +1 -0
  43. package/dist/functions/uniapp/api/media.d.ts +13 -0
  44. package/dist/functions/uniapp/api/media.js +16 -0
  45. package/dist/functions/uniapp/api/media.js.map +1 -0
  46. package/dist/functions/uniapp/api/navigation.d.ts +12 -0
  47. package/dist/functions/uniapp/api/navigation.js +72 -0
  48. package/dist/functions/uniapp/api/navigation.js.map +1 -0
  49. package/dist/functions/uniapp/api/network.d.ts +40 -0
  50. package/dist/functions/uniapp/api/network.js +60 -0
  51. package/dist/functions/uniapp/api/network.js.map +1 -0
  52. package/dist/functions/uniapp/api/storage.d.ts +7 -0
  53. package/dist/functions/uniapp/api/storage.js +84 -0
  54. package/dist/functions/uniapp/api/storage.js.map +1 -0
  55. package/dist/functions/uniapp/api/system.d.ts +54 -0
  56. package/dist/functions/uniapp/api/system.js +31 -0
  57. package/dist/functions/uniapp/api/system.js.map +1 -0
  58. package/dist/functions/uniapp/api/ui.d.ts +48 -0
  59. package/dist/functions/uniapp/api/ui.js +81 -0
  60. package/dist/functions/uniapp/api/ui.js.map +1 -0
  61. package/dist/functions/uniapp/app-plus/buildIOSApp.js +12 -0
  62. package/dist/functions/uniapp/app-plus/buildIOSApp.js.map +1 -1
  63. package/dist/functions/uniapp/platform.d.ts +16 -0
  64. package/dist/functions/uniapp/platform.js +112 -0
  65. package/dist/functions/uniapp/platform.js.map +1 -0
  66. package/dist/schemas/auth.schema.d.ts +368 -0
  67. package/dist/schemas/auth.schema.js +40 -0
  68. package/dist/schemas/auth.schema.js.map +1 -0
  69. package/dist/schemas/video.schema.d.ts +391 -0
  70. package/dist/schemas/video.schema.js +55 -0
  71. package/dist/schemas/video.schema.js.map +1 -0
  72. package/package.json +33 -7
  73. package/references/dom.d.ts +11 -0
  74. package/types/auth.d.ts +57 -0
  75. package/types/checkin-config.d.ts +28 -0
  76. package/types/cloud-disk-config.d.ts +36 -0
  77. package/types/music.d.ts +33 -0
  78. package/types/order.d.ts +61 -0
  79. package/types/points-config.d.ts +44 -0
  80. package/types/product.d.ts +41 -0
  81. package/types/uniapp-ios-build.d.ts +2 -0
  82. package/types/user.d.ts +36 -0
  83. package/types/video.d.ts +71 -0
@@ -0,0 +1,28 @@
1
+ export interface CheckinConfig {
2
+ // 基础配置
3
+ enabled: boolean // 是否启用签到功能
4
+
5
+ // 签到奖励配置
6
+ daily_reward_points: number // 每日签到奖励积分
7
+ consecutive_reward_enabled: boolean // 是否启用连续签到奖励
8
+ consecutive_rewards: Array<{
9
+ days: number // 连续天数
10
+ points: number // 奖励积分
11
+ }> // 连续签到奖励规则
12
+
13
+ // 时间配置
14
+ checkin_time_limit_start?: string // 签到开始时间(HH:mm)
15
+ checkin_time_limit_end?: string // 签到结束时间(HH:mm)
16
+ allow_midnight_checkin: boolean // 是否允许跨天签到(0点后仍可签前一天)
17
+
18
+ // 其他配置
19
+ max_consecutive_days: number // 最大连续签到天数(用于统计显示)
20
+ reset_consecutive_on_miss: boolean // 断签是否重置连续天数
21
+ }
22
+
23
+ export interface CheckinConfigResponse {
24
+ data: CheckinConfig
25
+ }
26
+
27
+ export interface UpdateCheckinConfigPayload
28
+ extends Partial<CheckinConfig> {}
@@ -0,0 +1,36 @@
1
+ export interface CloudDiskConfig {
2
+ // 容量配置
3
+ default_user_capacity: number // 默认用户容量(字节)
4
+ max_user_capacity: number // 最大用户容量(字节)
5
+ max_file_size: number // 单个文件最大大小(字节)
6
+
7
+ // 私有化配置
8
+ is_private: boolean // 是否私有化部署
9
+ allow_public_share: boolean // 是否允许公开分享
10
+ require_auth_for_upload: boolean // 上传是否需要认证
11
+
12
+ // 存储配置
13
+ default_bucket: string // 默认存储桶
14
+ allowed_file_types: string[] // 允许的文件类型(MIME类型)
15
+ blocked_file_types: string[] // 禁止的文件类型(MIME类型)
16
+
17
+ // 功能配置
18
+ enable_thumbnail: boolean // 是否启用缩略图
19
+ enable_preview: boolean // 是否启用预览
20
+ enable_download: boolean // 是否允许下载
21
+
22
+ // 安全配置
23
+ max_share_expire_days: number // 分享链接最大过期天数
24
+ require_password_for_share: boolean // 分享是否需要密码
25
+
26
+ // 其他配置
27
+ auto_cleanup_deleted_files: boolean // 是否自动清理已删除文件
28
+ deleted_files_retention_days: number // 已删除文件保留天数
29
+ }
30
+
31
+ export interface CloudDiskConfigResponse {
32
+ data: CloudDiskConfig
33
+ }
34
+
35
+ export interface UpdateCloudDiskConfigPayload
36
+ extends Partial<Omit<CloudDiskConfig, 'default_bucket'>> {}
@@ -0,0 +1,33 @@
1
+ export interface MusicTrack {
2
+ id: number
3
+ title: string
4
+ artist: string
5
+ cover_url?: string
6
+ audio_url?: string
7
+ duration?: number
8
+ lyrics?: string
9
+ tags?: string[]
10
+ like_count?: number
11
+ comment_count?: number
12
+ share_count?: number
13
+ play_count?: number
14
+ created_at?: string
15
+ updated_at?: string
16
+ }
17
+
18
+ export interface MusicListResponse {
19
+ data: MusicTrack[]
20
+ total: number
21
+ limit: number
22
+ offset: number
23
+ }
24
+
25
+ export interface MusicDetailResponse {
26
+ data: MusicTrack
27
+ }
28
+
29
+ export interface CreateMusicPayload
30
+ extends Omit<MusicTrack, 'id' | 'created_at' | 'updated_at'> {}
31
+
32
+ export interface UpdateMusicPayload
33
+ extends Partial<Omit<MusicTrack, 'id' | 'created_at' | 'updated_at'>> {}
@@ -0,0 +1,61 @@
1
+ export enum OrderStatus {
2
+ PENDING = 'pending',
3
+ PAID = 'paid',
4
+ SHIPPED = 'shipped',
5
+ DELIVERED = 'delivered',
6
+ COMPLETED = 'completed',
7
+ CANCELLED = 'cancelled',
8
+ REFUNDED = 'refunded',
9
+ }
10
+
11
+ export interface OrderItem {
12
+ id: number
13
+ order_id: number
14
+ product_id: number
15
+ sku_id?: number
16
+ quantity: number
17
+ subtotal: number
18
+ product_name?: string
19
+ product_image?: string
20
+ }
21
+
22
+ export interface Order {
23
+ id: number
24
+ user_id: string
25
+ order_no: string
26
+ status: OrderStatus
27
+ total_amount: number
28
+ address_id?: number
29
+ remark?: string
30
+ tracking_number?: string
31
+ created_at?: string
32
+ updated_at?: string
33
+ items?: OrderItem[]
34
+ }
35
+
36
+ export interface OrderListResponse {
37
+ data: Order[]
38
+ pagination: {
39
+ total: number
40
+ page: number
41
+ page_size: number
42
+ total_pages: number
43
+ }
44
+ }
45
+
46
+ export interface CreateOrderPayload {
47
+ remark?: string
48
+ address_id?: number
49
+ items?: Array<{
50
+ product_id: number
51
+ quantity: number
52
+ sku_id?: number
53
+ }>
54
+ status?: OrderStatus
55
+ }
56
+
57
+ export interface UpdateOrderPayload {
58
+ status?: OrderStatus
59
+ tracking_number?: string
60
+ remark?: string
61
+ }
@@ -0,0 +1,44 @@
1
+ export interface PointsConfig {
2
+ // 基础配置
3
+ enabled: boolean // 是否启用积分系统
4
+
5
+ // 积分获取规则
6
+ earn_rules: {
7
+ checkin: number // 签到获得积分
8
+ purchase: {
9
+ enabled: boolean // 是否启用购买获得积分
10
+ ratio: number // 购买金额与积分比例(1元 = ?积分)
11
+ max_per_order?: number // 单笔订单最大获得积分
12
+ }
13
+ reward: {
14
+ enabled: boolean // 是否启用奖励积分
15
+ default_amount: number // 默认奖励积分
16
+ }
17
+ }
18
+
19
+ // 积分消费规则
20
+ spend_rules: {
21
+ enabled: boolean // 是否允许消费积分
22
+ min_spend: number // 最小消费积分
23
+ max_spend_per_order?: number // 单笔订单最大消费积分
24
+ exchange_ratio: number // 积分兑换比例(?积分 = 1元)
25
+ }
26
+
27
+ // 积分过期规则
28
+ expire_rules: {
29
+ enabled: boolean // 是否启用积分过期
30
+ expire_days: number // 积分过期天数
31
+ expire_type: 'fifo' | 'lifo' // 过期类型:先进先出/后进先出
32
+ }
33
+
34
+ // 其他配置
35
+ max_points_per_user?: number // 用户最大积分上限
36
+ points_name: string // 积分名称(如:金币、积分等)
37
+ }
38
+
39
+ export interface PointsConfigResponse {
40
+ data: PointsConfig
41
+ }
42
+
43
+ export interface UpdatePointsConfigPayload
44
+ extends Partial<PointsConfig> {}
@@ -0,0 +1,41 @@
1
+ export enum ProductStatus {
2
+ DRAFT = 'draft',
3
+ ACTIVE = 'active',
4
+ INACTIVE = 'inactive',
5
+ DELETED = 'deleted',
6
+ }
7
+
8
+ export interface Product {
9
+ id: number
10
+ name: string
11
+ description?: string
12
+ detail?: string
13
+ price: number
14
+ original_price?: number
15
+ images?: string[]
16
+ main_image?: string
17
+ category_id?: number
18
+ tags?: string[]
19
+ stock?: number
20
+ status?: ProductStatus
21
+ sort_order?: number
22
+ sales_count?: number
23
+ created_at?: string
24
+ updated_at?: string
25
+ }
26
+
27
+ export interface ProductListResponse {
28
+ data: Product[]
29
+ pagination: {
30
+ total: number
31
+ page: number
32
+ page_size: number
33
+ total_pages: number
34
+ }
35
+ }
36
+
37
+ export interface CreateProductPayload
38
+ extends Omit<Product, 'id' | 'created_at' | 'updated_at'> {}
39
+
40
+ export interface UpdateProductPayload
41
+ extends Partial<Omit<Product, 'id' | 'created_at' | 'updated_at'>> {}
@@ -140,6 +140,8 @@ export interface UniAppIOSBuildOptions extends IOSBuildOptions {
140
140
  permissions?: string[]
141
141
  /** 是否开启 IDFA(可选,默认为 false) */
142
142
  enableIDFA?: boolean
143
+ /** 强制界面风格:Light 浅色 / Dark 深色(可选,不设置则跟随系统;对应 Info.plist UIUserInterfaceStyle) */
144
+ userInterfaceStyle?: 'Light' | 'Dark'
143
145
  /** 微信分享配置(可选) */
144
146
  wechatShare?: WechatShareIOSOptions
145
147
  /** 微信登录配置(可选) */
@@ -0,0 +1,36 @@
1
+ export interface User {
2
+ id: string
3
+ name?: string
4
+ email?: string
5
+ phone?: string
6
+ wechat_openid?: string
7
+ wechat_unionid?: string
8
+ wechat_nickname?: string
9
+ wechat_avatar?: string
10
+ created_at?: string
11
+ updated_at?: string
12
+ // 兼容旧字段名
13
+ createdAt?: string
14
+ updatedAt?: string
15
+ }
16
+
17
+ export interface UserListResponse {
18
+ data: User[]
19
+ count: number
20
+ }
21
+
22
+ export interface UserDetailResponse {
23
+ data: User
24
+ }
25
+
26
+ export interface CreateUserPayload {
27
+ name: string
28
+ email: string
29
+ }
30
+
31
+ export interface UpdateUserPayload {
32
+ name?: string
33
+ email?: string
34
+ phone?: string
35
+ avatar?: string
36
+ }
@@ -0,0 +1,71 @@
1
+ export interface VideoCategory {
2
+ id: string
3
+ name: string
4
+ description?: string
5
+ sort_order?: number
6
+ created_at?: string
7
+ }
8
+
9
+ export interface Video {
10
+ id: string
11
+ title: string
12
+ description?: string
13
+ cover_url?: string
14
+ video_url?: string
15
+ author?: string
16
+ category_id?: string
17
+ duration?: number
18
+ views?: number
19
+ like_count?: number
20
+ comment_count?: number
21
+ share_count?: number
22
+ status?: string
23
+ publish_time?: string
24
+ created_at?: string
25
+ updated_at?: string
26
+ }
27
+
28
+ export interface VideoComment {
29
+ id: number
30
+ video_id: string
31
+ user_id: string
32
+ content: string
33
+ parent_id?: number | null
34
+ like_count?: number
35
+ created_at?: string
36
+ updated_at?: string
37
+ }
38
+
39
+ export interface VideoListResponse {
40
+ data: Video[]
41
+ total: number
42
+ limit: number
43
+ offset: number
44
+ }
45
+
46
+ export interface VideoDetailResponse {
47
+ data: Video
48
+ }
49
+
50
+ export interface VideoCategoriesResponse {
51
+ data: VideoCategory[]
52
+ }
53
+
54
+ export interface VideoCommentsResponse {
55
+ data: VideoComment[]
56
+ total: number
57
+ limit: number
58
+ offset: number
59
+ }
60
+
61
+ export interface CreateVideoPayload
62
+ extends Omit<Video, 'id' | 'created_at' | 'updated_at' | 'publish_time'> {}
63
+
64
+ export interface UpdateVideoPayload
65
+ extends Partial<Omit<Video, 'id' | 'created_at' | 'updated_at' | 'publish_time'>> {}
66
+
67
+ export interface CreateCommentPayload {
68
+ content: string
69
+ parent_id?: number
70
+ }
71
+