@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,289 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
import { request } from "../../utils";
|
|
6
|
+
import { locales } from '@pisell/utils';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 钱包列表查询参数接口
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* 钱包列表项属性接口
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 商店信息接口
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 商品属性接口
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* API响应接口
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 错误处理函数类型
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 获取钱包列表
|
|
34
|
+
* @param params 查询参数
|
|
35
|
+
* @returns Promise<{list: IWalletListItemProps[], count: number}> 钱包列表和总数
|
|
36
|
+
* @throws 请求失败时抛出错误
|
|
37
|
+
*/
|
|
38
|
+
export var getWalletList = /*#__PURE__*/function () {
|
|
39
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
40
|
+
var _yield$request$getReq, data;
|
|
41
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
42
|
+
while (1) switch (_context.prev = _context.next) {
|
|
43
|
+
case 0:
|
|
44
|
+
_context.prev = 0;
|
|
45
|
+
_context.next = 3;
|
|
46
|
+
return request.getRequest().get("/h5/machinecode/lowcode/list", params);
|
|
47
|
+
case 3:
|
|
48
|
+
_yield$request$getReq = _context.sent;
|
|
49
|
+
data = _yield$request$getReq.data;
|
|
50
|
+
return _context.abrupt("return", data || {
|
|
51
|
+
list: [],
|
|
52
|
+
count: 0
|
|
53
|
+
});
|
|
54
|
+
case 8:
|
|
55
|
+
_context.prev = 8;
|
|
56
|
+
_context.t0 = _context["catch"](0);
|
|
57
|
+
console.error(locales.getText('wallet-pass-gallery.log.getWalletListFailed'), _context.t0);
|
|
58
|
+
return _context.abrupt("return", {
|
|
59
|
+
list: [],
|
|
60
|
+
count: 0
|
|
61
|
+
});
|
|
62
|
+
case 12:
|
|
63
|
+
case "end":
|
|
64
|
+
return _context.stop();
|
|
65
|
+
}
|
|
66
|
+
}, _callee, null, [[0, 8]]);
|
|
67
|
+
}));
|
|
68
|
+
return function getWalletList(_x) {
|
|
69
|
+
return _ref.apply(this, arguments);
|
|
70
|
+
};
|
|
71
|
+
}();
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 通过code绑定客户
|
|
75
|
+
* @param params 请求参数,包含code
|
|
76
|
+
* @param errCallback 错误回调
|
|
77
|
+
* @returns Promise<any> 绑定结果
|
|
78
|
+
*/
|
|
79
|
+
export var bindCodeToCustomer = /*#__PURE__*/function () {
|
|
80
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
81
|
+
var _yield$request$getReq2, data;
|
|
82
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
83
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
84
|
+
case 0:
|
|
85
|
+
_context2.next = 2;
|
|
86
|
+
return request.getRequest().put("/h5/voucher/bind/customer", params);
|
|
87
|
+
case 2:
|
|
88
|
+
_yield$request$getReq2 = _context2.sent;
|
|
89
|
+
data = _yield$request$getReq2.data;
|
|
90
|
+
return _context2.abrupt("return", data);
|
|
91
|
+
case 5:
|
|
92
|
+
case "end":
|
|
93
|
+
return _context2.stop();
|
|
94
|
+
}
|
|
95
|
+
}, _callee2);
|
|
96
|
+
}));
|
|
97
|
+
return function bindCodeToCustomer(_x2) {
|
|
98
|
+
return _ref2.apply(this, arguments);
|
|
99
|
+
};
|
|
100
|
+
}();
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* 用户根据code查询待绑定识别码列表
|
|
104
|
+
* @param params 请求参数,包含code和tag
|
|
105
|
+
* @param errCallback 错误回调函数
|
|
106
|
+
* @returns Promise<IWalletListItemProps[] | null> 未绑定的钱包卡列表
|
|
107
|
+
*/
|
|
108
|
+
export var getUnbindList = /*#__PURE__*/function () {
|
|
109
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
|
|
110
|
+
var _yield$request$getReq3, data;
|
|
111
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
112
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
113
|
+
case 0:
|
|
114
|
+
_context3.next = 2;
|
|
115
|
+
return request.getRequest().get("/h5/machinecode/unbind/list", params);
|
|
116
|
+
case 2:
|
|
117
|
+
_yield$request$getReq3 = _context3.sent;
|
|
118
|
+
data = _yield$request$getReq3.data;
|
|
119
|
+
return _context3.abrupt("return", data);
|
|
120
|
+
case 5:
|
|
121
|
+
case "end":
|
|
122
|
+
return _context3.stop();
|
|
123
|
+
}
|
|
124
|
+
}, _callee3);
|
|
125
|
+
}));
|
|
126
|
+
return function getUnbindList(_x3) {
|
|
127
|
+
return _ref3.apply(this, arguments);
|
|
128
|
+
};
|
|
129
|
+
}();
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* 下单请求参数接口
|
|
133
|
+
*/
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* 下单
|
|
137
|
+
* @param params 下单参数
|
|
138
|
+
* @returns Promise<any> 下单结果
|
|
139
|
+
* @throws 请求失败时抛出错误
|
|
140
|
+
*/
|
|
141
|
+
export var goOrder = /*#__PURE__*/function () {
|
|
142
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
|
|
143
|
+
var _yield$request$getReq4, data;
|
|
144
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
145
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
146
|
+
case 0:
|
|
147
|
+
_context4.prev = 0;
|
|
148
|
+
_context4.next = 3;
|
|
149
|
+
return request.getRequest().post("/h5/store/order/add", params);
|
|
150
|
+
case 3:
|
|
151
|
+
_yield$request$getReq4 = _context4.sent;
|
|
152
|
+
data = _yield$request$getReq4.data;
|
|
153
|
+
return _context4.abrupt("return", data);
|
|
154
|
+
case 8:
|
|
155
|
+
_context4.prev = 8;
|
|
156
|
+
_context4.t0 = _context4["catch"](0);
|
|
157
|
+
console.error(locales.getText('wallet-pass-gallery.log.orderFailed'), _context4.t0);
|
|
158
|
+
throw _context4.t0;
|
|
159
|
+
case 12:
|
|
160
|
+
case "end":
|
|
161
|
+
return _context4.stop();
|
|
162
|
+
}
|
|
163
|
+
}, _callee4, null, [[0, 8]]);
|
|
164
|
+
}));
|
|
165
|
+
return function goOrder(_x4) {
|
|
166
|
+
return _ref4.apply(this, arguments);
|
|
167
|
+
};
|
|
168
|
+
}();
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* 设置请求对象
|
|
172
|
+
* @param req 请求对象
|
|
173
|
+
*/
|
|
174
|
+
export var setRequest = function setRequest(req) {
|
|
175
|
+
request.setRequest(req);
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* 资产明细列表
|
|
179
|
+
* @param params 接口请求参数
|
|
180
|
+
* @returns 资产明细列表
|
|
181
|
+
*/
|
|
182
|
+
export var getAssetList = /*#__PURE__*/function () {
|
|
183
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
|
|
184
|
+
var _yield$request$getReq5, data;
|
|
185
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
186
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
187
|
+
case 0:
|
|
188
|
+
_context5.next = 2;
|
|
189
|
+
return request.getRequest().get("/h5/pay/asset/lowcode/list", params);
|
|
190
|
+
case 2:
|
|
191
|
+
_yield$request$getReq5 = _context5.sent;
|
|
192
|
+
data = _yield$request$getReq5.data;
|
|
193
|
+
return _context5.abrupt("return", data);
|
|
194
|
+
case 5:
|
|
195
|
+
case "end":
|
|
196
|
+
return _context5.stop();
|
|
197
|
+
}
|
|
198
|
+
}, _callee5);
|
|
199
|
+
}));
|
|
200
|
+
return function getAssetList(_x5) {
|
|
201
|
+
return _ref5.apply(this, arguments);
|
|
202
|
+
};
|
|
203
|
+
}();
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* 获取资产详情
|
|
207
|
+
* @param params 接口请求参数
|
|
208
|
+
* @returns 资产详情
|
|
209
|
+
*/
|
|
210
|
+
export var getDetailApi = /*#__PURE__*/function () {
|
|
211
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
|
|
212
|
+
var _yield$request$getReq6, data;
|
|
213
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
214
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
215
|
+
case 0:
|
|
216
|
+
_context6.next = 2;
|
|
217
|
+
return request.getRequest().get("/h5/machinecode/lowcode/detail/".concat(params.id), {
|
|
218
|
+
order_behavior_count: 1,
|
|
219
|
+
// 订单行为次数
|
|
220
|
+
order_behavior_count_customer: 1 // 客户订单行为次数
|
|
221
|
+
});
|
|
222
|
+
case 2:
|
|
223
|
+
_yield$request$getReq6 = _context6.sent;
|
|
224
|
+
data = _yield$request$getReq6.data;
|
|
225
|
+
return _context6.abrupt("return", data);
|
|
226
|
+
case 5:
|
|
227
|
+
case "end":
|
|
228
|
+
return _context6.stop();
|
|
229
|
+
}
|
|
230
|
+
}, _callee6);
|
|
231
|
+
}));
|
|
232
|
+
return function getDetailApi(_x6) {
|
|
233
|
+
return _ref6.apply(this, arguments);
|
|
234
|
+
};
|
|
235
|
+
}();
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* 详情响应数据结构,供组件消费
|
|
239
|
+
*/
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* 下单接口
|
|
243
|
+
* @param params - 订单参数
|
|
244
|
+
* @returns 订单响应数据
|
|
245
|
+
*/
|
|
246
|
+
export var orderRechargeProduct = /*#__PURE__*/function () {
|
|
247
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
|
|
248
|
+
var _yield$request$getReq7, data;
|
|
249
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
250
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
251
|
+
case 0:
|
|
252
|
+
_context7.next = 2;
|
|
253
|
+
return request.getRequest().post("/h5/order/order", params);
|
|
254
|
+
case 2:
|
|
255
|
+
_yield$request$getReq7 = _context7.sent;
|
|
256
|
+
data = _yield$request$getReq7.data;
|
|
257
|
+
return _context7.abrupt("return", data);
|
|
258
|
+
case 5:
|
|
259
|
+
case "end":
|
|
260
|
+
return _context7.stop();
|
|
261
|
+
}
|
|
262
|
+
}, _callee7);
|
|
263
|
+
}));
|
|
264
|
+
return function orderRechargeProduct(_x7) {
|
|
265
|
+
return _ref7.apply(this, arguments);
|
|
266
|
+
};
|
|
267
|
+
}();
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* @desc: 获取钱包信息
|
|
271
|
+
* @author: Arthur
|
|
272
|
+
* @date: 2025-11-03 15:30
|
|
273
|
+
*/
|
|
274
|
+
export var getWalletDetail = /*#__PURE__*/function () {
|
|
275
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(id) {
|
|
276
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
277
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
278
|
+
case 0:
|
|
279
|
+
return _context8.abrupt("return", request.getRequest().get("/h5/wallet/".concat(id), {}));
|
|
280
|
+
case 1:
|
|
281
|
+
case "end":
|
|
282
|
+
return _context8.stop();
|
|
283
|
+
}
|
|
284
|
+
}, _callee8);
|
|
285
|
+
}));
|
|
286
|
+
return function getWalletDetail(_x8) {
|
|
287
|
+
return _ref8.apply(this, arguments);
|
|
288
|
+
};
|
|
289
|
+
}();
|
|
@@ -186,23 +186,29 @@ var AuthModal = function AuthModal() {
|
|
|
186
186
|
if (type === 'email') {
|
|
187
187
|
var _methodConfig$setting, _loginMethod$password, _loginMethod$code, _loginMethod$link;
|
|
188
188
|
var verificationMethods = [];
|
|
189
|
-
var loginMethod = (methodConfig === null || methodConfig === void 0 || (_methodConfig$setting = methodConfig.setting) === null || _methodConfig$setting === void 0 ? void 0 : _methodConfig$setting.login_method) || {
|
|
189
|
+
var loginMethod = (methodConfig === null || methodConfig === void 0 || (_methodConfig$setting = methodConfig.setting) === null || _methodConfig$setting === void 0 ? void 0 : _methodConfig$setting.login_method) || {
|
|
190
|
+
"password": {
|
|
191
|
+
enabled: true,
|
|
192
|
+
sort: 1
|
|
193
|
+
}
|
|
194
|
+
}; // 添加安全访问保护
|
|
190
195
|
|
|
191
196
|
// 收集启用的验证方式并按 sort 排序
|
|
192
197
|
var enabledVerificationMethods = [];
|
|
193
|
-
if ((_loginMethod$password = loginMethod.password) !== null && _loginMethod$password !== void 0 && _loginMethod$password.enabled) {
|
|
198
|
+
if (loginMethod !== null && loginMethod !== void 0 && (_loginMethod$password = loginMethod.password) !== null && _loginMethod$password !== void 0 && _loginMethod$password.enabled) {
|
|
199
|
+
var _loginMethod$password2;
|
|
194
200
|
enabledVerificationMethods.push({
|
|
195
201
|
type: 'password',
|
|
196
|
-
sort: loginMethod.password.sort || 0 // 添加默认值保护
|
|
202
|
+
sort: ((_loginMethod$password2 = loginMethod.password) === null || _loginMethod$password2 === void 0 ? void 0 : _loginMethod$password2.sort) || 0 // 添加默认值保护
|
|
197
203
|
});
|
|
198
204
|
}
|
|
199
|
-
if ((_loginMethod$code = loginMethod.code) !== null && _loginMethod$code !== void 0 && _loginMethod$code.enabled) {
|
|
205
|
+
if (loginMethod !== null && loginMethod !== void 0 && (_loginMethod$code = loginMethod.code) !== null && _loginMethod$code !== void 0 && _loginMethod$code.enabled) {
|
|
200
206
|
enabledVerificationMethods.push({
|
|
201
207
|
type: 'verification_code',
|
|
202
208
|
sort: loginMethod.code.sort || 0 // 添加默认值保护
|
|
203
209
|
});
|
|
204
210
|
}
|
|
205
|
-
if ((_loginMethod$link = loginMethod.link) !== null && _loginMethod$link !== void 0 && _loginMethod$link.enabled) {
|
|
211
|
+
if (loginMethod !== null && loginMethod !== void 0 && (_loginMethod$link = loginMethod.link) !== null && _loginMethod$link !== void 0 && _loginMethod$link.enabled) {
|
|
206
212
|
enabledVerificationMethods.push({
|
|
207
213
|
type: 'verification_code',
|
|
208
214
|
// link 映射为 verification_code
|
|
@@ -223,18 +229,18 @@ var AuthModal = function AuthModal() {
|
|
|
223
229
|
});
|
|
224
230
|
}
|
|
225
231
|
} else if (type === 'phone') {
|
|
226
|
-
var _methodConfig$setting2, _loginMethod$
|
|
232
|
+
var _methodConfig$setting2, _loginMethod$password3, _loginMethod$code2;
|
|
227
233
|
var _verificationMethods = [];
|
|
228
234
|
var _loginMethod = (methodConfig === null || methodConfig === void 0 || (_methodConfig$setting2 = methodConfig.setting) === null || _methodConfig$setting2 === void 0 ? void 0 : _methodConfig$setting2.login_method) || {}; // 添加安全访问保护
|
|
229
235
|
|
|
230
236
|
var _enabledVerificationMethods = [];
|
|
231
|
-
if ((_loginMethod$
|
|
237
|
+
if (_loginMethod !== null && _loginMethod !== void 0 && (_loginMethod$password3 = _loginMethod.password) !== null && _loginMethod$password3 !== void 0 && _loginMethod$password3.enabled) {
|
|
232
238
|
_enabledVerificationMethods.push({
|
|
233
239
|
type: 'password',
|
|
234
240
|
sort: _loginMethod.password.sort || 0 // 添加默认值保护
|
|
235
241
|
});
|
|
236
242
|
}
|
|
237
|
-
if ((_loginMethod$code2 = _loginMethod.code) !== null && _loginMethod$code2 !== void 0 && _loginMethod$code2.enabled) {
|
|
243
|
+
if (_loginMethod !== null && _loginMethod !== void 0 && (_loginMethod$code2 = _loginMethod.code) !== null && _loginMethod$code2 !== void 0 && _loginMethod$code2.enabled) {
|
|
238
244
|
_enabledVerificationMethods.push({
|
|
239
245
|
type: 'verification_code',
|
|
240
246
|
sort: _loginMethod.code.sort || 0 // 添加默认值保护
|