Merge branch 'master' of http://120.26.58.240:8888/r/flexJobMiniApp
| | |
| | | "ignore": [], |
| | | "include": [] |
| | | }, |
| | | "appid": "wxb9e0baf4f87aa0de", |
| | | "appid": "wx3669dd12a0915f7d", |
| | | "projectname": "bMiniApp" |
| | | } |
| | |
| | | import { AppLocalConfig } from '@/constants'; |
| | | |
| | | interface UserState { |
| | | userInfo?: Nullable<API.PasswordLoginCommandCallback>; |
| | | userInfo?: Nullable<API.LoginCommandCallback>; |
| | | token?: Nullable<string>; |
| | | refreshToken?: Nullable<string>; |
| | | userDetail?: Nullable<API.UserInfoV2>; |
| | |
| | | }, |
| | | |
| | | // 用户手机验证码登入 |
| | | async loginByUsername(data: API.PhoneMesssageCodeLoginInput) { |
| | | let res = await accountServices.phoneMesssageCodeLogin( |
| | | async loginByUsername(data: API.SmsLoginCommand) { |
| | | let res = await authServices.smsLogin( |
| | | { |
| | | phoneNumber: data.phoneNumber, |
| | | code: data.code, |
| | | verifyCode: data.verifyCode, |
| | | type: AppLocalConfig.userType, |
| | | clientType: AppLocalConfig.clientType, |
| | | }, |
| | | { showLoading: false } |
| | | ); |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import * as commonServices from '@12333/services/api/Common'; |
| | | import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; |
| | | import { FormValidator, Message } from '@12333/utils'; |
| | | import { LargeButton } from '@/components'; |
| | |
| | | import { useLoginedJump } from '@/hooks'; |
| | | import { useUserStore } from '@/stores/modules/user'; |
| | | import Taro from '@tarojs/taro'; |
| | | import * as authServices from '@12333/services/apiV2/auth'; |
| | | |
| | | defineOptions({ |
| | | name: 'verificationCodeLoginForm', |
| | |
| | | }); |
| | | |
| | | async function onGetCaptcha() { |
| | | await commonServices.sendVerificationCode( |
| | | await authServices.sendLoginOrRegisterVerifyCode( |
| | | { |
| | | phoneNumber: form.phoneNumber, |
| | | businessType: VerificationCodeBusinessType.PhoneMesssageCodeLogin, |
| | | }, |
| | | { showLoading: false } |
| | | ); |
| | |
| | | form.loading = true; |
| | | await userStore.loginByUsername({ |
| | | phoneNumber: form.phoneNumber, |
| | | code: form.verificationCode, |
| | | verifyCode: form.verificationCode, |
| | | }); |
| | | jump(); |
| | | } |
| | |
| | | <script setup lang="ts"> |
| | | import LoginPageLayout from '../components/LoginPageLayout/LoginPageLayout.vue'; |
| | | import { Policy } from '@/components'; |
| | | import * as commonServices from '@12333/services/api/Common'; |
| | | import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; |
| | | import { FormValidator, Message } from '@12333/utils'; |
| | | import { LargeButton } from '@/components'; |
| | |
| | | import { VerificationCodeBusinessType } from '@12333/constants'; |
| | | import Taro from '@tarojs/taro'; |
| | | import { ResponseCode } from '@12333/constants'; |
| | | import * as accountServices from '@12333/services/api/Account'; |
| | | import * as authServices from '@12333/services/apiV2/auth'; |
| | | |
| | | defineOptions({ |
| | | name: 'registerForm', |
| | |
| | | }); |
| | | |
| | | async function onGetCaptcha() { |
| | | await commonServices.sendVerificationCode( |
| | | await authServices.sendLoginOrRegisterVerifyCode( |
| | | { |
| | | phoneNumber: form.phoneNumber, |
| | | businessType: VerificationCodeBusinessType.PhoneMesssageCodeRegister, |
| | | }, |
| | | { |
| | | showLoading: false, |
| | | customErrorHandler(error) { |
| | | if (error?.response?.data?.error?.code === ResponseCode.RegisterExistsPhoneNumber) { |
| | | Message.confirm({ |
| | | message: '该手机号已注册,请去登录页登录', |
| | | confirmText: '去登录', |
| | | }).then(() => { |
| | | goLogin(); |
| | | }); |
| | | return true; |
| | | } |
| | | }, |
| | | // customErrorHandler(error) { |
| | | // if (error?.response?.data?.error?.code === ResponseCode.RegisterExistsPhoneNumber) { |
| | | // Message.confirm({ |
| | | // message: '该手机号已注册,请去登录页登录', |
| | | // confirmText: '去登录', |
| | | // }).then(() => { |
| | | // goLogin(); |
| | | // }); |
| | | // return true; |
| | | // } |
| | | // }, |
| | | } |
| | | ); |
| | | } |
| | |
| | | const userStore = useUserStoreWithOut(); |
| | | |
| | | if (response.headers['x-access-token']) { |
| | | const tokenInfo: API.PasswordLoginCommandCallback = { |
| | | const tokenInfo: API.LoginCommandCallback = { |
| | | accessToken: response.headers['access-token'], |
| | | refreshToken: response.headers['x-access-token'], |
| | | }; |
| | |
| | | } |
| | | |
| | | export function getUserInfo() { |
| | | return storageLocal.getItem<API.PasswordLoginCommandCallback>(StorageKey.USER_INFO_KEY); |
| | | return storageLocal.getItem<API.LoginCommandCallback>(StorageKey.USER_INFO_KEY); |
| | | } |
| | | |
| | | export function setUserInfo(userInfo: API.PasswordLoginCommandCallback) { |
| | | export function setUserInfo(userInfo: API.LoginCommandCallback) { |
| | | return storageLocal.setItem(StorageKey.USER_INFO_KEY, userInfo); |
| | | } |
| | | |
| | |
| | | import { EnumUserType, EnumClientType } from '@12333/constants'; |
| | | |
| | | export const AppLocalConfig = { |
| | | userType: EnumUserType.Enterprise, |
| | | userType: EnumUserType.Personal, |
| | | clientType: EnumClientType.PcWeb, |
| | | }; |
| | |
| | | import { AppLocalConfig } from '@/constants'; |
| | | |
| | | interface UserState { |
| | | userInfo?: Nullable<API.PasswordLoginCommandCallback>; |
| | | userInfo?: Nullable<API.LoginCommandCallback>; |
| | | token?: Nullable<string>; |
| | | refreshToken?: Nullable<string>; |
| | | userDetail?: Nullable<API.UserInfoV2>; |
| | |
| | | }, |
| | | |
| | | // 用户手机验证码登入 |
| | | async loginByUsername(data: API.PhoneMesssageCodeLoginInput) { |
| | | let res = await accountServices.phoneMesssageCodeLogin( |
| | | async loginByUsername(data: API.SmsLoginCommand) { |
| | | let res = await authServices.smsLogin( |
| | | { |
| | | phoneNumber: data.phoneNumber, |
| | | code: data.code, |
| | | verifyCode: data.verifyCode, |
| | | type: AppLocalConfig.userType, |
| | | clientType: AppLocalConfig.clientType, |
| | | }, |
| | | { showLoading: false } |
| | | ); |
| | |
| | | return res; |
| | | }, |
| | | |
| | | async loginSuccess(res: API.PasswordLoginCommandCallback) { |
| | | async loginSuccess(res: API.LoginCommandCallback) { |
| | | try { |
| | | this.setUserInfoAction(res); |
| | | this.setTokenAction(res); |
| | |
| | | } catch (error) {} |
| | | }, |
| | | |
| | | setTokenAction(tokenInfo: API.PasswordLoginCommandCallback) { |
| | | setTokenAction(tokenInfo: API.LoginCommandCallback) { |
| | | this.token = tokenInfo?.accessToken; |
| | | this.refreshToken = tokenInfo.refreshToken ?? ''; |
| | | }, |
| | | |
| | | setUserInfoAction(info: API.PasswordLoginCommandCallback) { |
| | | setUserInfoAction(info: API.LoginCommandCallback) { |
| | | this.userInfo = info; |
| | | setUserInfo(info); |
| | | }, |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import * as commonServices from '@12333/services/api/Common'; |
| | | import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; |
| | | import { FormValidator, Message } from '@12333/utils'; |
| | | import { LargeButton } from '@/components'; |
| | | import { ProFormCaptcha } from 'senin-mini/components'; |
| | | import { VerificationCodeBusinessType } from '@12333/constants'; |
| | | import { useLoginedJump } from '@/hooks'; |
| | | import { useUserStore } from '@/stores/modules/user'; |
| | | import Taro from '@tarojs/taro'; |
| | | import * as authServices from '@12333/services/apiV2/auth'; |
| | | |
| | | defineOptions({ |
| | | name: 'verificationCodeLoginForm', |
| | |
| | | }); |
| | | |
| | | async function onGetCaptcha() { |
| | | await commonServices.sendVerificationCode( |
| | | await authServices.sendLoginOrRegisterVerifyCode( |
| | | { |
| | | phoneNumber: form.phoneNumber, |
| | | businessType: VerificationCodeBusinessType.PhoneMesssageCodeLogin, |
| | | }, |
| | | { showLoading: false } |
| | | ); |
| | |
| | | form.loading = true; |
| | | await userStore.loginByUsername({ |
| | | phoneNumber: form.phoneNumber, |
| | | code: form.verificationCode, |
| | | verifyCode: form.verificationCode, |
| | | }); |
| | | jump(); |
| | | } |
| | |
| | | <script setup lang="ts"> |
| | | import LoginPageLayout from '../components/LoginPageLayout/LoginPageLayout.vue'; |
| | | import { Policy } from '@/components'; |
| | | import * as commonServices from '@12333/services/api/Common'; |
| | | import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; |
| | | import { FormValidator, Message } from '@12333/utils'; |
| | | import { LargeButton } from '@/components'; |
| | |
| | | import { VerificationCodeBusinessType } from '@12333/constants'; |
| | | import Taro from '@tarojs/taro'; |
| | | import { ResponseCode } from '@12333/constants'; |
| | | import * as accountServices from '@12333/services/api/Account'; |
| | | import * as authServices from '@12333/services/apiV2/auth'; |
| | | |
| | | defineOptions({ |
| | | name: 'registerForm', |
| | |
| | | }); |
| | | |
| | | async function onGetCaptcha() { |
| | | await commonServices.sendVerificationCode( |
| | | await authServices.sendLoginOrRegisterVerifyCode( |
| | | { |
| | | phoneNumber: form.phoneNumber, |
| | | businessType: VerificationCodeBusinessType.PhoneMesssageCodeRegister, |
| | | }, |
| | | { |
| | | showLoading: false, |
| | | customErrorHandler(error) { |
| | | if (error?.response?.data?.error?.code === ResponseCode.RegisterExistsPhoneNumber) { |
| | | Message.confirm({ |
| | | message: '该手机号已注册,请去登录页登录', |
| | | confirmText: '去登录', |
| | | }).then(() => { |
| | | goLogin(); |
| | | }); |
| | | return true; |
| | | } |
| | | }, |
| | | // customErrorHandler(error) { |
| | | // if (error?.response?.data?.error?.code === ResponseCode.RegisterExistsPhoneNumber) { |
| | | // Message.confirm({ |
| | | // message: '该手机号已注册,请去登录页登录', |
| | | // confirmText: '去登录', |
| | | // }).then(() => { |
| | | // goLogin(); |
| | | // }); |
| | | // return true; |
| | | // } |
| | | // }, |
| | | } |
| | | ); |
| | | } |
| | |
| | | <div class="taskDetail-company-info-text">已认证 | {{ taskCount }}个岗位在招</div> |
| | | </div> |
| | | <div class="taskDetail-company-info" v-else> |
| | | <div class="taskDetail-company-info-text danger">未认证</div> |
| | | <div class="taskDetail-company-info-text"> |
| | | <span class="danger">未认证</span> | {{ taskCount }}个岗位在招 |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | min-width: 0; |
| | | @include ellipsis; |
| | | |
| | | &.danger { |
| | | .danger { |
| | | color: boleGetCssVar('color', 'danger'); |
| | | display: inline; |
| | | } |
| | | } |
| | | } |
| | |
| | | const userStore = useUserStoreWithOut(); |
| | | |
| | | if (response.headers['x-access-token']) { |
| | | const tokenInfo: API.PasswordLoginCommandCallback = { |
| | | const tokenInfo: API.LoginCommandCallback = { |
| | | accessToken: response.headers['access-token'], |
| | | refreshToken: response.headers['x-access-token'], |
| | | }; |
| | |
| | | } |
| | | |
| | | export function getUserInfo() { |
| | | return storageLocal.getItem<API.PasswordLoginCommandCallback>(StorageKey.USER_INFO_KEY); |
| | | return storageLocal.getItem<API.LoginCommandCallback>(StorageKey.USER_INFO_KEY); |
| | | } |
| | | |
| | | export function setUserInfo(userInfo: API.PasswordLoginCommandCallback) { |
| | | export function setUserInfo(userInfo: API.LoginCommandCallback) { |
| | | return storageLocal.setItem(StorageKey.USER_INFO_KEY, userInfo); |
| | | } |
| | | |
New file |
| | |
| | | /* eslint-disable */ |
| | | // @ts-ignore |
| | | import { request } from '@/utils/request'; |
| | | |
| | | /** 删除用户简历-资格证书 DELETE /api/user/userResume/deleteUserResumeCredential */ |
| | | export async function deleteUserResumeCredential( |
| | | body: API.DeleteUserResumeCredentialCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/user/userResume/deleteUserResumeCredential', { |
| | | method: 'DELETE', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 查询用户简历 GET /api/user/userResume/getUserResume */ |
| | | export async function getUserResume( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetUserResumeParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.GetUserResumeQueryResult>('/api/user/userResume/getUserResume', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 查询用户简历-资格证书 GET /api/user/userResume/getUserResumeCredential */ |
| | | export async function getUserResumeCredential( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetUserResumeCredentialParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.GetUserResumeCredentialQueryResult>( |
| | | '/api/user/userResume/getUserResumeCredential', |
| | | { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | } |
| | | ); |
| | | } |
| | | |
| | | /** 查询用户简历-资格证书列表 GET /api/user/userResume/getUserResumeCredentials */ |
| | | export async function getUserResumeCredentials( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetUserResumeCredentialsParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.GetUserResumeCredentialsQueryResultItem[]>( |
| | | '/api/user/userResume/getUserResumeCredentials', |
| | | { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | request: undefined, |
| | | ...params['request'], |
| | | }, |
| | | ...(options || {}), |
| | | } |
| | | ); |
| | | } |
| | | |
| | | /** 查询用户简历-详细信息 GET /api/user/userResume/getUserResumeDetail */ |
| | | export async function getUserResumeDetail( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetUserResumeDetailParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.GetUserResumeDetailQueryResult>('/api/user/userResume/getUserResumeDetail', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | request: undefined, |
| | | ...params['request'], |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 查询用户简历-求职意向 GET /api/user/userResume/getUserResumeJobSeeking */ |
| | | export async function getUserResumeJobSeeking( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetUserResumeJobSeekingParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.GetUserResumeJobSeekingQueryResult>( |
| | | '/api/user/userResume/getUserResumeJobSeeking', |
| | | { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | request: undefined, |
| | | ...params['request'], |
| | | }, |
| | | ...(options || {}), |
| | | } |
| | | ); |
| | | } |
| | | |
| | | /** 查询用户简历-个人信息 GET /api/user/userResume/getUserResumePersonal */ |
| | | export async function getUserResumePersonal( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetUserResumePersonalParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.GetUserResumePersonalQueryResult>( |
| | | '/api/user/userResume/getUserResumePersonal', |
| | | { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | request: undefined, |
| | | ...params['request'], |
| | | }, |
| | | ...(options || {}), |
| | | } |
| | | ); |
| | | } |
| | | |
| | | /** 查询用户简历-工作经验 GET /api/user/userResume/getUserResumeWorkExperience */ |
| | | export async function getUserResumeWorkExperience( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetUserResumeWorkExperienceParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.GetUserResumeWorkExperienceQueryResult>( |
| | | '/api/user/userResume/getUserResumeWorkExperience', |
| | | { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | request: undefined, |
| | | ...params['request'], |
| | | }, |
| | | ...(options || {}), |
| | | } |
| | | ); |
| | | } |
| | | |
| | | /** 保存用户简历-资格证书 POST /api/user/userResume/saveUserResumeCredential */ |
| | | export async function saveUserResumeCredential( |
| | | body: API.SaveUserResumeCredentialCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/user/userResume/saveUserResumeCredential', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 保存用户简历-详细信息 POST /api/user/userResume/saveUserResumeDetail */ |
| | | export async function saveUserResumeDetail( |
| | | body: API.SaveUserResumeDetailCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/user/userResume/saveUserResumeDetail', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 保存用户简历-求职意向 POST /api/user/userResume/saveUserResumeJobSeeking */ |
| | | export async function saveUserResumeJobSeeking( |
| | | body: API.SaveUserResumeJobSeekingCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/user/userResume/saveUserResumeJobSeeking', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 保存用户简历-个人信息 POST /api/user/userResume/saveUserResumePersonal */ |
| | | export async function saveUserResumePersonal( |
| | | body: API.SaveUserResumePersonalCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/user/userResume/saveUserResumePersonal', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 保存用户简历-工作经验 POST /api/user/userResume/saveUserResumeWorkExperience */ |
| | | export async function saveUserResumeWorkExperience( |
| | | body: API.SaveUserResumeWorkExperienceCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/user/userResume/saveUserResumeWorkExperience', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | |
| | | showLoading?: boolean; |
| | | mock?: boolean; |
| | | customErrorHandler?: (error: any) => boolean; |
| | | /** |
| | | * 是否获取原始的AxiosResponse |
| | | */ |
| | | getResponse?: boolean; |
| | | /** |
| | | * 跳过默认错误处理 |
| | | */ |
| | | skipErrorHandler?: boolean; |
| | | } |
| | | |
| | | interface MyCertificationAuditDto { |