Quellcode durchsuchen

Merge branch 'dev' of https://git.citupro.com/zhengnaiwen_citu/menduner into dev

Xiao_123 vor 7 Monaten
Ursprung
Commit
94d92b079a

+ 3 - 3
src/views/login/components/passwordPage.vue

@@ -1,6 +1,6 @@
 <template>
   <v-form ref="passwordForm" @submit.prevent>
-    <v-text-field v-model="loginData.phone" :disabled="props.phoneDisabled" :placeholder="placeholder ? placeholder : '请输入手机号码(企业请输入邮箱登录)'" color="primary" 
+    <v-text-field v-model="loginData.phone" :disabled="props.phoneDisabled" :placeholder="placeholder ? placeholder : '请输入手机号码'" color="primary" 
     variant="outlined" density="compact" :rules="phoneRules" validate-on="input" prepend-inner-icon="mdi-cellphone" >
       <!-- <template v-slot:prepend-inner>
         <span class="d-flex">
@@ -47,7 +47,7 @@ const emits = defineEmits(['handleEnter'])
 const phoneRules = ref([
   value => {
     if (value) return true
-    return props.placeholder ? props.placeholder : '请输入手机号码或邮箱'
+    return props.placeholder ? props.placeholder : '请输入手机号码'
   }
 ])
 
@@ -78,7 +78,7 @@ const loginData = reactive({
 
 // 设置默认账号密码便于开发快捷登录
 if (window.location.hostname === 'localhost' || window.location.hostname === '192.168.3.152') {
-  loginData.phone = '13229740092'
+  loginData.phone = props.validEmail ? '1687284007@qq.com' : '13229740092'
   loginData.password = 'Citu123456'
 }
 

+ 45 - 9
src/views/login/index.vue

@@ -5,8 +5,17 @@
       <!-- <div class="text-end pr-5 pt-5">
         <span class="color-error cursor-pointer text-decoration-underline" @click="router.push('/register/selected')">还没有登录账户?去注册</span>
       </div> -->
+      <div class="login-change" @click="handleChangeLogin">{{ isEnterpriseLogin ? '切换个人登录' : '切换企业登录' }}</div>
       <div class="login-content-box my-10">
-        <div class="login-tab">
+        <!-- 企业邮箱登录 -->
+        <div v-show="isEnterpriseLogin" class="login-tab">
+          <v-tabs v-model="tab1" align-tabs="center" color="primary" class="mb-10">
+            <v-tab :value="1">企业邮箱登录</v-tab>
+          </v-tabs>
+          <passwordFrom ref="passRef" placeholder="请输入企业邮箱" :validEmail="true" @handleEnter="handleLogin"></passwordFrom>
+        </div>
+        <!-- 个人登录 -->
+        <div v-show="!isEnterpriseLogin" class="login-tab">
           <v-tabs v-model="tab" align-tabs="center" color="primary" class="mb-10" @update:modelValue="tabChange">
             <v-tab :value="1">验证码</v-tab>
             <v-tab :value="2">账号</v-tab>
@@ -33,7 +42,7 @@
           </v-window>
         </div>
         <div class="font-size-14 tips">
-          <span class="float-left color-666 cursor-pointer" v-if="tab === 2" @click="router.push('/forgotPassword')">忘记密码</span>
+          <span class="float-left color-666 cursor-pointer" v-if="tab === 2 && !isEnterpriseLogin" @click="router.push('/forgotPassword')">忘记密码</span>
           <span class="float-right color-error cursor-pointer text-decoration-underline" @click="router.push('/register/selected')">还没有登录账户?去注册</span>
         </div>
         <v-btn :loading="loginLoading" color="primary" class="white--text mt-5" min-width="350" @click="handleLogin">
@@ -51,7 +60,7 @@
 
 <script setup>
 defineOptions({ name: 'login-index' })
-import { ref } from 'vue'
+import { nextTick, ref } from 'vue'
 import passwordFrom from './components/passwordPage.vue'
 import phoneFrom from '@/components/VerificationCode'
 import { useUserStore } from '@/store/user'
@@ -68,6 +77,15 @@ import navBar from '@/layout/personal/navBar.vue'
 const { t } = useI18n()
 const router = useRouter()
 const tab = ref(1)
+const tab1 = ref(1)
+const isEnterpriseLogin = ref(false)
+
+const handleChangeLogin = () => {
+  isEnterpriseLogin.value = !isEnterpriseLogin.value
+  nextTick(() => {
+    tab.value = isEnterpriseLogin.value ? 2 : 1 // 为了验证邮箱validate
+  })
+}
 
 // 验证码登录
 const phoneRef = ref()
@@ -95,9 +113,10 @@ const handleLogin = async () => {
     else { params = { ...passRef.value.loginData }; api = 'handlePasswordLogin'}
     
     // 邮箱为企业招聘, 手机号为个人求职
-    if (tab.value === 2) {
+    if (isEnterpriseLogin.value) {
       const pattern = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
       const isEnterprise = pattern.test(params.phone)
+      if (!isEnterprise) return // 选中企业登录但输入内容非邮箱
       params.isEnterprise = isEnterprise
     }
     await userStore[api](params)
@@ -139,11 +158,11 @@ const handleLogin = async () => {
 // }
 
 // const showQrCode = ref(false)
-// const tabChange = (val) => {
-//   if (val === 3) {
-//     getSocialAuthRedirect()
-//   }
-// }
+const tabChange = (val) => {
+  if (val === 3) {
+    // getSocialAuthRedirect()
+  }
+}
 
 </script>
 
@@ -159,6 +178,23 @@ const handleLogin = async () => {
   position: absolute;
   top: 0;
 }
+.login-change {
+  position: absolute;
+  top: 0;
+  right: 0;
+  padding: 15px 44px;
+  text-decoration: underline;
+  color: orange; 
+  cursor: pointer;
+  font-weight: 400;
+  &:hover {
+    text-decoration: underline;
+    color: #fbb93e; 
+  }
+  // width: 450px;
+  // background-color: #fff;
+  // border-radius: 10px;
+}
 .login-content {
   position: absolute;
   top: 50%;

+ 18 - 11
src/views/mall/purchasePackage/components/packageList.js

@@ -1,31 +1,38 @@
+const equity = ['VIP会员标识', '简历刷新次数', '简历屏蔽', '优先推荐', '简历模板', '谁看过我', '薪酬报告']
+
 export const packData =  [
   {
     title: '14天双周卡',
-    price: 88,
+    price: 128,
     type: '大众会员套餐',
-    equity: ['VIP会员标识', '简历刷新次数', '简历屏蔽']
+    equity,
+    showLength: 3
   },
   {
     title: '30天月卡',
-    price: 158,
+    price: 198,
     type: '企业基础套餐',
-    equity: ['VIP会员标识', '简历刷新次数', '简历屏蔽', '优先推荐']
+    equity,
+    showLength: 4
   },
   {
     title: '60天月卡',
-    price: 298,
+    price: 318,
     recommend: true,
-    equity: ['VIP会员标识', '简历刷新次数', '简历屏蔽', '优先推荐', '简历模板']
+    equity,
+    showLength: 5
   },
   {
-    title: '季度卡',
-    price: 588,
-    equity: ['VIP会员标识', '简历刷新次数', '简历屏蔽', '优先推荐', '简历模板', '谁看过我']
+    title: '90天月卡',
+    price: 378,
+    equity,
+    showLength: 6
   },
   {
     title: '年度卡',
-    price: 1988,
+    price: 999,
     // cycle: '6个月',
-    equity: ['VIP会员标识', '简历刷新次数', '简历屏蔽', '优先推荐', '简历模板', '谁看过我', '薪酬报告']
+    equity,
+    showLength: 7
   }
 ]

+ 4 - 1
src/views/mall/purchasePackage/components/packageList.vue

@@ -17,7 +17,7 @@
       <div v-if="val.equity">
         <div class="font-weight-bold my-3">权益</div>
         <ul>
-          <li v-for="k in val.equity" :key="k">{{ k }}</li>
+          <li v-for="(k, num) in val.equity" :key="k" :class="{'greyText': num+1 > val.showLength}">{{ k }}</li>
         </ul>
       </div>
       <div v-else>
@@ -60,6 +60,9 @@ const handleOpenMembership = (val) => {
 }
 </script>
 <style lang="scss" scoped>
+.greyText {
+  color: #774e2085 !important;
+}
 .list {
   width: 100%;
 }

+ 7 - 0
src/views/register/company.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="box" style="overflow-x: hidden;">
+    <navBar :showLoginBtn="false" class="navBar"></navBar>
     <PhonePage v-if="!valid" :isCompany="true" @success="handleValidate" :isLogin="query.login ? true : false"></PhonePage>
   </div>
 </template>
@@ -7,6 +8,7 @@
 <script setup>
 defineOptions({ name: 'registerCompany'})
 import { getUserRegisterEnterpriseApply } from '@/api/personal/user'
+import navBar from '@/layout/personal/navBar.vue'
 import { ref } from 'vue'
 import PhonePage from './person.vue'
 import { useRouter } from 'vue-router'
@@ -33,6 +35,11 @@ const handleValidate = async () => {
 </script>
 
 <style scoped lang="scss">
+.navBar {
+  position: absolute;
+  top: 0;
+  z-index: 2;
+}
 .box {
   position: relative;
   width: 100%;

+ 6 - 0
src/views/register/person.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="box">
+    <navBar :showLoginBtn="false" class="navBar"></navBar>
     <div class="content pa-10">
       <div class="content-title text-center mt-4">{{ isLogin ? '请输入您申请企业账号时填入的手机号进行效验' : '请输入手机号码进行注册认证'}}</div>
       <phoneFrom class="mt-10" ref="phoneRef" @handleEnter="handleRegister" :phone="phone"></phoneFrom>
@@ -22,6 +23,7 @@ import phoneFrom from '@/components/VerificationCode'
 import { useUserStore } from '@/store/user'
 import Snackbar from '@/plugins/snackbar'
 import { checkEmail } from '@/utils/validate'
+import navBar from '@/layout/personal/navBar.vue'
 
 const emit = defineEmits(['success'])
 const props = defineProps({
@@ -65,6 +67,10 @@ const handleRegister = async () => {
 </script>
 
 <style scoped lang="scss">
+.navBar {
+  position: absolute;
+  top: 0;
+}
 .box {
   position: relative;
   width: 100%;

+ 6 - 0
src/views/register/select.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="register-box">
+    <navBar :showLoginBtn="false" class="navBar"></navBar>
     <div class="register-content">
       <h2 style="color: #666; font-weight: 400;">请选择您当前注册的身份</h2>
       <div class="d-flex mt-16">
@@ -17,6 +18,7 @@
 </template>
 
 <script setup>
+import navBar from '@/layout/personal/navBar.vue'
 defineOptions({ name: 'register-select'})
 import { useRouter } from 'vue-router'
 
@@ -51,4 +53,8 @@ const handleToRegister = (path) => {
   color: #00897B;
   text-decoration: underline;
 }
+.navBar {
+  position: absolute;
+  top: 0;
+}
 </style>