| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278 |
- import { UICachePolicy, UILayer } from '../framework/ui/UILayer';
- // viewId.StoreView
- export const UIViewID = {
- LoginView: 'LoginView',
- HomeView: 'HomeView',
- LoadingView: "LoadingView",
- Mail: "Mail",
- MailDetail: "MailDetail",
- StoreView: "StoreView",
- PlayHistory: "PlayHistory",
- GamePolicyView: "GamePolicyView",
- Register: "Register",
- ResetPsd: "ResetPsd",
- AutoLogin: "AutoLogin",
- LoginSuccess: "LoginSuccess",
- Support: "Support",
- OrderView: "OrderView",
- UIFirstPack: "UIFirstPack",
- RedeemView: "RedeemView",
- UIToast: "UIToast",
- UIDialog: "UIDialog",
- UserInfoView: "UserInfoView",
- UnbindAccount: "UnbindAccount",
- ChangeName: "ChangeName",
- ChangeAvatar: "ChangeAvatar",
- BindPhone: "BindPhone",
- BindEmail: "BindEmail",
- UIInvite: "UIInvite",
- UIInviteBind: "UIInviteBind",
- UIInviteSpin: "UIInviteSpin",
- ChangePhone: "ChangePhone",
- ChangeEmail: "ChangeEmail",
- SeasonPassView: "SeasonPassView",
- SeasonPassPurchase: "SeasonPassPurchase",
- ClubView: "ClubView",
- UIBirthdayGift: "UIBirthdayGift",
- UIClubRules: "UIClubRules",
- UIKYCVerify: "UIKYCVerify",
- UIPayoutConfrim: "UIPayoutConfrim",
- UIPayoutEditor: "UIPayoutEditor",
- UIPayoutResult: "UIPayoutResult",
- CheckInView: "CheckInView",
- RewardView: "RewardView",
-
- } as const;
- export type UIViewID = typeof UIViewID[keyof typeof UIViewID];
- export interface UIViewConfig {
- id: UIViewID;
- prefabPath: string;
- layer: UILayer;
- bundle?: string;
- cache?: UICachePolicy;
- mutexGroup?: string;
- /** true 时,打开该界面不自动显示 LoadingView,默认 false。 */
- ignoreLoading?: boolean;
- }
- /**
- * 项目全部 UIView 的静态配置。
- */
- export const UIViewConfigs: Record<string, UIViewConfig> = {
- [UIViewID.LoginView]: {
- id: UIViewID.LoginView,
- prefabPath: 'ui/login/LoginView',
- layer: UILayer.Page,
- },
- [UIViewID.HomeView]: {
- id: UIViewID.HomeView,
- prefabPath: 'ui/home/HomeView',
- layer: UILayer.Page,
- cache: UICachePolicy.Persist,
- },
- [UIViewID.LoadingView]: {
- id: UIViewID.LoadingView,
- prefabPath: 'ui/loading/LoadingView',
- layer: UILayer.Loading,
- cache: UICachePolicy.Persist,
- ignoreLoading: true,
- },
- [UIViewID.UIToast]: {
- id: UIViewID.UIToast,
- prefabPath: 'ui/toast/UIToast',
- layer: UILayer.Toast,
- cache: UICachePolicy.Persist,
- ignoreLoading: true,
- },
- [UIViewID.UIDialog]: {
- id: UIViewID.UIDialog,
- prefabPath: 'ui/dialog/UIDialog',
- ignoreLoading: true,
- layer: UILayer.System,
- cache: UICachePolicy.Persist,
- },
- [UIViewID.Mail]: {
- id: UIViewID.Mail,
- prefabPath: 'ui/mail/Mail',
- layer: UILayer.Popup,
- },
- [UIViewID.MailDetail]: {
- id: UIViewID.MailDetail,
- prefabPath: 'ui/mail/MailDetail',
- layer: UILayer.Popup,
- cache: UICachePolicy.Delayed,
- },
- [UIViewID.StoreView]: {
- id: UIViewID.StoreView,
- prefabPath: 'ui/store/StoreView',
- layer: UILayer.Page,
- },
- [UIViewID.OrderView]: {
- id: UIViewID.OrderView,
- prefabPath: 'ui/store/OrderView',
- layer: UILayer.Popup,
- },
- [UIViewID.UIFirstPack]: {
- id: UIViewID.UIFirstPack,
- prefabPath: 'ui/store/UIFirstPack',
- layer: UILayer.Popup
- },
- [UIViewID.PlayHistory]: {
- id: UIViewID.PlayHistory,
- prefabPath: 'ui/playHistory/PlayHistory',
- layer: UILayer.Popup,
- },
- [UIViewID.GamePolicyView]: {
- id: UIViewID.GamePolicyView,
- prefabPath: 'ui/policy/GamePolicyView',
- layer: UILayer.Popup,
- },
- [UIViewID.Register]: {
- id: UIViewID.Register,
- prefabPath: 'ui/register/Register',
- layer: UILayer.Popup
- },
- [UIViewID.ResetPsd]: {
- id: UIViewID.ResetPsd,
- prefabPath: 'ui/resetPsd/ResetPsd',
- layer: UILayer.Popup
- },
- [UIViewID.AutoLogin]: {
- id: UIViewID.AutoLogin,
- prefabPath: 'ui/login/AutoLogin',
- layer: UILayer.Popup
- },
- [UIViewID.LoginSuccess]: {
- id: UIViewID.LoginSuccess,
- prefabPath: 'ui/login/LoginSuccess',
- layer: UILayer.Popup
- },
- [UIViewID.Support]: {
- id: UIViewID.Support,
- prefabPath: 'ui/support/Support',
- layer: UILayer.Popup
- },
- [UIViewID.RedeemView]: {
- id: UIViewID.RedeemView,
- prefabPath: 'ui/redeem/RedeemView',
- layer: UILayer.Page
- },
- [UIViewID.UIPayoutConfrim]: {
- id: UIViewID.UIPayoutConfrim,
- prefabPath: 'ui/redeem/UIPayoutConfrim',
- layer: UILayer.Popup
- },
- [UIViewID.UIPayoutEditor]: {
- id: UIViewID.UIPayoutEditor,
- prefabPath: 'ui/redeem/UIPayoutEditor',
- layer: UILayer.Popup
- },
- [UIViewID.UIPayoutResult]: {
- id: UIViewID.UIPayoutResult,
- prefabPath: 'ui/redeem/UIPayoutResult',
- layer: UILayer.Popup
- },
- [UIViewID.UserInfoView]: {
- id: UIViewID.UserInfoView,
- prefabPath: 'ui/userInfo/UserInfoView',
- layer: UILayer.Page,
- cache: UICachePolicy.Delayed,
- },
- [UIViewID.UnbindAccount]: {
- id: UIViewID.UnbindAccount,
- prefabPath: 'ui/userInfo/UnbindAccount',
- layer: UILayer.Popup
- },
- [UIViewID.ChangeName]: {
- id: UIViewID.ChangeName,
- prefabPath: 'ui/userInfo/ChangeName',
- layer: UILayer.Popup
- },
- [UIViewID.ChangeAvatar]: {
- id: UIViewID.ChangeAvatar,
- prefabPath: 'ui/userInfo/ChangeAvatar',
- layer: UILayer.Popup
- },
- [UIViewID.BindPhone]: {
- id: UIViewID.BindPhone,
- prefabPath: 'ui/userInfo/BindPhone',
- layer: UILayer.Popup
- },
- [UIViewID.BindEmail]: {
- id: UIViewID.BindEmail,
- prefabPath: 'ui/userInfo/BindEmail',
- layer: UILayer.Popup
- },
- [UIViewID.UIInvite]: {
- id: UIViewID.UIInvite,
- prefabPath: 'ui/invite/UIInvite',
- layer: UILayer.Popup
- },
- [UIViewID.UIInviteBind]: {
- id: UIViewID.UIInviteBind,
- prefabPath: 'ui/invite/UIInviteBind',
- layer: UILayer.Popup
- },
- [UIViewID.UIInviteSpin]: {
- id: UIViewID.UIInviteSpin,
- prefabPath: 'ui/invite/UIInviteSpin',
- layer: UILayer.Popup
- },
- [UIViewID.ChangePhone]: {
- id: UIViewID.ChangePhone,
- prefabPath: 'ui/userInfo/ChangePhone',
- layer: UILayer.Popup
- },
- [UIViewID.ChangeEmail]: {
- id: UIViewID.ChangeEmail,
- prefabPath: 'ui/userInfo/ChangeEmail',
- layer: UILayer.Popup
- },
- [UIViewID.SeasonPassView]: {
- id: UIViewID.SeasonPassView,
- prefabPath: 'ui/seasonPass/SeasonPassView',
- layer: UILayer.Page
- },
- [UIViewID.SeasonPassPurchase]: {
- id: UIViewID.SeasonPassPurchase,
- prefabPath: 'ui/seasonPass/SeasonPassPurchase',
- layer: UILayer.Popup
- },
- [UIViewID.ClubView]: {
- id: UIViewID.ClubView,
- prefabPath: 'ui/club/ClubView',
- layer: UILayer.Page
- },
- [UIViewID.UIBirthdayGift]: {
- id: UIViewID.UIBirthdayGift,
- prefabPath: 'ui/club/UIBirthdayGift',
- layer: UILayer.Popup
- },
- [UIViewID.UIClubRules]: {
- id: UIViewID.UIClubRules,
- prefabPath: 'ui/club/UIClubRules',
- layer: UILayer.Popup
- },
- [UIViewID.UIKYCVerify]: {
- id: UIViewID.UIKYCVerify,
- prefabPath: 'ui/club/UIKYCVerify',
- layer: UILayer.Popup
- },
- [UIViewID.CheckInView]: {
- id: UIViewID.CheckInView,
- prefabPath: 'ui/checkIn/CheckInView',
- layer: UILayer.Page,
- cache: UICachePolicy.Delayed,
- },
- [UIViewID.RewardView]: {
- id: UIViewID.RewardView,
- prefabPath: 'ui/reward/RewardView',
- layer: UILayer.Page,
- }
- };
- export function getUIViewConfig(viewId: UIViewID): UIViewConfig {
- return UIViewConfigs[viewId];
- }
|