@pisell/private-materials 6.3.32 → 6.3.34
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +151 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +23 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +23 -8
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/index.d.ts +1 -2
- package/es/components/index.js +1 -2
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/model.d.ts +1 -9
- package/es/components/walletList/index.d.ts +0 -25
- package/es/components/walletList/index.js +98 -66
- package/es/components/walletList/serve.d.ts +4 -0
- package/es/components/walletList/serve.js +46 -13
- package/es/components/walletList/types/index.d.ts +12 -12
- package/es/components/walletList/types/index.js +2 -2
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/plus/productSelect/CategoryTabs/index.d.ts +2 -0
- package/es/plus/productSelect/CategoryTabs/index.js +6 -3
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.less +0 -11
- package/es/plus/productSelect/utils.js +0 -1
- package/es/plus/walletEditor/WalletEditor.d.ts +5 -0
- package/es/plus/walletEditor/WalletEditor.js +316 -0
- package/es/plus/walletEditor/WalletEditor.less +129 -0
- package/es/plus/walletEditor/components/ImageUpload/index.d.ts +8 -0
- package/es/plus/walletEditor/components/ImageUpload/index.js +223 -0
- package/es/plus/walletEditor/components/JsonEditor/index.d.ts +11 -0
- package/es/plus/walletEditor/components/JsonEditor/index.js +68 -0
- package/es/plus/walletEditor/components/JsonEditor/index.less +4 -0
- package/es/plus/walletEditor/components/ValidityPeriodSelector/index.d.ts +20 -0
- package/es/plus/walletEditor/components/ValidityPeriodSelector/index.js +222 -0
- package/es/plus/walletEditor/components/ValidityPeriodSelector/index.less +4 -0
- package/es/plus/walletEditor/components/relationProduct/index.d.ts +6 -0
- package/es/plus/walletEditor/components/relationProduct/index.js +49 -0
- package/es/plus/walletEditor/components/relationProduct/index.less +15 -0
- package/es/plus/walletEditor/components/sortableWalletPassTypes/index.d.ts +37 -0
- package/es/plus/walletEditor/components/sortableWalletPassTypes/index.js +193 -0
- package/es/plus/walletEditor/components/sortableWalletPassTypes/index.less +110 -0
- package/es/plus/walletEditor/index.d.ts +3 -0
- package/es/plus/walletEditor/index.js +3 -0
- package/es/plus/walletEditor/locales.d.ts +126 -0
- package/es/plus/walletEditor/locales.js +143 -0
- package/es/plus/walletEditor/types.d.ts +52 -0
- package/es/plus/walletEditor/types.js +1 -0
- package/es/plus/walletPassGallery/components/footerButton/index.d.ts +14 -0
- package/es/plus/walletPassGallery/components/footerButton/index.js +247 -0
- package/es/plus/walletPassGallery/components/footerButton/index.less +93 -0
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +8 -0
- package/es/plus/walletPassGallery/components/passDetail/index.js +274 -0
- package/es/plus/walletPassGallery/components/passDetail/index.less +57 -0
- package/es/plus/walletPassGallery/components/passList/index.d.ts +11 -0
- package/es/plus/walletPassGallery/components/passList/index.js +115 -0
- package/es/plus/walletPassGallery/components/recharge/index.d.ts +11 -0
- package/es/plus/walletPassGallery/components/recharge/index.js +134 -0
- package/es/plus/walletPassGallery/components/recharge/index.less +16 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +8 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.js +176 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.less +67 -0
- package/es/plus/walletPassGallery/components/usageRule/index.d.ts +9 -0
- package/es/plus/walletPassGallery/components/usageRule/index.js +248 -0
- package/es/plus/walletPassGallery/components/usageRule/index.less +157 -0
- package/es/plus/walletPassGallery/index.d.ts +6 -0
- package/es/plus/walletPassGallery/index.js +602 -0
- package/es/plus/walletPassGallery/index.less +115 -0
- package/es/plus/walletPassGallery/locales.d.ts +270 -0
- package/es/plus/walletPassGallery/locales.js +279 -0
- package/es/plus/walletPassGallery/serve.d.ts +218 -0
- package/es/plus/walletPassGallery/serve.js +289 -0
- package/es/pro/Login2.0/AuthModal.js +14 -8
- package/es/pro/Login2.0/Login2.js +52 -28
- package/es/pro/Login2.0/Register2.js +1 -1
- package/es/pro/Login2.0/components/phoneValidation.js +1 -1
- package/es/pro/Login2.0/index.less +11 -2
- package/es/pro/Login2.0/locales.js +112 -112
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/index.d.ts +1 -2
- package/lib/components/index.js +0 -3
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/components/walletList/index.d.ts +0 -25
- package/lib/components/walletList/index.js +90 -51
- package/lib/components/walletList/serve.d.ts +4 -0
- package/lib/components/walletList/serve.js +12 -0
- package/lib/components/walletList/types/index.d.ts +12 -12
- package/lib/index.d.ts +2 -1
- package/lib/index.js +6 -3
- package/lib/plus/productSelect/CategoryTabs/index.d.ts +2 -0
- package/lib/plus/productSelect/CategoryTabs/index.js +84 -69
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.less +0 -11
- package/lib/plus/productSelect/utils.js +0 -1
- package/lib/plus/walletEditor/WalletEditor.d.ts +5 -0
- package/lib/plus/walletEditor/WalletEditor.js +354 -0
- package/lib/plus/walletEditor/WalletEditor.less +129 -0
- package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +8 -0
- package/lib/plus/walletEditor/components/ImageUpload/index.js +201 -0
- package/lib/plus/walletEditor/components/JsonEditor/index.d.ts +11 -0
- package/lib/plus/walletEditor/components/JsonEditor/index.js +89 -0
- package/lib/plus/walletEditor/components/JsonEditor/index.less +4 -0
- package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.d.ts +20 -0
- package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.js +176 -0
- package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.less +4 -0
- package/lib/plus/walletEditor/components/relationProduct/index.d.ts +6 -0
- package/lib/plus/walletEditor/components/relationProduct/index.js +73 -0
- package/lib/plus/walletEditor/components/relationProduct/index.less +15 -0
- package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.d.ts +37 -0
- package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.js +211 -0
- package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.less +110 -0
- package/lib/plus/walletEditor/index.d.ts +3 -0
- package/lib/plus/walletEditor/index.js +42 -0
- package/lib/plus/walletEditor/locales.d.ts +126 -0
- package/lib/plus/walletEditor/locales.js +167 -0
- package/lib/plus/walletEditor/types.d.ts +52 -0
- package/lib/plus/walletEditor/types.js +17 -0
- package/lib/plus/walletPassGallery/components/footerButton/index.d.ts +14 -0
- package/lib/plus/walletPassGallery/components/footerButton/index.js +187 -0
- package/lib/plus/walletPassGallery/components/footerButton/index.less +93 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +8 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.js +287 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.less +57 -0
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +11 -0
- package/lib/plus/walletPassGallery/components/passList/index.js +136 -0
- package/lib/plus/walletPassGallery/components/recharge/index.d.ts +11 -0
- package/lib/plus/walletPassGallery/components/recharge/index.js +146 -0
- package/lib/plus/walletPassGallery/components/recharge/index.less +16 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +8 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.js +212 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.less +67 -0
- package/lib/plus/walletPassGallery/components/usageRule/index.d.ts +9 -0
- package/lib/plus/walletPassGallery/components/usageRule/index.js +209 -0
- package/lib/plus/walletPassGallery/components/usageRule/index.less +157 -0
- package/lib/plus/walletPassGallery/index.d.ts +6 -0
- package/lib/plus/walletPassGallery/index.js +498 -0
- package/lib/plus/walletPassGallery/index.less +115 -0
- package/lib/plus/walletPassGallery/locales.d.ts +270 -0
- package/lib/plus/walletPassGallery/locales.js +299 -0
- package/lib/plus/walletPassGallery/serve.d.ts +218 -0
- package/lib/plus/walletPassGallery/serve.js +98 -0
- package/lib/pro/Login2.0/AuthModal.js +16 -11
- package/lib/pro/Login2.0/Login2.js +14 -4
- package/lib/pro/Login2.0/Register2.js +1 -1
- package/lib/pro/Login2.0/components/phoneValidation.js +1 -1
- package/lib/pro/Login2.0/index.less +11 -2
- package/lib/pro/Login2.0/locales.js +112 -112
- package/lowcode/sortable-wallet-pass-types/meta.ts +267 -0
- package/lowcode/wallet-editor/meta.ts +57 -0
- package/lowcode/wallet-editor/snippets.ts +13 -0
- package/lowcode/wallet-pass-gallery/meta.ts +35 -0
- package/package.json +4 -4
- package/lowcode/wallet/meta.ts +0 -79
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 钱包列表查询参数接口
|
|
3
|
+
*/
|
|
4
|
+
export interface IWalletListParmsProps {
|
|
5
|
+
tags?: string[];
|
|
6
|
+
sales_status?: 1 | 0 | -1;
|
|
7
|
+
machine_search?: string;
|
|
8
|
+
createdDate?: string;
|
|
9
|
+
limit_status?: string;
|
|
10
|
+
relation_id?: string;
|
|
11
|
+
relation_type?: string;
|
|
12
|
+
customer_id?: number;
|
|
13
|
+
sort?: 'desc' | 'asc';
|
|
14
|
+
order_by?: string;
|
|
15
|
+
used_status?: string;
|
|
16
|
+
num?: number;
|
|
17
|
+
skip?: number;
|
|
18
|
+
filter_wallet_id?: string;
|
|
19
|
+
available: 0 | 1;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 钱包列表项属性接口
|
|
23
|
+
*/
|
|
24
|
+
export interface IWalletListItemProps {
|
|
25
|
+
id?: number | string;
|
|
26
|
+
encoded?: string;
|
|
27
|
+
code?: string;
|
|
28
|
+
limit_status?: string;
|
|
29
|
+
customer_id?: number;
|
|
30
|
+
generate_method?: 'not_settable' | 'before_order' | 'after_order';
|
|
31
|
+
created_at?: string;
|
|
32
|
+
product_id?: number;
|
|
33
|
+
sales_status?: 1 | 0;
|
|
34
|
+
tag?: string;
|
|
35
|
+
status?: string;
|
|
36
|
+
redeemed_at?: string;
|
|
37
|
+
collection_time?: string;
|
|
38
|
+
order_id?: number;
|
|
39
|
+
par_value?: string;
|
|
40
|
+
write_status?: number;
|
|
41
|
+
expire_date?: string;
|
|
42
|
+
balance?: string;
|
|
43
|
+
extension_id?: string;
|
|
44
|
+
product_title?: string;
|
|
45
|
+
product_cover?: string;
|
|
46
|
+
product?: IProductProps;
|
|
47
|
+
unified_available_status?: 0 | 1;
|
|
48
|
+
unified_error_code?: number;
|
|
49
|
+
shop: IShop;
|
|
50
|
+
unified_messages: any;
|
|
51
|
+
machinecode_config?: {
|
|
52
|
+
hide_recharge?: number;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* 商店信息接口
|
|
57
|
+
*/
|
|
58
|
+
export interface IShop {
|
|
59
|
+
name: string;
|
|
60
|
+
id: number;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* 商品属性接口
|
|
64
|
+
*/
|
|
65
|
+
export interface IProductProps {
|
|
66
|
+
id?: number;
|
|
67
|
+
title?: string;
|
|
68
|
+
description?: string;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* API响应接口
|
|
72
|
+
*/
|
|
73
|
+
export interface ApiResponse<T> {
|
|
74
|
+
data: T;
|
|
75
|
+
code?: number;
|
|
76
|
+
message?: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* 错误处理函数类型
|
|
80
|
+
*/
|
|
81
|
+
export declare type ErrorCallback = () => void;
|
|
82
|
+
/**
|
|
83
|
+
* 获取钱包列表
|
|
84
|
+
* @param params 查询参数
|
|
85
|
+
* @returns Promise<{list: IWalletListItemProps[], count: number}> 钱包列表和总数
|
|
86
|
+
* @throws 请求失败时抛出错误
|
|
87
|
+
*/
|
|
88
|
+
export declare const getWalletList: (params?: IWalletListParmsProps) => Promise<{
|
|
89
|
+
list: IWalletListItemProps[];
|
|
90
|
+
count: number;
|
|
91
|
+
}>;
|
|
92
|
+
/**
|
|
93
|
+
* 通过code绑定客户
|
|
94
|
+
* @param params 请求参数,包含code
|
|
95
|
+
* @param errCallback 错误回调
|
|
96
|
+
* @returns Promise<any> 绑定结果
|
|
97
|
+
*/
|
|
98
|
+
export declare const bindCodeToCustomer: (params: {
|
|
99
|
+
code: string;
|
|
100
|
+
}) => Promise<any>;
|
|
101
|
+
/**
|
|
102
|
+
* 用户根据code查询待绑定识别码列表
|
|
103
|
+
* @param params 请求参数,包含code和tag
|
|
104
|
+
* @param errCallback 错误回调函数
|
|
105
|
+
* @returns Promise<IWalletListItemProps[] | null> 未绑定的钱包卡列表
|
|
106
|
+
*/
|
|
107
|
+
export declare const getUnbindList: (params: {
|
|
108
|
+
code: string;
|
|
109
|
+
tag?: string;
|
|
110
|
+
}) => Promise<IWalletListItemProps[] | null>;
|
|
111
|
+
/**
|
|
112
|
+
* 下单请求参数接口
|
|
113
|
+
*/
|
|
114
|
+
export interface IOrderParams {
|
|
115
|
+
voucher_id: string;
|
|
116
|
+
product_id: string;
|
|
117
|
+
product_variant_id: string;
|
|
118
|
+
quantity: number;
|
|
119
|
+
type: string;
|
|
120
|
+
platform: string;
|
|
121
|
+
currency_code: {
|
|
122
|
+
currency_code: string;
|
|
123
|
+
currency_symbol: string;
|
|
124
|
+
currency_format: string;
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* 下单
|
|
129
|
+
* @param params 下单参数
|
|
130
|
+
* @returns Promise<any> 下单结果
|
|
131
|
+
* @throws 请求失败时抛出错误
|
|
132
|
+
*/
|
|
133
|
+
export declare const goOrder: (params: IOrderParams) => Promise<any>;
|
|
134
|
+
/**
|
|
135
|
+
* 设置请求对象
|
|
136
|
+
* @param req 请求对象
|
|
137
|
+
*/
|
|
138
|
+
export declare const setRequest: (req: any) => void;
|
|
139
|
+
interface IAssetListProps {
|
|
140
|
+
skip?: string;
|
|
141
|
+
num?: string;
|
|
142
|
+
card_id?: string;
|
|
143
|
+
sourceType?: string;
|
|
144
|
+
business_object?: string;
|
|
145
|
+
tag?: string;
|
|
146
|
+
}
|
|
147
|
+
export interface IAssetItem {
|
|
148
|
+
id?: string;
|
|
149
|
+
tag?: 'gift_card' | 'product_voucher' | 'point_card' | 'product_discount_card';
|
|
150
|
+
shop_id?: string;
|
|
151
|
+
transaction_id?: string;
|
|
152
|
+
title?: string;
|
|
153
|
+
created_at?: string;
|
|
154
|
+
amount?: string;
|
|
155
|
+
balance?: string;
|
|
156
|
+
currency_symbol?: string;
|
|
157
|
+
action?: 'recharge' | 'order_expend' | 'order_refund' | 'expire';
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* 资产明细列表
|
|
161
|
+
* @param params 接口请求参数
|
|
162
|
+
* @returns 资产明细列表
|
|
163
|
+
*/
|
|
164
|
+
export declare const getAssetList: (params: IAssetListProps) => Promise<{
|
|
165
|
+
list: IAssetItem[];
|
|
166
|
+
}>;
|
|
167
|
+
/**
|
|
168
|
+
* 获取资产详情
|
|
169
|
+
* @param params 接口请求参数
|
|
170
|
+
* @returns 资产详情
|
|
171
|
+
*/
|
|
172
|
+
export declare const getDetailApi: (params: {
|
|
173
|
+
id: string;
|
|
174
|
+
}) => Promise<IDetailResponse>;
|
|
175
|
+
/**
|
|
176
|
+
* 详情响应数据结构,供组件消费
|
|
177
|
+
*/
|
|
178
|
+
export interface IDetailResponse {
|
|
179
|
+
detailId?: string;
|
|
180
|
+
productId?: string;
|
|
181
|
+
gift_option?: Array<{
|
|
182
|
+
id: string;
|
|
183
|
+
name: string;
|
|
184
|
+
gift_price: number;
|
|
185
|
+
price: number;
|
|
186
|
+
variant_id?: string;
|
|
187
|
+
}>;
|
|
188
|
+
[key: string]: any;
|
|
189
|
+
}
|
|
190
|
+
interface OrderParams {
|
|
191
|
+
voucher_id: string;
|
|
192
|
+
product_id: string;
|
|
193
|
+
product_variant_id: string;
|
|
194
|
+
quantity: number;
|
|
195
|
+
type: string;
|
|
196
|
+
platform: string;
|
|
197
|
+
currency_code: {
|
|
198
|
+
currency_code: string;
|
|
199
|
+
currency_symbol: string;
|
|
200
|
+
currency_format: string;
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
interface OrderResponse {
|
|
204
|
+
order_id: string;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* 下单接口
|
|
208
|
+
* @param params - 订单参数
|
|
209
|
+
* @returns 订单响应数据
|
|
210
|
+
*/
|
|
211
|
+
export declare const orderRechargeProduct: (params: OrderParams) => Promise<OrderResponse>;
|
|
212
|
+
/**
|
|
213
|
+
* @desc: 获取钱包信息
|
|
214
|
+
* @author: Arthur
|
|
215
|
+
* @date: 2025-11-03 15:30
|
|
216
|
+
*/
|
|
217
|
+
export declare const getWalletDetail: (id: string | number) => Promise<any>;
|
|
218
|
+
export {};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/plus/walletPassGallery/serve.ts
|
|
20
|
+
var serve_exports = {};
|
|
21
|
+
__export(serve_exports, {
|
|
22
|
+
bindCodeToCustomer: () => bindCodeToCustomer,
|
|
23
|
+
getAssetList: () => getAssetList,
|
|
24
|
+
getDetailApi: () => getDetailApi,
|
|
25
|
+
getUnbindList: () => getUnbindList,
|
|
26
|
+
getWalletDetail: () => getWalletDetail,
|
|
27
|
+
getWalletList: () => getWalletList,
|
|
28
|
+
goOrder: () => goOrder,
|
|
29
|
+
orderRechargeProduct: () => orderRechargeProduct,
|
|
30
|
+
setRequest: () => setRequest
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(serve_exports);
|
|
33
|
+
var import_utils = require("../../utils");
|
|
34
|
+
var import_utils2 = require("@pisell/utils");
|
|
35
|
+
var getWalletList = async (params) => {
|
|
36
|
+
try {
|
|
37
|
+
const { data } = await import_utils.request.getRequest().get(`/h5/machinecode/lowcode/list`, params);
|
|
38
|
+
return data || { list: [], count: 0 };
|
|
39
|
+
} catch (error) {
|
|
40
|
+
console.error(
|
|
41
|
+
import_utils2.locales.getText("wallet-pass-gallery.log.getWalletListFailed"),
|
|
42
|
+
error
|
|
43
|
+
);
|
|
44
|
+
return { list: [], count: 0 };
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
var bindCodeToCustomer = async (params) => {
|
|
48
|
+
const { data } = await import_utils.request.getRequest().put(`/h5/voucher/bind/customer`, params);
|
|
49
|
+
return data;
|
|
50
|
+
};
|
|
51
|
+
var getUnbindList = async (params) => {
|
|
52
|
+
const { data } = await import_utils.request.getRequest().get(`/h5/machinecode/unbind/list`, params);
|
|
53
|
+
return data;
|
|
54
|
+
};
|
|
55
|
+
var goOrder = async (params) => {
|
|
56
|
+
try {
|
|
57
|
+
const { data } = await import_utils.request.getRequest().post(`/h5/store/order/add`, params);
|
|
58
|
+
return data;
|
|
59
|
+
} catch (error) {
|
|
60
|
+
console.error(import_utils2.locales.getText("wallet-pass-gallery.log.orderFailed"), error);
|
|
61
|
+
throw error;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var setRequest = (req) => {
|
|
65
|
+
import_utils.request.setRequest(req);
|
|
66
|
+
};
|
|
67
|
+
var getAssetList = async (params) => {
|
|
68
|
+
const { data } = await import_utils.request.getRequest().get(`/h5/pay/asset/lowcode/list`, params);
|
|
69
|
+
return data;
|
|
70
|
+
};
|
|
71
|
+
var getDetailApi = async (params) => {
|
|
72
|
+
const { data } = await import_utils.request.getRequest().get(`/h5/machinecode/lowcode/detail/${params.id}`, {
|
|
73
|
+
order_behavior_count: 1,
|
|
74
|
+
// 订单行为次数
|
|
75
|
+
order_behavior_count_customer: 1
|
|
76
|
+
// 客户订单行为次数
|
|
77
|
+
});
|
|
78
|
+
return data;
|
|
79
|
+
};
|
|
80
|
+
var orderRechargeProduct = async (params) => {
|
|
81
|
+
const { data } = await import_utils.request.getRequest().post(`/h5/order/order`, params);
|
|
82
|
+
return data;
|
|
83
|
+
};
|
|
84
|
+
var getWalletDetail = async (id) => {
|
|
85
|
+
return import_utils.request.getRequest().get(`/h5/wallet/${id}`, {});
|
|
86
|
+
};
|
|
87
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
88
|
+
0 && (module.exports = {
|
|
89
|
+
bindCodeToCustomer,
|
|
90
|
+
getAssetList,
|
|
91
|
+
getDetailApi,
|
|
92
|
+
getUnbindList,
|
|
93
|
+
getWalletDetail,
|
|
94
|
+
getWalletList,
|
|
95
|
+
goOrder,
|
|
96
|
+
orderRechargeProduct,
|
|
97
|
+
setRequest
|
|
98
|
+
});
|
|
@@ -153,26 +153,31 @@ var AuthModal = () => {
|
|
|
153
153
|
}
|
|
154
154
|
enabledMethods.sort((a, b) => a.sort - b.sort);
|
|
155
155
|
enabledMethods.forEach(({ type, config: methodConfig }) => {
|
|
156
|
-
var _a3, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
156
|
+
var _a3, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2;
|
|
157
157
|
if (type === "email") {
|
|
158
158
|
const verificationMethods = [];
|
|
159
|
-
const loginMethod = ((_a3 = methodConfig == null ? void 0 : methodConfig.setting) == null ? void 0 : _a3.login_method) || {
|
|
159
|
+
const loginMethod = ((_a3 = methodConfig == null ? void 0 : methodConfig.setting) == null ? void 0 : _a3.login_method) || {
|
|
160
|
+
"password": {
|
|
161
|
+
enabled: true,
|
|
162
|
+
sort: 1
|
|
163
|
+
}
|
|
164
|
+
};
|
|
160
165
|
const enabledVerificationMethods = [];
|
|
161
|
-
if ((_b2 = loginMethod.password) == null ? void 0 : _b2.enabled) {
|
|
166
|
+
if ((_b2 = loginMethod == null ? void 0 : loginMethod.password) == null ? void 0 : _b2.enabled) {
|
|
162
167
|
enabledVerificationMethods.push({
|
|
163
168
|
type: "password",
|
|
164
|
-
sort: loginMethod.password.sort || 0
|
|
169
|
+
sort: ((_c2 = loginMethod.password) == null ? void 0 : _c2.sort) || 0
|
|
165
170
|
// 添加默认值保护
|
|
166
171
|
});
|
|
167
172
|
}
|
|
168
|
-
if ((
|
|
173
|
+
if ((_d2 = loginMethod == null ? void 0 : loginMethod.code) == null ? void 0 : _d2.enabled) {
|
|
169
174
|
enabledVerificationMethods.push({
|
|
170
175
|
type: "verification_code",
|
|
171
176
|
sort: loginMethod.code.sort || 0
|
|
172
177
|
// 添加默认值保护
|
|
173
178
|
});
|
|
174
179
|
}
|
|
175
|
-
if ((
|
|
180
|
+
if ((_e2 = loginMethod == null ? void 0 : loginMethod.link) == null ? void 0 : _e2.enabled) {
|
|
176
181
|
enabledVerificationMethods.push({
|
|
177
182
|
type: "verification_code",
|
|
178
183
|
// link 映射为 verification_code
|
|
@@ -191,16 +196,16 @@ var AuthModal = () => {
|
|
|
191
196
|
}
|
|
192
197
|
} else if (type === "phone") {
|
|
193
198
|
const verificationMethods = [];
|
|
194
|
-
const loginMethod = ((
|
|
199
|
+
const loginMethod = ((_f2 = methodConfig == null ? void 0 : methodConfig.setting) == null ? void 0 : _f2.login_method) || {};
|
|
195
200
|
const enabledVerificationMethods = [];
|
|
196
|
-
if ((
|
|
201
|
+
if ((_g2 = loginMethod == null ? void 0 : loginMethod.password) == null ? void 0 : _g2.enabled) {
|
|
197
202
|
enabledVerificationMethods.push({
|
|
198
203
|
type: "password",
|
|
199
204
|
sort: loginMethod.password.sort || 0
|
|
200
205
|
// 添加默认值保护
|
|
201
206
|
});
|
|
202
207
|
}
|
|
203
|
-
if ((
|
|
208
|
+
if ((_h2 = loginMethod == null ? void 0 : loginMethod.code) == null ? void 0 : _h2.enabled) {
|
|
204
209
|
enabledVerificationMethods.push({
|
|
205
210
|
type: "verification_code",
|
|
206
211
|
sort: loginMethod.code.sort || 0
|
|
@@ -223,12 +228,12 @@ var AuthModal = () => {
|
|
|
223
228
|
} else if (type === "facebook") {
|
|
224
229
|
loginMethods.push({
|
|
225
230
|
type: "facebook",
|
|
226
|
-
appId: ((
|
|
231
|
+
appId: ((_i2 = methodConfig == null ? void 0 : methodConfig.setting) == null ? void 0 : _i2.appid) || ""
|
|
227
232
|
});
|
|
228
233
|
} else if (type === "apple") {
|
|
229
234
|
loginMethods.push({
|
|
230
235
|
type: "apple",
|
|
231
|
-
clientId: ((
|
|
236
|
+
clientId: ((_j2 = methodConfig == null ? void 0 : methodConfig.setting) == null ? void 0 : _j2.identifier) || ""
|
|
232
237
|
});
|
|
233
238
|
} else if (type === "guest") {
|
|
234
239
|
loginMethods.push({
|
|
@@ -114,6 +114,9 @@ var Login2 = ({
|
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
+
if (loginMethods.length === 1 && loginMethods[0].type === "guest") {
|
|
118
|
+
handleGuestLogin();
|
|
119
|
+
}
|
|
117
120
|
}, [loginMethods, currentLoginMethod]);
|
|
118
121
|
(0, import_react.useEffect)(() => {
|
|
119
122
|
if (((currentLoginMethod == null ? void 0 : currentLoginMethod.type) === "email" || (currentLoginMethod == null ? void 0 : currentLoginMethod.type) === "phone") && currentVerificationMethod === "password") {
|
|
@@ -842,7 +845,10 @@ var Login2 = ({
|
|
|
842
845
|
const fbConfig = (_a2 = config == null ? void 0 : config.loginMethods) == null ? void 0 : _a2.find((n) => n.type === "facebook");
|
|
843
846
|
const token = fbConfig == null ? void 0 : fbConfig.appId;
|
|
844
847
|
if (token) {
|
|
845
|
-
await registerAndLogin.loginWithFacebook(token);
|
|
848
|
+
const res = await registerAndLogin.loginWithFacebook(token);
|
|
849
|
+
if (res.status) {
|
|
850
|
+
onLogin == null ? void 0 : onLogin(res.data, "facebook", { account: "", password: "" }, config.channel);
|
|
851
|
+
}
|
|
846
852
|
} else {
|
|
847
853
|
throw new Error("Facebook app_id not configured");
|
|
848
854
|
}
|
|
@@ -850,7 +856,8 @@ var Login2 = ({
|
|
|
850
856
|
const appleConfig = (_b2 = config == null ? void 0 : config.loginMethods) == null ? void 0 : _b2.find((n) => n.type === "apple");
|
|
851
857
|
const token = appleConfig == null ? void 0 : appleConfig.clientId;
|
|
852
858
|
if (token) {
|
|
853
|
-
await registerAndLogin.loginWithApple(token);
|
|
859
|
+
const res = await registerAndLogin.loginWithApple(token);
|
|
860
|
+
onLogin == null ? void 0 : onLogin(res.data, "apple", { account: "", password: "" }, config.channel);
|
|
854
861
|
} else {
|
|
855
862
|
throw new Error("Apple client_id not configured");
|
|
856
863
|
}
|
|
@@ -858,6 +865,9 @@ var Login2 = ({
|
|
|
858
865
|
await (onOAuthLogin == null ? void 0 : onOAuthLogin(provider, config.channel));
|
|
859
866
|
}
|
|
860
867
|
} catch (error) {
|
|
868
|
+
if (error.message === "facebook_login_cancel") {
|
|
869
|
+
return import_antd.message.error(import_utils.locales.getText("pisell-register2-facebook-login-canceled"));
|
|
870
|
+
}
|
|
861
871
|
import_antd.message.error(
|
|
862
872
|
(error == null ? void 0 : error.message) || import_utils.locales.getText("pisell-login2-login-failed")
|
|
863
873
|
);
|
|
@@ -1281,7 +1291,7 @@ var Login2 = ({
|
|
|
1281
1291
|
if (!nonOauthButtons.length && !oauthProviders.length) {
|
|
1282
1292
|
return registerPrompt;
|
|
1283
1293
|
}
|
|
1284
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, showDivider && /* @__PURE__ */ import_react.default.createElement("div", { className: "login2-divider" }, import_utils.locales.getText("pisell-login2-or")), nonOauthButtons.length > 0 && /* @__PURE__ */ import_react.default.createElement("div", { className: "login2-switch-options" }, nonOauthButtons), oauthProviders.length > 0 && /* @__PURE__ */ import_react.default.createElement(
|
|
1294
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, showDivider && /* @__PURE__ */ import_react.default.createElement("div", { className: "login2-divider" }, import_utils.locales.getText("pisell-login2-or")), (nonOauthButtons.length > 0 || oauthProviders.length > 0) && /* @__PURE__ */ import_react.default.createElement("div", { className: "login2-switch-groups" }, nonOauthButtons.length > 0 && /* @__PURE__ */ import_react.default.createElement("div", { className: "login2-switch-options" }, nonOauthButtons), oauthProviders.length > 0 && /* @__PURE__ */ import_react.default.createElement(
|
|
1285
1295
|
import_OAuthButtonGroup.default,
|
|
1286
1296
|
{
|
|
1287
1297
|
providers: oauthProviders,
|
|
@@ -1289,7 +1299,7 @@ var Login2 = ({
|
|
|
1289
1299
|
buttonClassName: "login2-oauth-button",
|
|
1290
1300
|
gap: 12
|
|
1291
1301
|
}
|
|
1292
|
-
), registerPrompt);
|
|
1302
|
+
)), registerPrompt);
|
|
1293
1303
|
};
|
|
1294
1304
|
if (!visible) {
|
|
1295
1305
|
return null;
|
|
@@ -454,7 +454,7 @@ var Register2 = ({
|
|
|
454
454
|
}
|
|
455
455
|
await (onOAuthLogin == null ? void 0 : onOAuthLogin(provider, config.channel));
|
|
456
456
|
} catch (error) {
|
|
457
|
-
if (error.
|
|
457
|
+
if (error.message === "facebook_login_cancel") {
|
|
458
458
|
return import_antd.message.error(import_utils.locales.getText("pisell-register2-facebook-login-canceled"));
|
|
459
459
|
}
|
|
460
460
|
console.error(`${provider} login error:`, error);
|
|
@@ -547,7 +547,10 @@
|
|
|
547
547
|
align-items: center;
|
|
548
548
|
justify-content: center;
|
|
549
549
|
gap: 12px;
|
|
550
|
-
|
|
550
|
+
.pisell-lowcode-btn-icon {
|
|
551
|
+
margin-right: 0!important;
|
|
552
|
+
font-size: 24px;
|
|
553
|
+
}
|
|
551
554
|
svg {
|
|
552
555
|
flex-shrink: 0;
|
|
553
556
|
}
|
|
@@ -685,6 +688,12 @@
|
|
|
685
688
|
}
|
|
686
689
|
|
|
687
690
|
// 切换选项区域
|
|
691
|
+
.login2-container .login2-switch-groups {
|
|
692
|
+
display: flex;
|
|
693
|
+
flex-direction: column;
|
|
694
|
+
gap: 12px;
|
|
695
|
+
}
|
|
696
|
+
|
|
688
697
|
.login2-container .login2-switch-options {
|
|
689
698
|
display: flex;
|
|
690
699
|
flex-direction: column;
|
|
@@ -778,7 +787,7 @@
|
|
|
778
787
|
position: relative; // 为角标定位提供基准
|
|
779
788
|
|
|
780
789
|
.oauth-icon {
|
|
781
|
-
font-size:
|
|
790
|
+
font-size: 24px;
|
|
782
791
|
font-weight: 700;
|
|
783
792
|
flex-shrink: 0;
|
|
784
793
|
}
|