@pisell/private-materials 6.8.12 → 6.8.14
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/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/booking/info2/service/editNormalService/index.js +2 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +39 -22
- package/lib/components/booking/info2/service/editNormalService/index.js +2 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +39 -22
- package/package.json +4 -4
- package/es/components/appointmentBooking/components/Services/index.d.ts +0 -4
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -4
- package/es/components/booking/components/actionButtons/index.d.ts +0 -31
- package/es/components/booking/components/footer/index.d.ts +0 -11
- package/es/components/booking/components/footer/utils.d.ts +0 -67
- package/es/components/booking/components/voucher/index.d.ts +0 -3
- package/es/components/booking/dashboard/serve.d.ts +0 -1
- package/es/components/booking/forms/serve.d.ts +0 -18
- package/es/components/booking/info/client/serve.d.ts +0 -2
- package/es/components/booking/info/pet/serve.d.ts +0 -1
- package/es/components/booking/info/service/Lists.d.ts +0 -3
- package/es/components/booking/info/service/addTimeModal/serve.d.ts +0 -5
- package/es/components/booking/info/service/serve.d.ts +0 -34
- package/es/components/booking/info/service2/utils.d.ts +0 -219
- package/es/components/booking/info2/serve.d.ts +0 -6
- package/es/components/booking/info2/service/addService/utils.d.ts +0 -106
- package/es/components/booking/info2/service/editService/index.d.ts +0 -8
- package/es/components/booking/info2/utilsByBooking.d.ts +0 -36
- package/es/components/booking/utils.d.ts +0 -182
- package/es/components/checkout/PaymentModal.d.ts +0 -39
- package/es/components/checkout/components/AdditionalModule/index.d.ts +0 -15
- package/es/components/checkout/components/CashPaymentModule/index.d.ts +0 -26
- package/es/components/checkout/components/PaymentDetailModal/index.d.ts +0 -38
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +0 -85
- package/es/components/checkout/components/SearchAndClientModule/index.d.ts +0 -14
- package/es/components/checkout/hooks/useWalletPass.d.ts +0 -40
- package/es/components/checkout/plugin.d.ts +0 -2
- package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -32
- package/es/components/list/List.d.ts +0 -5
- package/es/components/list/hooks/useListState.d.ts +0 -45
- package/es/components/pay/toB/components/MX51/index.d.ts +0 -3
- package/es/components/pay/toB/types/index.d.ts +0 -72
- package/es/components/pisellSelectCustomerModal/RightPanel/serve.d.ts +0 -3
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.d.ts +0 -27
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -31
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -10
- package/es/components/ticketBooking/components/addServiceVariant/utils.d.ts +0 -8
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -11
- package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -14
- package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -16
- package/es/components/ticketBooking/index.d.ts +0 -15
- package/es/components/ticketBooking/serve.d.ts +0 -288
- package/es/components/ticketBooking/utils/index.d.ts +0 -101
- package/es/index.d.ts +0 -80
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +0 -4
- package/es/plus/productSelect/ProductCard/index.d.ts +0 -47
- package/es/plus/webPosLogin/WebPosLogin.d.ts +0 -11
- package/es/plus/webPosLogin/WebPosLoginCpt.d.ts +0 -9
- package/es/plus/webPosLogin/components/BrandPanel/index.d.ts +0 -9
- package/es/plus/webPosLogin/components/LoginPanel/index.d.ts +0 -21
- package/es/plus/webPosLogin/components/MediaDisplay/index.d.ts +0 -12
- package/es/plus/webPosLogin/components/MediaDisplay/type.d.ts +0 -54
- package/es/plus/webPosLogin/components/SelectDevice/index.d.ts +0 -28
- package/es/plus/webPosLogin/components/SelectStore/index.d.ts +0 -24
- package/es/plus/webPosLogin/components/UserFooter/index.d.ts +0 -28
- package/es/plus/webPosLogin/index.d.ts +0 -12
- package/es/plus/webPosLogin/locales.d.ts +0 -49
- package/es/plus/webPosLogin/service.d.ts +0 -44
- package/es/plus/webPosLogin/types.d.ts +0 -286
- package/es/pro/Login2.0/Login2.d.ts +0 -61
- package/lib/components/appointmentBooking/components/Services/index.d.ts +0 -4
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -4
- package/lib/components/booking/components/actionButtons/index.d.ts +0 -31
- package/lib/components/booking/components/footer/index.d.ts +0 -11
- package/lib/components/booking/components/footer/utils.d.ts +0 -67
- package/lib/components/booking/components/voucher/index.d.ts +0 -3
- package/lib/components/booking/dashboard/serve.d.ts +0 -1
- package/lib/components/booking/forms/serve.d.ts +0 -18
- package/lib/components/booking/info/client/serve.d.ts +0 -2
- package/lib/components/booking/info/pet/serve.d.ts +0 -1
- package/lib/components/booking/info/service/Lists.d.ts +0 -3
- package/lib/components/booking/info/service/addTimeModal/serve.d.ts +0 -5
- package/lib/components/booking/info/service/serve.d.ts +0 -34
- package/lib/components/booking/info/service2/utils.d.ts +0 -219
- package/lib/components/booking/info2/serve.d.ts +0 -6
- package/lib/components/booking/info2/service/addService/utils.d.ts +0 -106
- package/lib/components/booking/info2/service/editService/index.d.ts +0 -8
- package/lib/components/booking/info2/utilsByBooking.d.ts +0 -36
- package/lib/components/booking/utils.d.ts +0 -182
- package/lib/components/checkout/PaymentModal.d.ts +0 -39
- package/lib/components/checkout/components/AdditionalModule/index.d.ts +0 -15
- package/lib/components/checkout/components/CashPaymentModule/index.d.ts +0 -26
- package/lib/components/checkout/components/PaymentDetailModal/index.d.ts +0 -38
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +0 -85
- package/lib/components/checkout/components/SearchAndClientModule/index.d.ts +0 -14
- package/lib/components/checkout/hooks/useWalletPass.d.ts +0 -40
- package/lib/components/checkout/plugin.d.ts +0 -2
- package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -32
- package/lib/components/list/List.d.ts +0 -5
- package/lib/components/list/hooks/useListState.d.ts +0 -45
- package/lib/components/pay/toB/components/MX51/index.d.ts +0 -3
- package/lib/components/pay/toB/types/index.d.ts +0 -72
- package/lib/components/pisellSelectCustomerModal/RightPanel/serve.d.ts +0 -3
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.d.ts +0 -27
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -31
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -10
- package/lib/components/ticketBooking/components/addServiceVariant/utils.d.ts +0 -8
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -11
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -14
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -16
- package/lib/components/ticketBooking/index.d.ts +0 -15
- package/lib/components/ticketBooking/serve.d.ts +0 -288
- package/lib/components/ticketBooking/utils/index.d.ts +0 -101
- package/lib/index.d.ts +0 -80
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +0 -4
- package/lib/plus/productSelect/ProductCard/index.d.ts +0 -47
- package/lib/plus/webPosLogin/WebPosLogin.d.ts +0 -11
- package/lib/plus/webPosLogin/WebPosLoginCpt.d.ts +0 -9
- package/lib/plus/webPosLogin/components/BrandPanel/index.d.ts +0 -9
- package/lib/plus/webPosLogin/components/LoginPanel/index.d.ts +0 -21
- package/lib/plus/webPosLogin/components/MediaDisplay/index.d.ts +0 -12
- package/lib/plus/webPosLogin/components/MediaDisplay/type.d.ts +0 -54
- package/lib/plus/webPosLogin/components/SelectDevice/index.d.ts +0 -28
- package/lib/plus/webPosLogin/components/SelectStore/index.d.ts +0 -24
- package/lib/plus/webPosLogin/components/UserFooter/index.d.ts +0 -28
- package/lib/plus/webPosLogin/index.d.ts +0 -12
- package/lib/plus/webPosLogin/locales.d.ts +0 -49
- package/lib/plus/webPosLogin/service.d.ts +0 -44
- package/lib/plus/webPosLogin/types.d.ts +0 -286
- package/lib/pro/Login2.0/Login2.d.ts +0 -61
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StoreItem, LocaleType } from '../../types';
|
|
3
|
-
import './index.less';
|
|
4
|
-
/**
|
|
5
|
-
* SelectStore 组件 Props
|
|
6
|
-
*/
|
|
7
|
-
export interface SelectStoreProps {
|
|
8
|
-
/** 店铺列表 */
|
|
9
|
-
storeList?: StoreItem[];
|
|
10
|
-
/** 语言 */
|
|
11
|
-
locale?: LocaleType;
|
|
12
|
-
/** 加载状态(列表加载) */
|
|
13
|
-
loading?: boolean;
|
|
14
|
-
/** 上次使用的店铺ID */
|
|
15
|
-
lastUsedStoreId?: number;
|
|
16
|
-
/** 选择店铺回调 */
|
|
17
|
-
onSelect?: (store: StoreItem) => void;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* SelectStore 店铺选择组件
|
|
21
|
-
* @description 展示店铺列表,支持搜索过滤和选择
|
|
22
|
-
*/
|
|
23
|
-
declare const SelectStore: React.FC<SelectStoreProps>;
|
|
24
|
-
export default SelectStore;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { UserInfo, StoreItem, LoginStep, LocaleType } from '../../types';
|
|
3
|
-
import './index.less';
|
|
4
|
-
/**
|
|
5
|
-
* UserFooter 组件 Props
|
|
6
|
-
*/
|
|
7
|
-
export interface UserFooterProps {
|
|
8
|
-
/** 是否显示切换店铺 */
|
|
9
|
-
isShowChangeStore?: boolean;
|
|
10
|
-
/** 用户信息 */
|
|
11
|
-
userInfo?: UserInfo;
|
|
12
|
-
/** 当前选中的店铺 */
|
|
13
|
-
selectedStore?: StoreItem;
|
|
14
|
-
/** 当前步骤 */
|
|
15
|
-
step?: LoginStep;
|
|
16
|
-
/** 语言 */
|
|
17
|
-
locale?: LocaleType;
|
|
18
|
-
/** 切换账号回调 */
|
|
19
|
-
onChangeAccount?: () => void;
|
|
20
|
-
/** 切换店铺回调 */
|
|
21
|
-
onChangeStore?: () => void;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* UserFooter 底部用户信息组件
|
|
25
|
-
* @description 展示当前用户和店铺信息,支持切换账号和切换店铺
|
|
26
|
-
*/
|
|
27
|
-
declare const UserFooter: React.FC<UserFooterProps>;
|
|
28
|
-
export default UserFooter;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WebPosLogin 组件导出
|
|
3
|
-
* @description WebPOS 登录流程组件
|
|
4
|
-
*/
|
|
5
|
-
export { default } from './WebPosLogin';
|
|
6
|
-
export { default as WebPosLogin } from './WebPosLogin';
|
|
7
|
-
export { default as BrandPanel } from './components/BrandPanel';
|
|
8
|
-
export { default as LoginPanel } from './components/LoginPanel';
|
|
9
|
-
export { default as SelectStore } from './components/SelectStore';
|
|
10
|
-
export { default as SelectDevice } from './components/SelectDevice';
|
|
11
|
-
export { default as UserFooter } from './components/UserFooter';
|
|
12
|
-
export type { WebPosLoginCptProps, StoreItem, DeviceItem, DeviceClient, UserInfo, BrandConfig, CarouselItem, LoginStep, LocaleType, BrandPanelProps, SelectStoreProps, SelectDeviceProps, UserFooterProps, } from './types';
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WebPosLogin 组件国际化文本
|
|
3
|
-
* @description 支持 en、zh-CN、zh-HK 三种语言
|
|
4
|
-
*/
|
|
5
|
-
declare const _default: {
|
|
6
|
-
en: {
|
|
7
|
-
'webpos-login-search': string;
|
|
8
|
-
'webpos-login-back': string;
|
|
9
|
-
'webpos-login-last-used': string;
|
|
10
|
-
'webpos-login-select-store-title': string;
|
|
11
|
-
'webpos-login-select-store-empty': string;
|
|
12
|
-
'webpos-login-change-account': string;
|
|
13
|
-
'webpos-login-store-data-missing': string;
|
|
14
|
-
'webpos-login-select-device-title': string;
|
|
15
|
-
'webpos-login-select-device-empty': string;
|
|
16
|
-
'webpos-login-change-store': string;
|
|
17
|
-
'webpos-login-device-not-in-use': string;
|
|
18
|
-
'webpos-login-device-currently-used-by': string;
|
|
19
|
-
};
|
|
20
|
-
'zh-CN': {
|
|
21
|
-
'webpos-login-search': string;
|
|
22
|
-
'webpos-login-back': string;
|
|
23
|
-
'webpos-login-last-used': string;
|
|
24
|
-
'webpos-login-select-store-title': string;
|
|
25
|
-
'webpos-login-select-store-empty': string;
|
|
26
|
-
'webpos-login-change-account': string;
|
|
27
|
-
'webpos-login-store-data-missing': string;
|
|
28
|
-
'webpos-login-select-device-title': string;
|
|
29
|
-
'webpos-login-select-device-empty': string;
|
|
30
|
-
'webpos-login-change-store': string;
|
|
31
|
-
'webpos-login-device-not-in-use': string;
|
|
32
|
-
'webpos-login-device-currently-used-by': string;
|
|
33
|
-
};
|
|
34
|
-
'zh-HK': {
|
|
35
|
-
'webpos-login-search': string;
|
|
36
|
-
'webpos-login-back': string;
|
|
37
|
-
'webpos-login-last-used': string;
|
|
38
|
-
'webpos-login-select-store-title': string;
|
|
39
|
-
'webpos-login-select-store-empty': string;
|
|
40
|
-
'webpos-login-change-account': string;
|
|
41
|
-
'webpos-login-store-data-missing': string;
|
|
42
|
-
'webpos-login-select-device-title': string;
|
|
43
|
-
'webpos-login-select-device-empty': string;
|
|
44
|
-
'webpos-login-change-store': string;
|
|
45
|
-
'webpos-login-device-not-in-use': string;
|
|
46
|
-
'webpos-login-device-currently-used-by': string;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
export default _default;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { StoreItem } from './types';
|
|
2
|
-
interface IGetDeviceListParams {
|
|
3
|
-
type: string;
|
|
4
|
-
with: string[];
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* 获取设备列表
|
|
8
|
-
* @param params 查询参数
|
|
9
|
-
* @returns Promise<{list: any[], count: number}> 设备列表和总数
|
|
10
|
-
*/
|
|
11
|
-
export declare const getDeviceList: (parmas: IGetDeviceListParams) => Promise<any[]>;
|
|
12
|
-
/**
|
|
13
|
-
* 选择店铺
|
|
14
|
-
* @param shopId 店铺ID
|
|
15
|
-
* @returns Promise<any> 选择店铺结果
|
|
16
|
-
*/
|
|
17
|
-
export declare const selectShop: (shopId: string) => Promise<any>;
|
|
18
|
-
/**
|
|
19
|
-
* 获取租户详情
|
|
20
|
-
* @param deviceId 设备ID
|
|
21
|
-
* @returns Promise<any> 租户详情
|
|
22
|
-
*/
|
|
23
|
-
export declare const getTenantDetail: () => Promise<any>;
|
|
24
|
-
/**
|
|
25
|
-
* 获取租户列表
|
|
26
|
-
* @returns Promise<any> 租户列表
|
|
27
|
-
*/
|
|
28
|
-
export declare const getTenant: () => Promise<StoreItem[]>;
|
|
29
|
-
/**
|
|
30
|
-
* 选择设备
|
|
31
|
-
* @param deviceNumber 设备编号
|
|
32
|
-
* @returns Promise<any> 设备详情
|
|
33
|
-
*/
|
|
34
|
-
export declare const selectDevice: (params: Record<string, any>) => Promise<any>;
|
|
35
|
-
/**
|
|
36
|
-
* 解除设备绑定
|
|
37
|
-
* @param deviceNumber 设备编号
|
|
38
|
-
* @returns Promise<any> 解除设备绑定结果
|
|
39
|
-
*/
|
|
40
|
-
export declare const dissociateDevice: (params: {
|
|
41
|
-
number: string;
|
|
42
|
-
dissociateDeviceNumber: string;
|
|
43
|
-
}) => Promise<any>;
|
|
44
|
-
export {};
|
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WebPosLogin 组件类型定义
|
|
3
|
-
* @description WebPOS 登录流程组件,包含登录、店铺选择、设备选择三个步骤
|
|
4
|
-
*/
|
|
5
|
-
/// <reference types="react" />
|
|
6
|
-
/**
|
|
7
|
-
* 店铺数据结构
|
|
8
|
-
* @description 从租户列表接口返回的店铺信息
|
|
9
|
-
*/
|
|
10
|
-
export interface StoreItem {
|
|
11
|
-
/** 店铺ID */
|
|
12
|
-
id: number;
|
|
13
|
-
/** 租户ID */
|
|
14
|
-
tenant_id: number;
|
|
15
|
-
/** 账户ID */
|
|
16
|
-
account_id: number;
|
|
17
|
-
/** 类型 */
|
|
18
|
-
type: string;
|
|
19
|
-
/** 昵称 */
|
|
20
|
-
nickname: string;
|
|
21
|
-
/** 状态 */
|
|
22
|
-
status: string;
|
|
23
|
-
/** 创建时间 */
|
|
24
|
-
created_at?: string;
|
|
25
|
-
/** 更新时间 */
|
|
26
|
-
updated_at?: string;
|
|
27
|
-
/** 租户详情 */
|
|
28
|
-
tenant: {
|
|
29
|
-
/** 租户ID */
|
|
30
|
-
id: number;
|
|
31
|
-
/** 父租户ID */
|
|
32
|
-
tenant_id?: number;
|
|
33
|
-
/** 账户ID */
|
|
34
|
-
account_id?: number;
|
|
35
|
-
/** 类型 */
|
|
36
|
-
type?: string;
|
|
37
|
-
/** 名称(多语言) */
|
|
38
|
-
name: {
|
|
39
|
-
en?: string | null;
|
|
40
|
-
'zh-CN'?: string | null;
|
|
41
|
-
'zh-HK'?: string | null;
|
|
42
|
-
original: string;
|
|
43
|
-
};
|
|
44
|
-
/** Logo图片 */
|
|
45
|
-
logo?: string;
|
|
46
|
-
/** 图标 */
|
|
47
|
-
icon?: string;
|
|
48
|
-
/** Favicon */
|
|
49
|
-
favicon?: string;
|
|
50
|
-
/** 默认域名 */
|
|
51
|
-
default_domain: string;
|
|
52
|
-
/** 私有域名 */
|
|
53
|
-
private_domain?: string | null;
|
|
54
|
-
/** 货币代码 */
|
|
55
|
-
currency_code?: string | null;
|
|
56
|
-
/** 国家代码 */
|
|
57
|
-
country_code?: string | null;
|
|
58
|
-
/** 语言 */
|
|
59
|
-
locale?: string;
|
|
60
|
-
/** 时区 */
|
|
61
|
-
timezone?: string;
|
|
62
|
-
/** 状态 */
|
|
63
|
-
status?: string;
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* 设备客户端信息
|
|
68
|
-
* @description 设备绑定的客户端详情
|
|
69
|
-
*/
|
|
70
|
-
export interface DeviceClient {
|
|
71
|
-
/** 客户端ID */
|
|
72
|
-
id: number;
|
|
73
|
-
/** 店铺ID */
|
|
74
|
-
shop_id: number;
|
|
75
|
-
/** 设备ID */
|
|
76
|
-
device_id: number;
|
|
77
|
-
/** 客户端编号 */
|
|
78
|
-
number: string;
|
|
79
|
-
/** 客户端名称 */
|
|
80
|
-
name: string;
|
|
81
|
-
/** 客户端类型 */
|
|
82
|
-
type: string;
|
|
83
|
-
/** 设备型号 */
|
|
84
|
-
model?: string;
|
|
85
|
-
/** 系统版本 */
|
|
86
|
-
version?: string;
|
|
87
|
-
/** 设备详细数据 */
|
|
88
|
-
data?: {
|
|
89
|
-
battery?: {
|
|
90
|
-
is_charging?: boolean;
|
|
91
|
-
visible_percent?: string;
|
|
92
|
-
};
|
|
93
|
-
hardware?: {
|
|
94
|
-
country?: string;
|
|
95
|
-
datetime?: string;
|
|
96
|
-
language?: string;
|
|
97
|
-
timezone?: string;
|
|
98
|
-
};
|
|
99
|
-
application?: {
|
|
100
|
-
name?: string;
|
|
101
|
-
type?: string;
|
|
102
|
-
version?: string;
|
|
103
|
-
language?: string;
|
|
104
|
-
bundle_id?: string;
|
|
105
|
-
};
|
|
106
|
-
connectivity?: {
|
|
107
|
-
ip?: string;
|
|
108
|
-
type?: string;
|
|
109
|
-
wifi_details?: any[];
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
/** 最后刷新时间 */
|
|
113
|
-
refreshed_at?: string;
|
|
114
|
-
/** 创建时间 */
|
|
115
|
-
created_at?: string;
|
|
116
|
-
/** 更新时间 */
|
|
117
|
-
updated_at?: string;
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* 设备数据结构
|
|
121
|
-
* @description 从设备列表接口返回的设备信息
|
|
122
|
-
*/
|
|
123
|
-
export interface DeviceItem {
|
|
124
|
-
/** 设备ID */
|
|
125
|
-
id: number;
|
|
126
|
-
/** 店铺ID */
|
|
127
|
-
shop_id: number;
|
|
128
|
-
/** 设备类型 */
|
|
129
|
-
type: string;
|
|
130
|
-
/** 设备编号 */
|
|
131
|
-
number: string;
|
|
132
|
-
/** 设备名称 */
|
|
133
|
-
name: string;
|
|
134
|
-
/** 设备描述 */
|
|
135
|
-
description?: string;
|
|
136
|
-
/** 设备设置 */
|
|
137
|
-
setting?: any[];
|
|
138
|
-
/** 创建时间 */
|
|
139
|
-
created_at?: string;
|
|
140
|
-
/** 更新时间 */
|
|
141
|
-
updated_at?: string;
|
|
142
|
-
/** 绑定的客户端信息(null 表示未被使用) */
|
|
143
|
-
client?: DeviceClient | null;
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* 用户信息
|
|
147
|
-
* @description 当前登录用户的基本信息
|
|
148
|
-
*/
|
|
149
|
-
export interface UserInfo {
|
|
150
|
-
/** 用户名称 */
|
|
151
|
-
name: string;
|
|
152
|
-
/** 用户头像 */
|
|
153
|
-
avatar?: string;
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* 品牌区轮播项
|
|
157
|
-
* @description 左侧品牌区的轮播内容配置
|
|
158
|
-
*/
|
|
159
|
-
export interface CarouselItem {
|
|
160
|
-
/** 内容类型:图片或视频 */
|
|
161
|
-
type: 'image' | 'video';
|
|
162
|
-
/** 资源URL */
|
|
163
|
-
url: string;
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* 品牌区配置
|
|
167
|
-
* @description 左侧品牌展示区域的配置
|
|
168
|
-
*/
|
|
169
|
-
export interface BrandConfig {
|
|
170
|
-
/** 轮播内容列表(图片/视频) */
|
|
171
|
-
carouselItems?: CarouselItem[];
|
|
172
|
-
/** 默认Logo(当无轮播时显示) */
|
|
173
|
-
logo?: string;
|
|
174
|
-
/** 品牌标语 */
|
|
175
|
-
slogan?: string;
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* 登录流程步骤
|
|
179
|
-
*/
|
|
180
|
-
export declare type LoginStep = 'login' | 'store' | 'device';
|
|
181
|
-
/**
|
|
182
|
-
* 支持的语言类型
|
|
183
|
-
*/
|
|
184
|
-
export declare type LocaleType = 'en' | 'zh-CN' | 'zh-HK';
|
|
185
|
-
/**
|
|
186
|
-
* WebPosLogin 主组件 Props
|
|
187
|
-
* @description WebPOS 登录组件的所有配置项
|
|
188
|
-
*/
|
|
189
|
-
export interface WebPosLoginCptProps {
|
|
190
|
-
/** 自定义类名 */
|
|
191
|
-
className?: string;
|
|
192
|
-
/** 自定义样式 */
|
|
193
|
-
style?: React.CSSProperties;
|
|
194
|
-
/** 背景图片URL */
|
|
195
|
-
backgroundImage?: string;
|
|
196
|
-
/** 品牌区配置 */
|
|
197
|
-
brandConfig?: BrandConfig;
|
|
198
|
-
/** 当前步骤:login-登录 | store-店铺选择 | device-设备选择 */
|
|
199
|
-
step?: LoginStep;
|
|
200
|
-
/** 是否显示返回按钮(默认 true) */
|
|
201
|
-
showBackButton?: boolean;
|
|
202
|
-
/** 店铺列表数据 */
|
|
203
|
-
storeList?: StoreItem[];
|
|
204
|
-
/** 设备列表数据 */
|
|
205
|
-
deviceList?: DeviceItem[];
|
|
206
|
-
/** 当前用户信息 */
|
|
207
|
-
userInfo?: UserInfo;
|
|
208
|
-
/** 当前选中的店铺 */
|
|
209
|
-
selectedStore?: StoreItem;
|
|
210
|
-
/** 上次使用的店铺ID(用于显示 Last used 标签) */
|
|
211
|
-
lastUsedStoreId?: number;
|
|
212
|
-
/** 上次使用的设备ID(用于显示 Last used 标签) */
|
|
213
|
-
lastUsedDeviceId?: number;
|
|
214
|
-
/** 语言设置 */
|
|
215
|
-
locale?: LocaleType;
|
|
216
|
-
/** 加载状态 */
|
|
217
|
-
loading?: boolean;
|
|
218
|
-
/** 登录配置 */
|
|
219
|
-
loginConfig?: any;
|
|
220
|
-
/** 店铺选择回调 */
|
|
221
|
-
onStoreSelect?: (store: StoreItem) => void;
|
|
222
|
-
/** 设备选择回调 */
|
|
223
|
-
onDeviceSelect?: (device: DeviceItem) => void;
|
|
224
|
-
/** 切换账号回调 */
|
|
225
|
-
onChangeAccount?: () => void;
|
|
226
|
-
/** 切换店铺回调 */
|
|
227
|
-
onChangeStore?: () => void;
|
|
228
|
-
/** 返回上一步回调 */
|
|
229
|
-
onBack?: () => void;
|
|
230
|
-
/** 登录成功回调 */
|
|
231
|
-
onLoginSuccess?: (data: any) => void;
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* BrandPanel 品牌区组件 Props
|
|
235
|
-
*/
|
|
236
|
-
export interface BrandPanelProps {
|
|
237
|
-
/** 品牌配置 */
|
|
238
|
-
config?: BrandConfig;
|
|
239
|
-
/** 自定义类名 */
|
|
240
|
-
className?: string;
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* SelectStore 店铺选择组件 Props
|
|
244
|
-
*/
|
|
245
|
-
export interface SelectStoreProps {
|
|
246
|
-
/** 店铺列表 */
|
|
247
|
-
storeList?: StoreItem[];
|
|
248
|
-
/** 语言 */
|
|
249
|
-
locale?: LocaleType;
|
|
250
|
-
/** 加载状态 */
|
|
251
|
-
loading?: boolean;
|
|
252
|
-
/** 上次使用的店铺ID */
|
|
253
|
-
lastUsedStoreId?: number;
|
|
254
|
-
/** 选择店铺回调 */
|
|
255
|
-
onSelect?: (store: StoreItem) => void;
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* SelectDevice 设备选择组件 Props
|
|
259
|
-
*/
|
|
260
|
-
export interface SelectDeviceProps {
|
|
261
|
-
/** 设备列表 */
|
|
262
|
-
deviceList?: DeviceItem[];
|
|
263
|
-
/** 语言 */
|
|
264
|
-
locale?: LocaleType;
|
|
265
|
-
/** 加载状态 */
|
|
266
|
-
loading?: boolean;
|
|
267
|
-
/** 选择设备回调 */
|
|
268
|
-
onSelect?: (device: DeviceItem) => void;
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* UserFooter 底部用户信息组件 Props
|
|
272
|
-
*/
|
|
273
|
-
export interface UserFooterProps {
|
|
274
|
-
/** 用户信息 */
|
|
275
|
-
userInfo?: UserInfo;
|
|
276
|
-
/** 当前选中的店铺 */
|
|
277
|
-
selectedStore?: StoreItem;
|
|
278
|
-
/** 当前步骤 */
|
|
279
|
-
step?: LoginStep;
|
|
280
|
-
/** 语言 */
|
|
281
|
-
locale?: LocaleType;
|
|
282
|
-
/** 切换账号回调 */
|
|
283
|
-
onChangeAccount?: () => void;
|
|
284
|
-
/** 切换店铺回调 */
|
|
285
|
-
onChangeStore?: () => void;
|
|
286
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { UIConfig, LoginFormData, AuthMethodType, LoginMethodItem, LegalTermsConfig, OAuthConfig } from './shared/types';
|
|
3
|
-
import './index.less';
|
|
4
|
-
/** 登录组件配置 */
|
|
5
|
-
export interface Login2Config {
|
|
6
|
-
/**
|
|
7
|
-
* 登录方式配置数组
|
|
8
|
-
* 数组顺序决定显示顺序,第一项为默认登录方式
|
|
9
|
-
*/
|
|
10
|
-
loginMethods: LoginMethodItem[];
|
|
11
|
-
/** UI 配置 */
|
|
12
|
-
ui?: UIConfig;
|
|
13
|
-
/** 三方 OAuth 配置 */
|
|
14
|
-
oauth?: OAuthConfig;
|
|
15
|
-
/** 渠道标识 - 用于区分不同来源的登录请求 */
|
|
16
|
-
channel?: string;
|
|
17
|
-
/** 法律条款配置 */
|
|
18
|
-
legalTerms?: LegalTermsConfig;
|
|
19
|
-
/** 邮件链接验证配置 - 从邮件链接进入重置密码时使用 */
|
|
20
|
-
emailLinkVerification?: {
|
|
21
|
-
/** 是否启用邮件链接验证模式 */
|
|
22
|
-
enabled: boolean;
|
|
23
|
-
/** 从URL参数获取的验证码 */
|
|
24
|
-
code: string;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
/** 登录组件事件 */
|
|
28
|
-
export interface Login2Events {
|
|
29
|
-
/** 登录回调 */
|
|
30
|
-
onLogin?: (originResult: any, method: AuthMethodType, data: LoginFormData, channel?: string) => Promise<void> | void;
|
|
31
|
-
/** 三方登录回调 */
|
|
32
|
-
onOAuthLogin?: (provider: 'google' | 'facebook' | 'apple', channel?: string) => Promise<void> | void;
|
|
33
|
-
/** 发送验证码回调 */
|
|
34
|
-
onSendVerificationCode?: (account: string, type: 'email' | 'phone', channel?: string) => Promise<void> | void;
|
|
35
|
-
/** 忘记密码回调 */
|
|
36
|
-
onForgotPassword?: (account: string, channel?: string) => Promise<void> | void;
|
|
37
|
-
/** 切换到注册回调 */
|
|
38
|
-
onSwitchToRegister?: () => void;
|
|
39
|
-
/** 错误处理回调 */
|
|
40
|
-
onError?: (error: any, method?: AuthMethodType) => void;
|
|
41
|
-
}
|
|
42
|
-
/** 登录组件属性 */
|
|
43
|
-
export interface Login2Props extends Login2Events {
|
|
44
|
-
/** 配置对象 */
|
|
45
|
-
config: Login2Config;
|
|
46
|
-
/** 是否显示 */
|
|
47
|
-
visible?: boolean;
|
|
48
|
-
/** 关闭回调 */
|
|
49
|
-
onClose?: () => void;
|
|
50
|
-
/** 自定义类名 */
|
|
51
|
-
className?: string;
|
|
52
|
-
/** 自定义样式 */
|
|
53
|
-
style?: React.CSSProperties;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* 登录 2.0 组件
|
|
57
|
-
* 支持邮箱、手机、三方登录
|
|
58
|
-
* 组件宽度固定 360px
|
|
59
|
-
*/
|
|
60
|
-
declare const Login2: React.FC<Login2Props>;
|
|
61
|
-
export default Login2;
|