import { AuthModule } from ".."; type BgStyle = { image: string; repeat?: string; position?: string; size?: string; }; const jumpActions = { success: createOpts({ action() { const redirectUrl = this.helper.getRedirectPath(); this.helper.linkTo(redirectUrl || this.config.loginJumpPath, { replace: !!redirectUrl, }); }, }), needLogin: createOpts({ action() { this.helper.linkTo(this.config.loginPath, { replace: true, redirect: true, }); }, }), logout: createOpts({ action() { this.helper.linkTo(this.config.loginPath); }, }), }; export const User_Config = { singlePage: false, key: "", //queentreesku3d companyKey: "", regInfo: { key: "", //usercenter }, loginPath: "/login", loginJumpPath: "/", logoutJumpPath: "/", needCompanyLogin: false, needRegister: false, needResetPwd: false, perms: null as { baseURL: string; } | null, banner: null as { mode?: string; background: BgStyle; title?: string; subTitle?: string; } | null, layout: null as { background?: BgStyle; } | null, jumpOptions: { loginSucc: jumpActions.success, needLogin: jumpActions.needLogin, tokenExpire: jumpActions.needLogin, logout: jumpActions.logout, }, }; function createOpts void }>( opts: T ): T { return opts; }