Explorar el Código

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

lifanagju_citu hace 8 meses
padre
commit
aa4577e5cd

+ 1 - 1
src/components/Position/item.vue

@@ -98,7 +98,7 @@ const height = ((210 * 2) + 12) + 'px'
   display: flex;
   flex-wrap: wrap;
   width: 66.66%;
-  
+  height: 100%;
 }
 .sub-li {
   position: relative;

+ 27 - 0
src/router/modules/remaining.js

@@ -14,6 +14,33 @@ const remainingRouter = [
       title: '登录/注册'
     }
   },
+  {
+    path: '/register/selected',
+    component: () => import('@/views/register/select.vue'),
+    name: 'registerSelect',
+    meta: {
+      hidden: true,
+      title: '注册'
+    }
+  },
+  {
+    path: '/register/person',
+    component: () => import('@/views/register/person.vue'),
+    name: 'personRegister',
+    meta: {
+      hidden: true,
+      title: '个人用户注册'
+    }
+  },
+  {
+    path: '/register/company',
+    component: () => import('@/views/register/company.vue'),
+    name: 'companyRegister',
+    meta: {
+      hidden: true,
+      title: '企业用户注册'
+    }
+  },
   {
     path: '/userAgreement',
     component: Layout,

+ 3 - 8
src/store/user.js

@@ -3,9 +3,7 @@ import { setToken, removeToken, setRefreshToken, getToken } from '@/utils/auth'
 import {
   smsLogin,
   passwordLogin, 
-  getBaseInfo, 
-  passwordLoginOfEnterprise, 
-  smsLoginOfEnterprise, 
+  getBaseInfo,
   switchLoginOfEnterprise, 
   getEnterprisingUserInfo, 
   logoutToken, 
@@ -28,7 +26,6 @@ import { getBaseInfoDictOfName } from '@/utils/getText'
 export const useUserStore = defineStore('user',
   {
     state: () => ({
-      loginType: localStorage.getItem('loginType'), 
       accountInfo: localStorage.getItem('accountInfo') ? JSON.parse(localStorage.getItem('accountInfo')) : {}, // 登录返回的信息
       userInfo: localStorage.getItem('userInfo') ? JSON.parse(localStorage.getItem('userInfo')) : {}, // 当前登录账号信息
       baseInfo: localStorage.getItem('baseInfo') ? JSON.parse(localStorage.getItem('baseInfo')) : {}, // 人才信息
@@ -40,8 +37,7 @@ export const useUserStore = defineStore('user',
       // 短信登录
       handleSmsLogin (data) {
         return new Promise((resolve, reject) => {
-          const loginApi = data.loginType === 330 ? smsLoginOfEnterprise : smsLogin
-          loginApi(data).then(async res => {
+          smsLogin(data).then(async res => {
             setToken(res.accessToken)
             setRefreshToken(res.refreshToken)
             this.accountInfo = res
@@ -57,9 +53,8 @@ export const useUserStore = defineStore('user',
       // 密码登录
       async handlePasswordLogin(data) {
         return new Promise((resolve, reject) => {
-          const loginApi = data.loginType === 330 ? passwordLoginOfEnterprise : passwordLogin
           data.account = data.phone
-          loginApi(data).then(res => {
+          passwordLogin(data).then(res => {
             setToken(res.accessToken)
             setRefreshToken(res.refreshToken)
             this.accountInfo = res

+ 0 - 1
src/views/common/loginDialog.vue

@@ -34,7 +34,6 @@ const phoneRef = ref()
 const loginLoading = ref(false)
 
 const handleLogin = async () => {
-  localStorage.removeItem('currentRole')
   const { valid } = await phoneRef.value.phoneForm.validate()
   if (!valid) return
   loginLoading.value = true

+ 0 - 60
src/views/headhunting copy/components/form.vue

@@ -1,60 +0,0 @@
-<template>
-  <div style="width: 100%;">
-    <CtForm ref="formPageRef" :items="items"></CtForm>
-  </div>
-</template>
-
-<script setup>
-defineOptions({name: 'headhunting-form'})
-import { reactive, ref } from 'vue'
-
-const formPageRef = ref()
-let query = reactive({})
-
-const items = ref({
-  options: [
-    {
-      type: 'text',
-      key: 'name',
-      value: '',
-      default: null,
-      label: '姓名 *',
-      outlined: true,
-      rules: [v => !!v || '请输入姓名']
-    },
-    {
-      type: 'phoneNumber',
-      key: 'phone',
-      value: '',
-      clearable: true,
-      label: '联系手机号 *',
-      rules: [v => !!v || '请填写联系手机号']
-    },
-    {
-      type: 'text',
-      key: 'enterpriseName',
-      value: '',
-      default: null,
-      label: '企业名称 *',
-      outlined: true,
-      rules: [v => !!v || '请输入企业名称']
-    },
-  ]
-})
-
-
-const getQuery = async () => {
-  const { valid } = await formPageRef.value.formRef.validate()
-  if (!valid) return false
-  const obj = {}
-  items.value.options.forEach(e => {
-    obj[e.key] = e.value
-  })
-  query = Object.assign(query, obj)
-  return query
-}
-
-defineExpose({
-  getQuery
-})
-</script>

+ 0 - 209
src/views/headhunting copy/index.vue

@@ -1,209 +0,0 @@
-<!-- 门墩儿猎寻服务 -->
-<template>
-  <div class="default-width">
-    <div class="d-flex align-center" style="position: relative;">
-      <div style="width: 150px; height: 80px;">
-        <v-img src="../../assets/logo.png"  aspect-ratio="16/9" width="150" height="80"></v-img>
-      </div>
-      <h2 class="ml-10">高端猎寻服务</h2>
-      <div class="highlight-color contact" @click="showDialog = true">联系我们</div>
-    </div>
-
-    <div class="mt-5" style="width: 100%; height: 600px;">
-      <img src="https://minio.citupro.com/dev/menduner/headhunting.jpg">
-    </div>
-
-    <div class="mt-10">
-      <h1 class="text-center highlight-color">公司简介</h1>
-      <div class="d-flex">
-        <div class="text-center" style="margin-right: 50px;">
-          <v-img width="250" height="300" aspect-ratio="16/9" src="https://minio.citupro.com/dev/menduner/ceo.jpg"></v-img>
-          <div>田森先生(Simon Tian)</div>
-        </div>
-        <div style="flex: 1;">
-          <p style="text-indent: 2em; line-height: 2em;" class="mt-5">门墩儿招聘平台(mendunerhr.com)是一家专注于酒店与泛服务业的职业发展与招聘网络平台。该平台由行业资深人士创立,
-            信息技术和大数据,为酒店业的高端人才提供职业发展服务,并为企业客户提供人才解决方案和战略建议。以下是对门墩儿招聘平台的详细介绍:</p>
-          <div class="mt-3">
-            <div v-for="(k, i) in introduce" :key="i" class="mb-5">
-              <h3 class="mb-3">{{ k.title }}</h3>
-              <ul v-for="(j, index) in k.children" :key="index">
-                <li>{{ j }}</li>
-              </ul>
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-
-    <!-- 精英猎头用门墩儿猎寻,猎寻优质人选 -->
-    <div class="my-10">
-      <h1 class="text-center highlight-color">精英猎头用门墩儿猎寻,猎寻优质人选</h1>
-      <div class="d-flex mt-3">
-        <v-img src="https://minio.citupro.com/dev/menduner/example.png" contain width="600" height="400"></v-img>
-        <div class="mt-7 ml-10" style="flex: 1">
-          <div v-for="(k, i) in list" :key="i" class="d-flex flex-column align-start mb-7">
-            <h2>{{ k.title }}</h2>
-            <div class="color-999 font-size-15 mt-3">{{ k.desc }}</div>
-          </div>
-        </div>
-      </div>
-    </div>
-
-    <!-- 成功案例 -->
-    <div>
-      <h1 class="text-center highlight-color">门墩儿的成功案例</h1>
-      <div class="mt-5">
-        <div v-for="(k, i) in successCases" :key="i" class="mb-10">
-          <div style="line-height: 2em;">
-            <span class="font-weight-bold">{{ k.title }}</span>
-            {{ k.desc }}
-          </div>
-        </div>
-      </div>
-    </div>
-
-    <!-- 和TA们一起 使用门墩儿猎寻招聘吧 -->
-    <div>
-      <h1 class="text-center highlight-color">和TA们一起 使用门墩儿猎寻招聘吧</h1>
-      <v-img src="https://minio.citupro.com/dev/menduner/ad.jpg" contain width="1184" height="300" class="img-ad"></v-img>
-    </div>
-
-    <div class="mt-10 d-flex align-center justify-space-between" style="border-top: 1px solid #ccc; height: 150px;">
-      <div>
-        <div style="width: 150px; height: 80px;">
-          <v-img src="../../assets/logo.png"  aspect-ratio="16/9" width="150" height="80"></v-img>
-        </div>
-      </div>
-      <div class="d-flex">
-        <div>
-          <v-img :width="100" cover aspect-ratio="16/9" src="https://minio.citupro.com/dev/static/mendunerCode.jpg" style="height: 100px;"></v-img>
-          <div class="mt-2" style="text-align: center;">微信公众号</div>
-        </div>
-        <div class="ml-10">
-          <v-img :width="100" cover aspect-ratio="16/9" src="https://minio.citupro.com/dev/menduner/miniProgram.jpg" style="height: 100px;"></v-img>
-          <div class="mt-2" style="text-align: center;">火苗儿小程序</div>
-        </div>
-      </div>
-    </div>
-
-    <CtDialog
-      :visible="showDialog"
-      :widthType="2"
-      titleClass="text-h6"
-      title="门墩儿猎寻服务咨询"
-      @submit="handleSubmit"
-      @close="showDialog = false"
-    >
-      <formItem ref="formRef"></formItem>
-    </CtDialog>
-  </div>
-</template>
-
-<script setup>
-import { ref } from 'vue'
-import formItem from './components/form.vue'
-import Curtain from '@/plugins/curtain'
-import { huntSubmit } from '@/api/headhunting'
-import { useI18n } from '@/hooks/web/useI18n'; const { t } = useI18n()
-defineOptions({ name: 'headhunting-index'})
-
-const list = [
-  { title: '高效猎寻人才', desc: '招聘服务:平台只能推荐+猎头顾问精准搜索,高效猎寻' },
-  { title: '拓宽猎企服务', desc: '企业服务:猎企接单+平台接单结合,提供猎头顾问收益' },
-  { title: '高效管理列企', desc: '职位管理、资源管理、数据看板一体的企业管理系统' }
-]
-
-// 公司简介
-const introduce = [
-  {
-    title: '平台背景与定位',
-    children: [
-      '创建背景:门墩儿平台具有丰富酒店从业经验的田森先生(Simon Tian)一手创办。Simon Tian凭借多年的行业经验和人脉,致力于推动酒店行业的发展,为高端人才和企业用户提供优质的社交平台与专业职场发展服务。',
-      '平台定位:门墩儿是首家面向酒店从业者、酒店雇主和业主的职业发展及招聘网络平台。它不仅服务于酒店业的经理或总监级以上人员,也支持青年英才,为他们提供定制职业规划,助力职业发展。'
-    ]
-  },
-  {
-    title: '服务内容',
-    children: [
-      '招聘服务:门墩儿积极携手酒店管理公司及业主等企业客户,通过名誉顾问委员会和导师委员会,提供人才解决方案和战略建议。平台从庞大的人才储备库中筛选最为匹配的人才,满足企业客户的招聘需求。',
-      '信息整合与发布:门墩儿通过其官方渠道(如微信公众号、网站等),将全国酒店的空缺职位、新任命、新酒店、行业观察等不同方向的信息与分散的资源与需求进行集中整合,成为从业者们了解行业动态、找寻发展机会的贴心资讯与服务平台。'
-    ]
-  },
-  {
-    title: '发展历程与成就',
-    children: [
-      '职业发展服务:门墩儿通过定制职业规划和人才筛选,为酒店行业的高端人才提供职业发展服务。平台汇聚了国内酒店业的资深人士,形成了一个高质量的社交网络,帮助从业者拓展人脉、获取行业资讯和职业发展机会。',
-      '取得成就:过去几年中,门墩儿平台已与多家酒店企业合作,助力了数千名酒店人的职业发展。同时,平台还通过线上及线下的全方位服务,全面覆盖酒店业精英人群,助力企业雇主品牌的不断提升。'
-    ]
-  },
-  {
-    title: '未来发展',
-    children: [
-      '门墩儿平台将继续秉承“酒店人服务酒店人”的理念,稳扎稳打,助力中国酒店人的职业发展。同时,平台还将不断拓展服务领域和范围,为酒店及泛服务业提供更加全面、专业的职业发展与招聘服务。在未来,门墩儿有望成为行业内领先的职业发展与招聘平台之一,为行业的持续发展贡献更多的力量。',
-    ]
-  },
-  {
-    title: '产品服务',
-    children: [
-      '通过战略布局与产品迭代,门墩儿逐渐形成多样化模式为核心,科技赋能的Saas产品矩阵。',
-    ]
-  }
-]
-
-// 成功案例
-const successCases = [
-  { title: '案例背景:', desc: '某知名科技公司(以下简称“A公司”)在快速发展的过程中,遇到了技术领军人才短缺的瓶颈。为了突破这一限制,A公司决定寻求专业的猎头服务,以快速定位并吸引行业内的顶尖技术人才。在众多猎头公司中,A公司选择了以其专业、高效和精准著称的“门墩儿猎头服务”。' },
-  { title: '需求分析:', desc: '门墩儿猎头服务的专业顾问团队首先与A公司的HR团队进行了深入的沟通,详细了解了A公司的企业文化、业务模式、技术需求以及对候选人的具体要求。通过全面的需求分析,确定了猎寻目标为具有丰富行业经验、精通前沿技术、并具备良好团队协作能力的技术总监。' },
-  { title: '市场调研:', desc: '基于需求分析的结果,门墩儿猎头服务启动了广泛的市场调研。他们利用自己强大的人才数据库、行业资源网络和先进的搜索技术,在全国范围内甚至全球范围内搜寻符合A公司要求的候选人。' },
-  { title: '候选人筛选与评估:', desc: '候选人筛选与评估:经过细致的筛选和初步评估,门墩儿猎头服务从众多候选人中挑选出了几位最具潜力的候选人。随后,他们安排了专业的面试评估流程,包括技能测试、行为面试、案例分析等环节,以全面评估候选人的综合素质和与A公司的匹配度。' },
-  { title: '推荐与谈判:', desc: '在确认了几位合适的候选人后,门墩儿猎头服务向A公司提交了详细的候选人推荐报告,并安排了候选人与A公司的直接面谈。在面谈过程中,门墩儿猎头服务的顾问团队全程陪同,提供专业的建议和支持,帮助双方更好地了解彼此。最终,A公司成功录用了其中一位技术总监' },
-  { title: '后续跟进:', desc: '在候选人入职后,门墩儿猎头服务并未停止服务。他们继续与A公司和候选人保持联系,关注候选人的工作表现和发展情况,并提供必要的支持和协助。同时,他们也定期与A公司沟通,收集反馈意见,以便不断优化和改进猎头服务。' },
-]
-
-const showDialog = ref(false)
-
-// 提交
-const formRef = ref()
-const handleSubmit = async () => {
-  try {
-    const obj = await formRef.value.getQuery()
-    if (!obj) return
-    const params = JSON.parse(JSON.stringify(obj))
-    await huntSubmit(params)
-    showDialog.value = false
-    Curtain('message', {
-      message: t('headhunting.submitSuccess'),
-      name: 'submit',
-      iconFontSize: 300
-    })
-  } catch (error) {
-    console.error('error', error)
-  }
-}
-
-</script>
-
-<style scoped lang="scss">
-.highlight-color {
-  color: #007eb4;
-}
-// 毛玻璃效果
-.img-ad {  
-  display: block;
-  width: 100%;
-  height: auto;
-  filter: blur(2px);
-}
-.contact {
-  position: absolute;
-  right: 0;
-  top: 22px;
-  font-weight: bold;
-  font-size: 24px;
-  cursor: pointer;
-  text-decoration: underline;
-}
-ul li {
-  list-style: none;
-}
-</style>

+ 18 - 17
src/views/login/components/passwordPage.vue

@@ -1,7 +1,8 @@
 <template>
   <v-form ref="passwordForm" @submit.prevent>
-    <v-text-field v-model="loginData.phone" counter="11" :disabled="props.phoneDisabled" :placeholder="$t('login.mobileNumberPlaceholder')" color="primary" variant="outlined" density="compact" :rules="phoneRules" validate-on="input">
-      <template v-slot:prepend-inner>
+    <v-text-field v-model="loginData.phone" counter="11" :disabled="props.phoneDisabled" 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">
           <v-icon icon="mdi-cellphone" size="20"></v-icon>
           <span class="d-flex" id="menu-activator">
@@ -16,7 +17,7 @@
             </v-list>
           </v-menu>
         </span>
-      </template>
+      </template> -->
     </v-text-field>
     <v-text-field
       v-model="loginData.password"
@@ -37,8 +38,8 @@
 <script setup name="passwordPage">
 import { ref, reactive } from 'vue'
 defineOptions({ name: 'password-form' })
-import { useI18n } from '@/hooks/web/useI18n'
-const { t } = useI18n()
+// import { useI18n } from '@/hooks/web/useI18n'
+// const { t } = useI18n()
 const props = defineProps({ phoneDisabled: Boolean })
 const passwordType = ref(false)
 const emits = defineEmits(['handleEnter'])
@@ -46,22 +47,22 @@ const emits = defineEmits(['handleEnter'])
 const phoneRules = ref([
   value => {
     if (value) return true
-    return t('login.mobileNumberPlaceholder')
-  },
-  value => {
-    if (value?.length <= 11 && /^1[3456789]\d{9}$/.test(value)) return true
-    return t('login.correctPhoneNumber')
+    return '请输入手机号码或邮箱'
   }
+  // value => {
+  //   if (value?.length <= 11 && /^1[3456789]\d{9}$/.test(value)) return true
+  //   return t('login.correctPhoneNumber')
+  // }
 ])
 
 // 手机号区域
-const currentArea = ref('0086')
-const items = [
-  { label: '中国大陆-0086', value: '0086' }
-]
-const handleChangeCurrentArea = (e) => {
-  currentArea.value = e.value
-}
+// const currentArea = ref('0086')
+// const items = [
+//   { label: '中国大陆-0086', value: '0086' }
+// ]
+// const handleChangeCurrentArea = (e) => {
+//   currentArea.value = e.value
+// }
 
 const loginUserPhone = localStorage.getItem('loginUserPhone') || ''
 const loginData = reactive({

+ 29 - 152
src/views/login/index.vue

@@ -1,111 +1,60 @@
 <template>
   <div class="login-box">
-    <div class="login-content" :style="{height: loginType ? '492px' : '430px'}">
-      <div class="login-header mt-1 ml-1">
-        <div class="left">
-          <div ref="phone" :class="['left-qrCode', {'phone-switch': isPhone}]" @click="handlePhone">
-            <div class="switch-tip">
-              {{ isPhone ? $t('login.smsOrPassword') : $t('login.scanWeChatCode') }}
-            </div>
-          </div>
-          <div v-if="loginType" class="loginType">
-            <span>{{ $t('login.enterpriseLogin') }}</span>
-            <v-tooltip :text="$t('login.switchToPersonalLogin')" location="start">
-              <template v-slot:activator="{ props }">
-                <v-btn
-                  class="ml-0"
-                  color="#fffff"
-                  size="x-small"
-                  icon="mdi-swap-vertical"
-                  variant="plain"
-                  v-bind="props"
-                  to="/login"
-                  @click="switchToPersonalLogin"
-                >
-                </v-btn>
-              </template>
-            </v-tooltip>
-            <!-- <span class="mdi mdi-swap-vertical ml-4"></span> -->
-          </div>
-        </div>
-        <div class="right mr-2 mt-3" v-if="showClose">
-          <v-icon color="grey" size="30">mdi-close</v-icon>
-        </div>
-      </div>
-      <div class="login-content-box mt-5">
-        <div v-if="!isPhone" class="login-tab">
-          <v-tabs v-model="tab" align-tabs="center" color="primary">
-            <v-tab :value="1">{{ $t('login.smsLogin') }}</v-tab>
-            <v-tab :value="2">{{ $t('login.passwordLogin') }}</v-tab>
+    <div class="login-content">
+      <div class="login-content-box my-10">
+        <div class="login-tab">
+          <v-tabs v-model="tab" align-tabs="center" color="primary" class="mb-10">
+            <v-tab :value="1">验证码</v-tab>
+            <v-tab :value="2">账号</v-tab>
+            <v-tab :value="3">二维码</v-tab>
           </v-tabs>
-          <div v-if="loginType" class="mt-9">
-            <!-- 企业选择 -->
-            <companySelect ref="companySelectRef" v-model="enterpriseId"></companySelect>
-          </div>
-          <v-window v-model="tab" :class="{'mt-9': !loginType}">
+          <v-window v-model="tab">
               <!-- 验证码登录 -->
             <v-window-item :value="1">
-              <phoneFrom ref="phoneRef" :phoneDisabled="Boolean(loginType)" @handleEnter="handleLogin"></phoneFrom>
+              <phoneFrom ref="phoneRef" @handleEnter="handleLogin"></phoneFrom>
             </v-window-item>
               <!-- 账号密码登录 -->
             <v-window-item :value="2">
-              <passwordFrom ref="passRef" :phoneDisabled="Boolean(loginType)" @handleEnter="handleLogin"></passwordFrom>
+              <passwordFrom ref="passRef" @handleEnter="handleLogin"></passwordFrom>
+            </v-window-item>
+            <v-window-item :value="3">
+              <div class="d-flex align-center flex-column">
+                <span class="text-decoration-underline">微信扫描二维码进行登录</span>
+                <v-img src="https://minio.citupro.com/dev/menduner/login-qrCode.png" width="150" height="150"></v-img>
+              </div>
             </v-window-item>
           </v-window>
         </div>
-        <div v-else>
-          <!-- 微信扫码登录 -->
-          <div v-if="loginType" class="mt-9">
-            <companySelect v-model="enterpriseId"></companySelect>
-          </div>
-          <qr-code></qr-code>
+        <div class="font-size-14 tips">
+          <span class="float-left color-666 cursor-pointer" v-if="tab === 2">忘记密码</span>
+          <span class="float-right color-error cursor-pointer" @click="router.push('/register/selected')">注册</span>
         </div>
-        <v-btn v-if="!isPhone" :loading="loginLoading" color="primary" class="white--text mt-5" min-width="350" @click="handleLogin">
-          {{ tab === 1 ? $t('login.loginOrRegister') : $t('login.login') }}
+        <v-btn :loading="loginLoading" color="primary" class="white--text mt-5" min-width="350" @click="handleLogin">
+          {{ $t('login.login') }}
         </v-btn>
         <div class="login-tips mt-3">
           {{ $t('login.agreeLogin') }}
-          <span class="color" style="cursor: pointer;" @click="handleToUserAgreement">[{{ $t('login.userAgreement') }}]</span>
+          <span class="color" style="cursor: pointer;" @click="handleToUserAgreement"> [{{ $t('login.userAgreement') }}] </span>和
           <span class="color" style="cursor: pointer;" @click="handlePrivacyPolicy">[{{ $t('login.privacyPolicy') }}]</span>
         </div>
       </div>
     </div>
   </div>
-  <!-- <CtDialog :visible="showCompanySelect" title="选择企业" :footer="true" widthType="" @submit="handleSubmit">
-    <div  style="min-height: 10px">
-      <autocompleteUI></autocompleteUI>
-    </div>
-  </CtDialog> -->
 </template>
 
 <script setup>
 import { ref } from 'vue'
-import { getUserBindEnterpriseListByPhone } from '@/api/personal/user'
 import passwordFrom from './components/passwordPage.vue'
 import phoneFrom from '@/components/VerificationCode'
-import qrCode from './components/qrCode.vue'
-import companySelect from './components/companySelect.vue'
-
 import { useUserStore } from '@/store/user'
-import { useRoute, useRouter } from 'vue-router'
+import { useRouter } from 'vue-router'
 import { useI18n } from '@/hooks/web/useI18n'
 import Snackbar from '@/plugins/snackbar'
 defineOptions({ name: 'login-index' })
 
 const { t } = useI18n()
 const router = useRouter()
-const route = useRoute()
-const loginType = ref(route.query?.loginType - 0 || null)
-const enterpriseId = ref('')
-
-const phone = ref()
-let isPhone = ref(false)
-const handlePhone = () => {
-  isPhone.value = !isPhone.value
-  phone.value.style.backgroundPosition = isPhone.value ? '0 -80px' : '0 0'
-}
 const tab = ref(1)
-const showClose = ref(false)
 
 // 验证码登录
 const phoneRef = ref()
@@ -113,36 +62,17 @@ const passRef = ref()
 const loginLoading = ref(false)
 const userStore = useUserStore()
 
-const companySelectRef = ref()
-const beforeHandleLogin = async (params) => {
-  const data = await getUserBindEnterpriseListByPhone({ phone: params.phone}) // 申请通过才会数据,否则空数组
-  if (companySelectRef.value.item?.items) companySelectRef.value.item.items = data
-  // localStorage.setItem('companyInfo', JSON.stringify(data))
-  const bool = Boolean(data?.length)
-  if (!bool) Snackbar.warning(t('login.loginFailed'))
-  return bool
-}
 const handleLogin = async () => {
-  localStorage.removeItem('currentRole')
   const { valid } = tab.value === 1 ? await phoneRef.value.phoneForm.validate() : await passRef.value.passwordForm.validate()
   if (!valid) return
   loginLoading.value = true
   try {
-    const type = loginType.value
     let params, api = {}
     if (tab.value === 1) { params = { ...phoneRef.value.loginData }; api = 'handleSmsLogin'}
     else { params = { ...passRef.value.loginData }; api = 'handlePasswordLogin'}
-    // 企业登录
-    if (type === 330) {
-      const bool = await beforeHandleLogin(params); if (!bool) return
-      params.loginType = type; params.enterpriseId = enterpriseId.value
-    }
-    // await userStore.handlePasswordLogin({ ...passRef.value.loginData, type }) //tab.value === 1
-    // await userStore.handleSmsLogin({ ...phoneRef.value.loginData, type })
     await userStore[api](params)
     Snackbar.success(t('login.loginSuccess'))
-    const path = type === 330 ? '/recruit/enterprise' : '/recruitHome'
-    router.push({ path })
+    router.push({ path: '/recruitHome' })
   }
   finally {
     loginLoading.value = false
@@ -156,11 +86,6 @@ const handleToUserAgreement = () => {
 const handlePrivacyPolicy = () => {
   router.push({ path: '/privacyPolicy' })
 }
-
-const switchToPersonalLogin = () => {
-  loginType.value = 0
-  Snackbar.success(t('common.switchSuccessful'))
-}
 </script>
 
 <style lang="scss" scoped>
@@ -168,11 +93,9 @@ const switchToPersonalLogin = () => {
   position: absolute;
   top: 16px;
   right: 0;
-  // width: 100%;
   color: #fff;
   padding: 4px 15px 4px 32px;
   border-radius: 8px 0 0 8px;
-  // background-color: #ffba5d;
   background-color: #fa9c3e;
   font-size: 16px;
 }
@@ -189,71 +112,25 @@ const switchToPersonalLogin = () => {
   left: 50%;
   translate: -50% -50%;
   width: 450px;
-  // height: 430px;
   background-color: #fff;
   border-radius: 10px;
 }
-.login-header {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  height: 40px;
-}
 .login-content-box {
   padding: 0 50px;
 }
 .left {
   display: flex;
 }
-.left-qrCode {
-  position: absolute;
-  left: 8px;
-  top: 8px;
-  width: 40px;
-  height: 40px;
-  cursor: pointer;
-  background: url('../../assets/login.png') 0 0/40px auto no-repeat;
-}
-.left-qrCode:hover {
-  background-position: 0 -40px !important;
-}
-.left-qrCode.phone-switch {
-  background-position: 0 -80px !important;
-}
-.left-qrCode.phone-switch:hover {
-  background-position: 0 -120px !important;
-}
-.switch-tip {
-  position: absolute;
-  left: 60px;
-  top: 4px;
-  padding: 0 14px;
-  border-radius: 4px;
-  font-size: 12px;
-  color: var(--color-666);
-  line-height: 32px;
-  text-align: center;
-  background-color: #fff;
-  box-shadow: 0 6px 13px 0 rgba(0,0,0,.1);
-  white-space: nowrap;
-  &::before {
-    content: '';
-    position: absolute;
-    left: -5px;
-    top: 50%;
-    transform: translateY(-50%) rotate(45deg);
-    width: 10px;
-    height: 10px;
-    background-color: #fff;
-    box-shadow: 0 6px 13px 0 rgba(0,0,0,.1);
-  }
-}
 .login-tips {
   width: 100%;
   font-size: 12px;
   text-align: center;
 }
-
+.tips {
+  span:hover {
+    text-decoration: underline;
+  }
+}
 .color {
   color: var(--v-primary-base); 
 }

+ 0 - 12
src/views/recruit/enterprise/register/register.vue

@@ -30,7 +30,6 @@
         <div style="color: var(--color-999);">
           <span v-if="!isPrepare" class="mr-1" style="color: var(--v-error-base);">*</span>
           <span>上传营业执照</span>
-          <!-- <span class="mx-3 defaultLink">查看示例</span> -->
           <span>支持jpg、jpeg、png格式,图片大小不得超过10M</span>
         </div>
         <div class="file-box">
@@ -39,10 +38,6 @@
         <div class="note mt-10">
           <h4>注意事项:</h4>
           <span>企业名称为对外展示的企业名称,建议填写公司营业执照上的名称,请区分总公司和分公司</span>
-          <!-- <div>
-            <span>2.若公司已注册,请上传公司委托证明下载模版</span>
-            <span class="mx-3 defaultLink">下载模版</span>
-          </div> -->
         </div>
       </div>
       <div class="text-center">
@@ -55,10 +50,6 @@
         {{ $t('common.complete') }}
         </v-btn>
       </div>
-      <!-- 底部 个人不能绑定企业 要去后端管理员加 -->
-      <!-- <div class="text-center">
-        <v-btn color="primary" variant="text" @click="router.push({ path: '/recruit/enterprise/register/joiningEnterprise' })">{{ $t('enterprise.joiningEnterprise') }}</v-btn>
-      </div> -->
     </v-card>
     <PreviewImg v-if="showPreview" :current="current" :list="[licenseUrl]" @close="showPreview = !showPreview"></PreviewImg>
   </div>
@@ -129,8 +120,6 @@ const formItems = ref({
       key: 'phone',
       value: '',
       label: '联系电话 *',
-      // flexStyle: 'mr-3',
-      // col: 6,
       rules: [v => !!v || '请输入联系电话']
     },
     {
@@ -138,7 +127,6 @@ const formItems = ref({
       key: 'email',
       value: '',
       label: '联系邮箱 *',
-      // col: 6,
       rules: [v => !!v || '请输入联系邮箱']
     },
     {

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

@@ -0,0 +1,40 @@
+<template>
+  <div class="box">
+    <!-- 手机号注册 -->
+    <PhonePage v-if="!valid" :isCompany="true" @success="handleValidate"></PhonePage>
+    <div v-else class="content">
+      register
+    </div>
+  </div>
+</template>
+
+<script setup>
+defineOptions({ name: 'registerCompany'})
+import { ref } from 'vue'
+import PhonePage from './person.vue'
+
+const valid = ref(true)
+const handleValidate = () => {
+  valid.value = true
+}
+</script>
+
+<style scoped lang="scss">
+.box {
+  position: relative;
+  width: 100%;
+  height: 100%;
+  background-image: url('https://www.mendunerhr.com/images/userfiles/92d7e4a755e2428b94aab3636d5047f3/images/recruitment/adImages/2018/11/1920x940.jpg');
+  background-size: cover;
+}
+.content {
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  translate: -50% -50%;
+  width: 450px;
+  height: 450px;
+  background-color: #fff;
+  border-radius: 10px;
+}
+</style>

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

@@ -0,0 +1,84 @@
+<template>
+  <div class="box">
+    <div class="content pa-10">
+      <div class="content-title text-center">请输入手机号码进行注册认证</div>
+      <phoneFrom class="mt-10" ref="phoneRef" @handleEnter="handleRegister"></phoneFrom>
+      <div class="font-size-14 tips color-primary cursor-pointer text-end" @click="router.push('/login')">已有账号?去登录</div>
+      <v-btn :loading="loading" color="primary" class="white--text mt-5" min-width="370" @click="handleRegister">{{ isCompany ? '下一步' : '注册' }}</v-btn>
+      <div class="login-tips mt-3">
+        点击注册即代表您同意
+        <span class="color-primary" style="cursor: pointer;" @click="router.push('/userAgreement')"> [{{ $t('login.userAgreement') }}] </span>和
+        <span class="color-primary" style="cursor: pointer;" @click="router.push('/privacyPolicy')">[{{ $t('login.privacyPolicy') }}]</span>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+defineOptions({ name: 'registerPerson'})
+import { ref } from 'vue'
+import { useRouter } from 'vue-router'
+import phoneFrom from '@/components/VerificationCode'
+import { useUserStore } from '@/store/user'
+import Snackbar from '@/plugins/snackbar'
+
+const emit = defineEmits(['success'])
+const props = defineProps({
+  isCompany: {
+    type: Boolean,
+    default: false
+  }
+})
+
+const router = useRouter()
+const phoneRef = ref()
+const loading = ref(false)
+const userStore = useUserStore()
+
+// 注册
+const handleRegister = async () => {
+  const { valid } = await phoneRef.value.phoneForm.validate()
+  if (!valid) return
+  loading.value = true
+  try {
+    await userStore.handleSmsLogin({ ...phoneRef.value.loginData })
+    Snackbar.success(props.isCompany ? '手机号验证成功' : '注册成功')
+    if (!props.isCompany) router.push({ path: '/recruitHome' })
+    else emit('success')
+  } finally {
+    loading.value = false
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.box {
+  position: relative;
+  width: 100%;
+  height: 100%;
+  background-image: url('https://www.mendunerhr.com/images/userfiles/92d7e4a755e2428b94aab3636d5047f3/images/recruitment/adImages/2018/11/1920x940.jpg');
+  background-size: cover;
+}
+.content {
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  translate: -50% -50%;
+  width: 450px;
+  height: 400px;
+  background-color: #fff;
+  border-radius: 10px;
+  &-title {
+    color: #4c4c4c;
+    font-size: 24px;
+  }
+}
+.login-tips {
+  width: 100%;
+  font-size: 14px;
+  text-align: center;
+}
+.tips:hover {
+  text-decoration: underline;
+}
+</style>

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

@@ -0,0 +1,54 @@
+<template>
+  <div class="register-box">
+    <div class="register-content">
+      <h2 style="color: #666; font-weight: 400;">请选择您当前注册的身份</h2>
+      <div class="d-flex mt-16">
+        <div style="width: 50%;" class="cursor-pointer item pa-3" @click="handleToRegister('/register/company')">
+          <v-icon color="primary" size="100">mdi-home-city-outline</v-icon>
+          <div class="color-primary" style="font-size: 24px">企业用户</div>
+        </div>
+        <div style="width: 50%; border-left: 1px solid #ccc;" class="cursor-pointer item pa-3" @click="handleToRegister('/register/person')">
+          <v-icon color="primary" size="100">mdi-account-plus-outline</v-icon>
+          <div class="color-primary" style="font-size: 24px">个人用户</div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+defineOptions({ name: 'register-select'})
+import { useRouter } from 'vue-router'
+
+const router = useRouter()
+
+const handleToRegister = (path) => {
+  router.push({ path })
+}
+</script>
+
+<style scoped lang="scss">
+.register-box {
+  position: relative;
+  width: 100%;
+  height: 100%;
+  background-image: url('https://www.mendunerhr.com/images/userfiles/92d7e4a755e2428b94aab3636d5047f3/images/recruitment/adImages/2018/11/1920x940.jpg');
+  background-size: cover;
+}
+.register-content {
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  translate: -50% -50%;
+  width: 660px;
+  height: 453px;
+  background-color: #fff;
+  border-radius: 8px;
+  text-align: center;
+  padding: 90px 62px;
+}
+.item:hover {
+  color: #00897B;
+  text-decoration: underline;
+}
+</style>