wupengfei
5 天以前 037fb36aaf4123ef143ac48038a0b171418a20e5
Merge branch 'master' of http://120.26.58.240:8888/r/flexJobMiniApp
1个文件已添加
14个文件已修改
351 ■■■■ 已修改文件
apps/bMiniApp/project.config.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/bMiniApp/src/stores/modules/user.ts 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/bMiniApp/src/subpackages/login/loginByForm/verificationCodeLoginForm.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/bMiniApp/src/subpackages/login/registerForm/registerForm.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/bMiniApp/src/utils/request/index.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/bMiniApp/src/utils/storage/auth.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/cMiniApp/src/constants/app.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/cMiniApp/src/stores/modules/user.ts 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/cMiniApp/src/subpackages/login/loginByForm/verificationCodeLoginForm.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/cMiniApp/src/subpackages/login/registerForm/registerForm.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/cMiniApp/src/subpackages/task/components/CompanyDesc.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/cMiniApp/src/utils/request/index.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/cMiniApp/src/utils/storage/auth.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/services/apiV2/userResume.ts 223 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
types/api.d.ts 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/bMiniApp/project.config.json
@@ -51,6 +51,6 @@
        "ignore": [],
        "include": []
    },
    "appid": "wxb9e0baf4f87aa0de",
    "appid": "wx3669dd12a0915f7d",
    "projectname": "bMiniApp"
}
apps/bMiniApp/src/stores/modules/user.ts
@@ -31,7 +31,7 @@
import { AppLocalConfig } from '@/constants';
interface UserState {
  userInfo?: Nullable<API.PasswordLoginCommandCallback>;
  userInfo?: Nullable<API.LoginCommandCallback>;
  token?: Nullable<string>;
  refreshToken?: Nullable<string>;
  userDetail?: Nullable<API.UserInfoV2>;
@@ -118,11 +118,13 @@
    },
    // 用户手机验证码登入
    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 }
      );
apps/bMiniApp/src/subpackages/login/loginByForm/verificationCodeLoginForm.vue
@@ -32,7 +32,6 @@
</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';
@@ -41,6 +40,7 @@
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',
@@ -73,10 +73,9 @@
});
async function onGetCaptcha() {
  await commonServices.sendVerificationCode(
  await authServices.sendLoginOrRegisterVerifyCode(
    {
      phoneNumber: form.phoneNumber,
      businessType: VerificationCodeBusinessType.PhoneMesssageCodeLogin,
    },
    { showLoading: false }
  );
@@ -90,7 +89,7 @@
        form.loading = true;
        await userStore.loginByUsername({
          phoneNumber: form.phoneNumber,
          code: form.verificationCode,
          verifyCode: form.verificationCode,
        });
        jump();
      }
apps/bMiniApp/src/subpackages/login/registerForm/registerForm.vue
@@ -54,7 +54,6 @@
<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';
@@ -62,7 +61,7 @@
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',
@@ -89,24 +88,23 @@
});
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;
      //   }
      // },
    }
  );
}
apps/bMiniApp/src/utils/request/index.ts
@@ -220,7 +220,7 @@
        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'],
          };
apps/bMiniApp/src/utils/storage/auth.ts
@@ -17,10 +17,10 @@
}
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);
}
apps/cMiniApp/src/constants/app.ts
@@ -1,6 +1,6 @@
import { EnumUserType, EnumClientType } from '@12333/constants';
export const AppLocalConfig = {
  userType: EnumUserType.Enterprise,
  userType: EnumUserType.Personal,
  clientType: EnumClientType.PcWeb,
};
apps/cMiniApp/src/stores/modules/user.ts
@@ -31,7 +31,7 @@
import { AppLocalConfig } from '@/constants';
interface UserState {
  userInfo?: Nullable<API.PasswordLoginCommandCallback>;
  userInfo?: Nullable<API.LoginCommandCallback>;
  token?: Nullable<string>;
  refreshToken?: Nullable<string>;
  userDetail?: Nullable<API.UserInfoV2>;
@@ -114,11 +114,13 @@
    },
    // 用户手机验证码登入
    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 }
      );
@@ -146,7 +148,7 @@
      return res;
    },
    async loginSuccess(res: API.PasswordLoginCommandCallback) {
    async loginSuccess(res: API.LoginCommandCallback) {
      try {
        this.setUserInfoAction(res);
        this.setTokenAction(res);
@@ -201,12 +203,12 @@
      } 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);
    },
apps/cMiniApp/src/subpackages/login/loginByForm/verificationCodeLoginForm.vue
@@ -32,15 +32,14 @@
</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',
@@ -73,10 +72,9 @@
});
async function onGetCaptcha() {
  await commonServices.sendVerificationCode(
  await authServices.sendLoginOrRegisterVerifyCode(
    {
      phoneNumber: form.phoneNumber,
      businessType: VerificationCodeBusinessType.PhoneMesssageCodeLogin,
    },
    { showLoading: false }
  );
@@ -90,7 +88,7 @@
        form.loading = true;
        await userStore.loginByUsername({
          phoneNumber: form.phoneNumber,
          code: form.verificationCode,
          verifyCode: form.verificationCode,
        });
        jump();
      }
apps/cMiniApp/src/subpackages/login/registerForm/registerForm.vue
@@ -54,7 +54,6 @@
<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';
@@ -62,7 +61,7 @@
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',
@@ -89,24 +88,23 @@
});
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;
      //   }
      // },
    }
  );
}
apps/cMiniApp/src/subpackages/task/components/CompanyDesc.vue
@@ -9,7 +9,9 @@
      <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>
@@ -85,8 +87,9 @@
      min-width: 0;
      @include ellipsis;
      &.danger {
      .danger {
        color: boleGetCssVar('color', 'danger');
        display: inline;
      }
    }
  }
apps/cMiniApp/src/utils/request/index.ts
@@ -220,7 +220,7 @@
        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'],
          };
apps/cMiniApp/src/utils/storage/auth.ts
@@ -17,10 +17,10 @@
}
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);
}
packages/services/apiV2/userResume.ts
New file
@@ -0,0 +1,223 @@
/* 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 || {}),
  });
}
types/api.d.ts
@@ -4,6 +4,14 @@
    showLoading?: boolean;
    mock?: boolean;
    customErrorHandler?: (error: any) => boolean;
    /**
     * 是否获取原始的AxiosResponse
     */
    getResponse?: boolean;
    /**
     * 跳过默认错误处理
     */
    skipErrorHandler?: boolean;
  }
  interface MyCertificationAuditDto {