Merge branch 'master' of http://120.26.58.240:8888/r/flexJobMiniApp
| | |
| | | "lodash": "^4.17.21", |
| | | "pinia": "^2.1.6", |
| | | "qs": "^6.11.1", |
| | | "senin-mini": "^1.0.10", |
| | | "senin-mini": "^1.0.12", |
| | | "senior-request": "^1.0.3", |
| | | "taro-plugin-pinia": "^1.0.0", |
| | | "vconsole": "^3.15.1", |
| | |
| | | "description": "", |
| | | "setting": { |
| | | "urlCheck": false, |
| | | "es6": false, |
| | | "enhance": false, |
| | | "es6": true, |
| | | "enhance": true, |
| | | "postcss": false, |
| | | "preloadBackgroundData": false, |
| | | "minified": false, |
| | |
| | | getUserDetail, |
| | | removeUserDetail, |
| | | } from '@/utils/storage/auth'; |
| | | import * as accountServices from '@12333/services/api/Account'; |
| | | // import * as userServices from '@12333/services/api/User'; |
| | | import Taro, { useRouter } from '@tarojs/taro'; |
| | | import { ButtonProps } from '@tarojs/components'; |
| | | import { debounce } from 'lodash'; |
| | |
| | | md5Encrypt, |
| | | } from '@12333/utils'; |
| | | import DefaultAvatar from '@/assets/components/icon-default-avatar.png'; |
| | | import { WxMiniAppEnum } from '@12333/constants'; |
| | | import { myClient } from '@/constants/query'; |
| | | import { globalEventEmitter } from '@12333/hooks'; |
| | | import * as authServices from '@12333/services/apiV2/auth'; |
| | |
| | | // 手机号授权Code登录 |
| | | async getTokenByPhone( |
| | | detail: ButtonProps.onGetPhoneNumberEventDetail, |
| | | wxMiniAppUserLoginRes: any |
| | | wxMiniAppUserLoginRes: API.LoginCommandCallback |
| | | ) { |
| | | try { |
| | | let res: API.IdentityModelTokenCacheItem; |
| | | if (!wxMiniAppUserLoginRes.accessToken) { |
| | | let params: API.WxMiniAppPhoneLoginInput = { |
| | | openId: wxMiniAppUserLoginRes.openId, |
| | | sessionKey: wxMiniAppUserLoginRes.sessionKey, |
| | | let res: API.LoginCommandCallback = wxMiniAppUserLoginRes; |
| | | if (!wxMiniAppUserLoginRes.isBindPhoneNumber) { |
| | | let bindRes = await authServices.bindWxmpUserInfo({ |
| | | encryptedData: detail.encryptedData, |
| | | iv: detail.iv, |
| | | wxMiniApp: WxMiniAppEnum.C端小程序, |
| | | }; |
| | | res = await accountServices.wxMiniAppPhoneAuthLogin(params); |
| | | this.loginSuccess(res); |
| | | sessionKey: wxMiniAppUserLoginRes.sessionKey, |
| | | }); |
| | | res.accessToken = bindRes.accessToken; |
| | | } |
| | | this.loginSuccess(res); |
| | | return res; |
| | | } catch (error) { |
| | | console.log('error3: ', error); |
| | |
| | | }, |
| | | |
| | | async wxMiniAppUserLoginFromScan(wxIndentityRes: API.WxMiniAppIndentityInfo, uuid: string) { |
| | | try { |
| | | let res = await accountServices.wxMiniAppUserLoginFromScan({ |
| | | uId: uuid, |
| | | userName: wxIndentityRes.userName, |
| | | openId: wxIndentityRes.openId, |
| | | }); |
| | | this.loginSuccess(res); |
| | | return res; |
| | | } catch (error) {} |
| | | // try { |
| | | // let res = await accountServices.wxMiniAppUserLoginFromScan({ |
| | | // uId: uuid, |
| | | // userName: wxIndentityRes.userName, |
| | | // openId: wxIndentityRes.openId, |
| | | // }); |
| | | // this.loginSuccess(res); |
| | | // return res; |
| | | // } catch (error) {} |
| | | }, |
| | | |
| | | async wxMiniAppPhoneAuthLoginFromScan( |
| | |
| | | wxIndentityRes: API.WxMiniAppIndentityInfo, |
| | | uuid: string |
| | | ) { |
| | | try { |
| | | let res = await accountServices.wxMiniAppPhoneAuthLoginFromScan({ |
| | | uId: uuid, |
| | | openId: wxIndentityRes.openId, |
| | | sessionKey: wxIndentityRes.sessionKey, |
| | | encryptedData: detail.encryptedData, |
| | | iv: detail.iv, |
| | | wxMiniApp: WxMiniAppEnum.C端小程序, |
| | | }); |
| | | this.loginSuccess(res); |
| | | return res; |
| | | } catch (error) {} |
| | | // try { |
| | | // let res = await accountServices.wxMiniAppPhoneAuthLoginFromScan({ |
| | | // uId: uuid, |
| | | // openId: wxIndentityRes.openId, |
| | | // sessionKey: wxIndentityRes.sessionKey, |
| | | // encryptedData: detail.encryptedData, |
| | | // iv: detail.iv, |
| | | // wxMiniApp: WxMiniAppEnum.C端小程序, |
| | | // }); |
| | | // this.loginSuccess(res); |
| | | // return res; |
| | | // } catch (error) {} |
| | | }, |
| | | |
| | | // async getCurrentUserInfo() { |
| | |
| | | import { CommonEventFunction, ButtonProps } from '@tarojs/components'; |
| | | import Taro from '@tarojs/taro'; |
| | | import { useLoginedJump } from '@/hooks'; |
| | | import * as accountServices from '@12333/services/api/Account'; |
| | | import IconCaptcha from '@/assets/login/icon-btn-captcha.png'; |
| | | import IconPassword from '@/assets/login/icon-btn-password.png'; |
| | | import { LoginFormTabs } from '../constants'; |
| | | import { WxMiniAppEnum } from '@12333/constants'; |
| | | import * as authServices from '@12333/services/apiV2/auth'; |
| | | |
| | | defineOptions({ |
| | | name: 'authorization', |
| | |
| | | RouterPath.authorization.includes(launchOptions.path) && launchOptions.scene === 1047 && uuid |
| | | ); |
| | | |
| | | const wxIndentityRes = ref<API.WxMiniAppIndentityInfo>(); |
| | | const wxMiniAppUserLoginRes = ref<API.IdentityModelTokenCacheItem>(); |
| | | const wxIndentityRes = ref<API.LoginCommandCallback>(); |
| | | const wxMiniAppUserLoginRes = ref<API.LoginCommandCallback>(); |
| | | |
| | | const isAccount = ref(false); |
| | | |
| | |
| | | try { |
| | | let loginRes = await Taro.login(); |
| | | if (isLoginByWeb.value) { |
| | | const wxIndentity = await accountServices.getWxIndentity({ |
| | | code: loginRes.code, |
| | | wxMiniApp: WxMiniAppEnum.C端小程序, |
| | | }); |
| | | wxIndentityRes.value = wxIndentity; |
| | | if (wxIndentityRes.value.userName) { |
| | | isAccount.value = true; |
| | | } |
| | | // const wxIndentity = await authServices.wxmpLogin({ |
| | | // code: loginRes.code, |
| | | // type: AppLocalConfig.userType, |
| | | // }); |
| | | // wxIndentityRes.value = wxIndentity; |
| | | // if (wxIndentityRes.value.isBindPhoneNumber) { |
| | | // isAccount.value = true; |
| | | // } |
| | | } else { |
| | | const params: API.APIwxMiniAppUserLoginParams = { |
| | | const params: API.WxmpLoginCommand = { |
| | | code: loginRes.code, |
| | | wxMiniApp: WxMiniAppEnum.C端小程序, |
| | | type: AppLocalConfig.userType, |
| | | }; |
| | | wxMiniAppUserLoginRes.value = await accountServices.wxMiniAppUserLogin(params); |
| | | if (wxMiniAppUserLoginRes.value.accessToken) { |
| | | wxMiniAppUserLoginRes.value = await authServices.wxmpLogin(params); |
| | | if (wxMiniAppUserLoginRes.value.isBindPhoneNumber) { |
| | | isAccount.value = true; |
| | | } |
| | | } |
| | |
| | | console.log('errMsg: ', errMsg, isLoginByWeb.value); |
| | | if (errMsg === 'getPhoneNumber:ok') { |
| | | if (isLoginByWeb.value) { |
| | | let res = await userStore.wxMiniAppPhoneAuthLoginFromScan( |
| | | ev.detail, |
| | | wxIndentityRes.value, |
| | | uuid |
| | | ); |
| | | if (res) { |
| | | handleLoginSuccess(); |
| | | } |
| | | // let res = await userStore.wxMiniAppPhoneAuthLoginFromScan( |
| | | // ev.detail, |
| | | // wxIndentityRes.value, |
| | | // uuid |
| | | // ); |
| | | // if (res) { |
| | | // handleLoginSuccess(); |
| | | // } |
| | | } else { |
| | | let res = await userStore.getTokenByPhone(ev.detail, wxMiniAppUserLoginRes.value); |
| | | if (res) { |
| | |
| | | if (state.policyChecked) { |
| | | if (isLoginByWeb.value) { |
| | | console.log('uuid: ', uuid); |
| | | let res = await userStore.wxMiniAppUserLoginFromScan(wxIndentityRes.value, uuid); |
| | | if (res) { |
| | | handleLoginSuccess(); |
| | | } |
| | | // let res = await userStore.wxMiniAppUserLoginFromScan(wxIndentityRes.value, uuid); |
| | | // if (res) { |
| | | // handleLoginSuccess(); |
| | | // } |
| | | } else { |
| | | userStore.loginSuccess(wxMiniAppUserLoginRes.value); |
| | | handleLoginSuccess(); |
| | |
| | | <img :src="OssAssets.login.AuthBg" class="authorization-page-auth" /> |
| | | </template> |
| | | |
| | | <div class="authorization-page-title">欢迎使用818平台</div> |
| | | <div class="authorization-page-title">欢迎使用工益赚</div> |
| | | |
| | | <slot></slot> |
| | | </PageLayout> |
| | |
| | | "lodash": "^4.17.21", |
| | | "pinia": "^2.1.6", |
| | | "qs": "^6.11.1", |
| | | "senin-mini": "^1.0.10", |
| | | "senin-mini": "^1.0.12", |
| | | "senior-request": "^1.0.3", |
| | | "taro-plugin-pinia": "^1.0.0", |
| | | "vconsole": "^3.15.1", |
| | |
| | | "miniprogram": { |
| | | "list": [ |
| | | { |
| | | "name": "我的简历", |
| | | "pathName": "subpackages/curriculum/mineCurriculumVitae/mineCurriculumVitae", |
| | | "query": "", |
| | | "launchMode": "default", |
| | | "scene": null |
| | | }, |
| | | { |
| | | "name": "公司详情", |
| | | "pathName": "subpackages/task/companyDetail/companyDetail", |
| | | "query": "id=f775538f-985c-4d51-7985-08ddd5c71bbf", |
| | |
| | | getUserDetail, |
| | | removeUserDetail, |
| | | } from '@/utils/storage/auth'; |
| | | import * as accountServices from '@12333/services/api/Account'; |
| | | import * as userServices from '@12333/services/api/User'; |
| | | import Taro, { useRouter } from '@tarojs/taro'; |
| | | import { ButtonProps } from '@tarojs/components'; |
| | | import { debounce } from 'lodash'; |
| | |
| | | md5Encrypt, |
| | | } from '@12333/utils'; |
| | | import DefaultAvatar from '@/assets/components/icon-default-avatar.png'; |
| | | import { WxMiniAppEnum } from '@12333/constants'; |
| | | import { myClient } from '@/constants/query'; |
| | | import { globalEventEmitter } from '@12333/hooks'; |
| | | import * as authServices from '@12333/services/apiV2/auth'; |
| | |
| | | }, |
| | | |
| | | async wxMiniAppUserLoginFromScan(wxIndentityRes: API.WxMiniAppIndentityInfo, uuid: string) { |
| | | try { |
| | | let res = await accountServices.wxMiniAppUserLoginFromScan({ |
| | | uId: uuid, |
| | | userName: wxIndentityRes.userName, |
| | | openId: wxIndentityRes.openId, |
| | | }); |
| | | this.loginSuccess(res); |
| | | return res; |
| | | } catch (error) {} |
| | | // try { |
| | | // let res = await accountServices.wxMiniAppUserLoginFromScan({ |
| | | // uId: uuid, |
| | | // userName: wxIndentityRes.userName, |
| | | // openId: wxIndentityRes.openId, |
| | | // }); |
| | | // this.loginSuccess(res); |
| | | // return res; |
| | | // } catch (error) {} |
| | | }, |
| | | |
| | | async wxMiniAppPhoneAuthLoginFromScan( |
| | |
| | | wxIndentityRes: API.WxMiniAppIndentityInfo, |
| | | uuid: string |
| | | ) { |
| | | try { |
| | | let res = await accountServices.wxMiniAppPhoneAuthLoginFromScan({ |
| | | uId: uuid, |
| | | openId: wxIndentityRes.openId, |
| | | sessionKey: wxIndentityRes.sessionKey, |
| | | encryptedData: detail.encryptedData, |
| | | iv: detail.iv, |
| | | wxMiniApp: WxMiniAppEnum.C端小程序, |
| | | }); |
| | | this.loginSuccess(res); |
| | | return res; |
| | | } catch (error) {} |
| | | // try { |
| | | // let res = await accountServices.wxMiniAppPhoneAuthLoginFromScan({ |
| | | // uId: uuid, |
| | | // openId: wxIndentityRes.openId, |
| | | // sessionKey: wxIndentityRes.sessionKey, |
| | | // encryptedData: detail.encryptedData, |
| | | // iv: detail.iv, |
| | | // wxMiniApp: WxMiniAppEnum.C端小程序, |
| | | // }); |
| | | // this.loginSuccess(res); |
| | | // return res; |
| | | // } catch (error) {} |
| | | }, |
| | | |
| | | async getCurrentUserInfo() { |
| | |
| | | }, |
| | | |
| | | setUserInfoAction(info: API.LoginCommandCallback) { |
| | | this.userInfo = info; |
| | | setUserInfo(info); |
| | | this.userInfo = { |
| | | ...this.userInfo, |
| | | ...info, |
| | | }; |
| | | setUserInfo(this.userInfo); |
| | | }, |
| | | |
| | | setUserDetail(detail: API.UserInfoV2) { |
| | |
| | | <template> |
| | | <ContentView> |
| | | <nut-noticebar |
| | | :text="`个人简历已完善${userResumeInfo?.completeRate ?? 0},完善简历可提升录用率`" |
| | | :text="`个人简历已完善${userResumeInfo?.completeRate ?? 0}%,完善简历可提升录用率`" |
| | | :left-icon="false" |
| | | background="transparent" |
| | | close-mode |
| | |
| | | } |
| | | }); |
| | | |
| | | const { userResumeInfo, refetch } = useUserResume(); |
| | | |
| | | const jobTag = computed( |
| | | () => userResumeInfo?.value?.userExpectJobs?.map((x) => x.expectJobContent) ?? [] |
| | | ); |
| | | |
| | | const { userResumeInfo, refetch } = useUserResume(); |
| | | |
| | | function goPage(routeName: string) { |
| | | Taro.navigateTo({ |
| | |
| | | UserCertificationBankCardCertification = 910, |
| | | } |
| | | |
| | | export enum WxMiniAppEnum { |
| | | /** |
| | | * C端小程序 |
| | | */ |
| | | C端小程序 = 10, |
| | | /** |
| | | * 人单合一小程序 |
| | | */ |
| | | 人单合一 = 20, |
| | | } |
| | | |
| | | /** |
| | | * @description AuthType即将作废 现在用EnterpriseType 目前两个值相同 |
| | | */ |
| | |
| | | specifier: ^6.11.1 |
| | | version: 6.11.1 |
| | | senin-mini: |
| | | specifier: ^1.0.10 |
| | | version: 1.0.10(@nutui/icons-vue-taro@0.0.9)(@nutui/nutui-taro@4.3.13)(@tanstack/vue-query@4.35.3)(@tarojs/components@3.6.20)(@tarojs/taro@3.6.20)(axios@1.4.0)(dayjs@1.11.6)(lodash@4.17.21)(vue@3.5.12) |
| | | specifier: ^1.0.12 |
| | | version: 1.0.12(@nutui/icons-vue-taro@0.0.9)(@nutui/nutui-taro@4.3.13)(@tanstack/vue-query@4.35.3)(@tarojs/components@3.6.20)(@tarojs/taro@3.6.20)(axios@1.4.0)(dayjs@1.11.6)(lodash@4.17.21)(vue@3.5.12) |
| | | senior-request: |
| | | specifier: ^1.0.3 |
| | | version: 1.0.3(axios@1.4.0) |
| | |
| | | specifier: ^6.11.1 |
| | | version: 6.11.1 |
| | | senin-mini: |
| | | specifier: ^1.0.10 |
| | | version: 1.0.10(@nutui/icons-vue-taro@0.0.9)(@nutui/nutui-taro@4.3.13)(@tanstack/vue-query@4.35.3)(@tarojs/components@3.6.20)(@tarojs/taro@3.6.20)(axios@1.4.0)(dayjs@1.11.6)(lodash@4.17.21)(vue@3.5.12) |
| | | specifier: ^1.0.12 |
| | | version: 1.0.12(@nutui/icons-vue-taro@0.0.9)(@nutui/nutui-taro@4.3.13)(@tanstack/vue-query@4.35.3)(@tarojs/components@3.6.20)(@tarojs/taro@3.6.20)(axios@1.4.0)(dayjs@1.11.6)(lodash@4.17.21)(vue@3.5.12) |
| | | senior-request: |
| | | specifier: ^1.0.3 |
| | | version: 1.0.3(axios@1.4.0) |
| | |
| | | - supports-color |
| | | dev: true |
| | | |
| | | /senin-mini@1.0.10(@nutui/icons-vue-taro@0.0.9)(@nutui/nutui-taro@4.3.13)(@tanstack/vue-query@4.35.3)(@tarojs/components@3.6.20)(@tarojs/taro@3.6.20)(axios@1.4.0)(dayjs@1.11.6)(lodash@4.17.21)(vue@3.5.12): |
| | | resolution: {integrity: sha512-iGA/p2p1EWU/4R9nmPBkj09wFoBupVaxJReFNRdHovydU4qt0OR3x5pLqI2TGsg+Bn2rvgp4aMCy9Ksb8rhzfw==} |
| | | /senin-mini@1.0.12(@nutui/icons-vue-taro@0.0.9)(@nutui/nutui-taro@4.3.13)(@tanstack/vue-query@4.35.3)(@tarojs/components@3.6.20)(@tarojs/taro@3.6.20)(axios@1.4.0)(dayjs@1.11.6)(lodash@4.17.21)(vue@3.5.12): |
| | | resolution: {integrity: sha512-rTRaoP+SCF75NRLuGZkBGIIQOrA38ONbMygvulgJJI+YhhW8zaNqucGO9gPHWcRkCVrhYoug4XzQlFZ7hSQdjw==} |
| | | peerDependencies: |
| | | '@nutui/icons-vue-taro': '*' |
| | | '@nutui/nutui-taro': '*' |