| | |
| | | AliyunSms = 10, |
| | | } |
| | | |
| | | /** 短信模板类型 */ |
| | | export enum EnumSmsTemplateType { |
| | | /**登录 */ |
| | | Login = 0, |
| | | /**注册 */ |
| | | Register = 1, |
| | | /**修改密码 */ |
| | | UpdatePassword = 2, |
| | | /**绑定手机号码 */ |
| | | BindPhoneNumber = 3, |
| | | /**修改手机号码 */ |
| | | UpdatePhoneNumber = 4, |
| | | } |
| | | |
| | | /** 任务结算状态 */ |
| | | export enum EnumTaskCheckReceiveStatus { |
| | | /**待验收 */ |
| | |
| | | // @ts-ignore |
| | | import { request } from '@/utils/request'; |
| | | |
| | | /** 绑定手机号 POST /api/user/auth/bindPhoneNumber */ |
| | | export async function bindPhoneNumber( |
| | | body: API.BindPhoneNumberCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<boolean>('/api/user/auth/bindPhoneNumber', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取阿里云OSS授权信息 GET /api/user/auth/getAliyunOSSAcs */ |
| | | export async function getAliyunOSSAcs( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | |
| | | |
| | | /** 密码登录 POST /api/user/auth/passwordLogin */ |
| | | export async function passwordLogin(body: API.PasswordLoginCommand, options?: API.RequestConfig) { |
| | | return request<API.PasswordLoginCommandCallback>('/api/user/auth/passwordLogin', { |
| | | return request<API.LoginCommandCallback>('/api/user/auth/passwordLogin', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 发送验证码 POST /api/user/auth/sendVerifyCode */ |
| | | export async function sendVerifyCode(body: API.SendVerifyCodeCommand, options?: API.RequestConfig) { |
| | | return request<string>('/api/user/auth/sendVerifyCode', { |
| | | /** 发送登录或注册短信 POST /api/user/auth/sendLoginOrRegisterVerifyCode */ |
| | | export async function sendLoginOrRegisterVerifyCode( |
| | | body: API.SendLoginOrRegisterVerifyCodeCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/user/auth/sendLoginOrRegisterVerifyCode', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 短信登录 POST /api/user/auth/smsLogin */ |
| | | export async function smsLogin(body: API.SmsLoginCommand, options?: API.RequestConfig) { |
| | | return request<API.LoginCommandCallback>('/api/user/auth/smsLogin', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 微信小程序登录 POST /api/user/auth/wxmpLogin */ |
| | | export async function wxmpLogin(body: API.WxmpLoginCommand, options?: API.RequestConfig) { |
| | | return request<API.LoginCommandCallback>('/api/user/auth/wxmpLogin', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | |
| | | /* eslint-disable */ |
| | | // API 更新时间: |
| | | // API 唯一标识: |
| | | import * as dictionary from './dictionary'; |
| | | import * as menu from './menu'; |
| | | import * as enterprise from './enterprise'; |
| | | import * as task from './task'; |
| | | import * as auth from './auth'; |
| | | import * as user from './user'; |
| | | import * as role from './role'; |
| | | import * as resource from './resource'; |
| | | import * as user from './user'; |
| | | import * as dictionary from './dictionary'; |
| | | import * as auth from './auth'; |
| | | import * as task from './task'; |
| | | import * as enterprise from './enterprise'; |
| | | import * as role from './role'; |
| | | import * as menu from './menu'; |
| | | export default { |
| | | dictionary, |
| | | menu, |
| | | enterprise, |
| | | task, |
| | | auth, |
| | | user, |
| | | role, |
| | | resource, |
| | | user, |
| | | dictionary, |
| | | auth, |
| | | task, |
| | | enterprise, |
| | | role, |
| | | menu, |
| | | }; |
| | |
| | | // @ts-ignore |
| | | import { request } from '@/utils/request'; |
| | | |
| | | /** 删除任务 DELETE /api/flexjob/task/deleteTaskInfo */ |
| | | export async function deleteTaskInfo(body: API.DeleteTaskInfoCommand, options?: API.RequestConfig) { |
| | | return request<number>('/api/flexjob/task/deleteTaskInfo', { |
| | | method: 'DELETE', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 查询任务详情 GET /api/flexjob/task/getTaskInfo */ |
| | | export async function getTaskInfo( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | |
| | | |
| | | /** 查询任务分页列表 POST /api/flexjob/task/getTaskInfos */ |
| | | export async function getTaskInfos(body: API.GetTaskInfosQuery, options?: API.RequestConfig) { |
| | | return request<API.PagedListQueryResultGetTaskInfosQueryResultItem>( |
| | | '/api/flexjob/task/getTaskInfos', |
| | | { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | } |
| | | ); |
| | | return request<API.GetTaskInfosQueryResult>('/api/flexjob/task/getTaskInfos', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 保存任务 POST /api/flexjob/task/saveTaskInfo */ |
| | |
| | | userId?: string; |
| | | } |
| | | |
| | | interface BindPhoneNumberCommand { |
| | | /** 手机号码 */ |
| | | phoneNumber?: string; |
| | | /** 验证码 */ |
| | | verifyCode?: string; |
| | | } |
| | | |
| | | interface DeleteDictionaryCategoryCommand { |
| | | ids: string[]; |
| | | } |
| | |
| | | } |
| | | |
| | | interface DeleteRoleCommand { |
| | | ids: string[]; |
| | | } |
| | | |
| | | interface DeleteTaskInfoCommand { |
| | | ids: string[]; |
| | | } |
| | | |
| | |
| | | AliyunSms = 10, |
| | | } |
| | | |
| | | enum EnumSmsTemplateType { |
| | | /**登录 */ |
| | | Login = 0, |
| | | /**注册 */ |
| | | Register = 1, |
| | | /**修改密码 */ |
| | | UpdatePassword = 2, |
| | | /**绑定手机号码 */ |
| | | BindPhoneNumber = 3, |
| | | /**修改手机号码 */ |
| | | UpdatePhoneNumber = 4, |
| | | } |
| | | |
| | | enum EnumTaskCheckReceiveStatus { |
| | | /**待验收 */ |
| | | Wait = 10, |
| | |
| | | Enterprise = 20, |
| | | /**运营 */ |
| | | Operation = 100, |
| | | } |
| | | |
| | | interface FriendlyResultBoolean { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | | code?: number; |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | /** 数据 */ |
| | | data?: boolean; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | | msg?: any; |
| | | /** 附加数据 */ |
| | | extras?: any; |
| | | /** 时间戳 */ |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultGetAliyunOSSAcsQueryResult { |
| | |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: GetTaskInfoQueryResult; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | | msg?: any; |
| | | /** 附加数据 */ |
| | | extras?: any; |
| | | /** 时间戳 */ |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultGetTaskInfosQueryResult { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | | code?: number; |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: GetTaskInfosQueryResult; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultLoginCommandCallback { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | | code?: number; |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: LoginCommandCallback; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | | msg?: any; |
| | | /** 附加数据 */ |
| | | extras?: any; |
| | | /** 时间戳 */ |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultPagedListQueryResultGetDictionaryCategoriesQueryResultItem { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: PagedListQueryResultGetRolesQueryResultItem; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | | msg?: any; |
| | | /** 附加数据 */ |
| | | extras?: any; |
| | | /** 时间戳 */ |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultPagedListQueryResultGetTaskInfosQueryResultItem { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | | code?: number; |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: PagedListQueryResultGetTaskInfosQueryResultItem; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | | msg?: any; |
| | | /** 附加数据 */ |
| | | extras?: any; |
| | | /** 时间戳 */ |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultPasswordLoginCommandCallback { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | | code?: number; |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: PasswordLoginCommandCallback; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | |
| | | contactEmail?: string; |
| | | /** 账号 */ |
| | | userName?: string; |
| | | /** 在招岗位数量 */ |
| | | taskCount?: number; |
| | | } |
| | | |
| | | interface GetEnterpriseSmsSettingQueryResult { |
| | |
| | | /** 企业Id */ |
| | | enterpriseId?: string; |
| | | /** 企业全称 */ |
| | | enterpriseName?: string; |
| | | enterpriseEnterpriseName?: string; |
| | | /** 在招岗位数量 */ |
| | | taskCount?: number; |
| | | /** 任务名称 */ |
| | |
| | | createdTime?: string; |
| | | /** 是否已收藏 */ |
| | | isCollected?: boolean; |
| | | status?: EnumTaskStatus; |
| | | releaseStatus?: EnumTaskReleaseStatus; |
| | | } |
| | | |
| | | interface GetTaskInfoQueryResultBenefit { |
| | | /** 福利编号 */ |
| | | benefitCode?: string; |
| | | /** 福利 */ |
| | | /** 福利图标 */ |
| | | benefitField2?: string; |
| | | /** 福利名称 */ |
| | | benefitContent?: string; |
| | | } |
| | | |
| | |
| | | pageModel?: PagedListQueryPageModel; |
| | | /** 关键字(任务名称) */ |
| | | keywords?: string; |
| | | /** 企业Id */ |
| | | enterpriseId?: string; |
| | | /** 发布时间-开始 */ |
| | | beginTime?: string; |
| | | /** 发布时间-结束 */ |
| | |
| | | status?: EnumTaskStatus; |
| | | releaseStatus?: EnumTaskReleaseStatus; |
| | | recommendStatus?: EnumTaskRecommendStatus; |
| | | } |
| | | |
| | | interface GetTaskInfosQueryResult { |
| | | pageModel?: PagedListQueryResultPageModel; |
| | | /** 数据 */ |
| | | data?: GetTaskInfosQueryResultItem[]; |
| | | objectData?: GetTaskInfosQueryResultObjectData; |
| | | } |
| | | |
| | | interface GetTaskInfosQueryResultItem { |
| | |
| | | createdTime?: string; |
| | | } |
| | | |
| | | interface GetTaskInfosQueryResultObjectData { |
| | | /** 待安排数量 */ |
| | | waitAssignCount?: number; |
| | | /** 已安排数量 */ |
| | | completedAssignCount?: number; |
| | | /** 发布中数量 */ |
| | | inProcessReleaseCount?: number; |
| | | /** 已停止数量 */ |
| | | stoppedReleaseCount?: number; |
| | | } |
| | | |
| | | interface GetUserInfoRolesQueryResultItem { |
| | | /** 角色Id */ |
| | | id?: string; |
| | |
| | | } |
| | | |
| | | type GetUserResumeQueryResult = Record<string, any>; |
| | | |
| | | interface LoginCommandCallback { |
| | | /** 用户访问令牌 */ |
| | | accessToken?: string; |
| | | /** 刷新令牌 */ |
| | | refreshToken?: string; |
| | | } |
| | | |
| | | interface PagedListQueryPageModel { |
| | | /** 行数 */ |
| | |
| | | data?: GetRolesQueryResultItem[]; |
| | | } |
| | | |
| | | interface PagedListQueryResultGetTaskInfosQueryResultItem { |
| | | pageModel?: PagedListQueryResultPageModel; |
| | | /** 数据 */ |
| | | data?: GetTaskInfosQueryResultItem[]; |
| | | } |
| | | |
| | | interface PagedListQueryResultPageModel { |
| | | /** 行数 */ |
| | | rows?: number; |
| | |
| | | password: string; |
| | | type?: EnumUserType; |
| | | clientType?: EnumClientType; |
| | | } |
| | | |
| | | interface PasswordLoginCommandCallback { |
| | | /** 用户访问令牌 */ |
| | | accessToken?: string; |
| | | /** 刷新令牌 */ |
| | | refreshToken?: string; |
| | | } |
| | | |
| | | interface SaveDictionaryCategoryCommand { |
| | |
| | | data?: any; |
| | | } |
| | | |
| | | interface SendVerifyCodeCommand { |
| | | interface SendLoginOrRegisterVerifyCodeCommand { |
| | | /** 手机号码 */ |
| | | phoneNumber?: string; |
| | | templateCode?: EnumSmsTemplateType; |
| | | phoneNumber: string; |
| | | } |
| | | |
| | | interface SetDictionaryDataIsDisabledCommand { |
| | |
| | | status?: EnumUserStatus; |
| | | } |
| | | |
| | | interface SmsLoginCommand { |
| | | /** 手机号码 */ |
| | | phoneNumber?: string; |
| | | /** 验证码 */ |
| | | verifyCode?: string; |
| | | type?: EnumUserType; |
| | | clientType?: EnumClientType; |
| | | } |
| | | |
| | | type SyncHumanResourcesAreaDictionaryDataCommand = Record<string, any>; |
| | | |
| | | interface WxmpLoginCommand { |
| | | /** 用户登录凭证 */ |
| | | code: string; |
| | | type?: EnumUserType; |
| | | } |
| | | } |
| | |
| | | |
| | | export interface UserState { |
| | | token: string; |
| | | userInfo: API.PasswordLoginCommandCallback; |
| | | userInfo: API.LoginCommandCallback; |
| | | } |
| | | |
| | | function getDefaultState() { |
| | |
| | | this.token = token; |
| | | setToken(token); |
| | | }, |
| | | setUserInfo(userInfo: API.PasswordLoginCommandCallback) { |
| | | setUserInfo(userInfo: API.LoginCommandCallback) { |
| | | this.userInfo = userInfo; |
| | | setUserInfo(userInfo); |
| | | }, |
| | |
| | | return storageLocal.removeItem(StorageKey.REFRESH_TOKEN_KEY); |
| | | } |
| | | |
| | | export function getUserInfo(): API.PasswordLoginCommandCallback | null { |
| | | export function getUserInfo(): API.LoginCommandCallback | null { |
| | | return storageLocal.getItem(StorageKey.USER_INFO_KEY); |
| | | } |
| | | |
| | | export function setUserInfo(userInfo: API.PasswordLoginCommandCallback) { |
| | | export function setUserInfo(userInfo: API.LoginCommandCallback) { |
| | | return storageLocal.setItem(StorageKey.USER_INFO_KEY, userInfo); |
| | | } |
| | | |