Selaa lähdekoodia

兼容公众号注册企业

lifanagju_citu 7 kuukautta sitten
vanhempi
commit
2b5c6b9651

+ 1 - 1
src/components/Upload/img.vue

@@ -41,7 +41,7 @@ const src = ref('')
 
 watch(() => props.value, (newVal) => {
   src.value = newVal
-})
+}, { immediate: true }, { deep: true })
 
 // 选择文件
 const fileInput = ref()

+ 4 - 4
src/views/recruit/entRegister/inReview.vue

@@ -1,7 +1,7 @@
 <!-- 注册企业进度 -->
 <template>
   <div class="my-5">
-    <div :class="isMobile? 'mobileBox' : 'default-width'">
+    <div v-if="!isMobile">
       <v-btn v-if="query?.noLogin" class="my-2" color="primary" variant="text" size="large" @click="router.push('/login')">{{ `<< 回到登录页` }}</v-btn>
       <v-btn v-else class="my-2" color="primary" variant="text" size="large" @click="router.push('/recruitHome')">{{ `<< 回到首页` }}</v-btn>
     </div>
@@ -44,9 +44,9 @@
         <div v-else-if="applyInfo.status === '1'">
           <span>审核通过</span>
         </div>
-        <div class="text-center" v-if="!isMobile">
-          <v-btn class="mt-16 buttons" color="primary" to="/recruitHome">{{ $t('common.toHome') }}</v-btn>
-          <v-btn v-if="applyInfo.status === '2'" class="mt-16 ml-12 buttons" color="primary" @click="handleConfirm">{{ $t('common.resubmit') }}</v-btn>
+        <div class="text-center">
+          <v-btn v-if="!isMobile" class="mt-16 mr-12 buttons" color="primary" to="/recruitHome">{{ $t('common.toHome') }}</v-btn>
+          <v-btn v-if="applyInfo.status === '2'" class="mt-16 buttons" color="primary" @click="handleConfirm">{{ $t('common.resubmit') }}</v-btn>
         </div>
       </div>
     </v-card>

+ 11 - 10
src/views/recruit/entRegister/register.vue

@@ -2,7 +2,7 @@
   <div class="login-box py-5">
     <v-card class="pa-5" :class="isMobile? 'mobileBox' : 'default-width'" :elevation="isMobile? '0' : '3'">
       <!-- 标题 -->
-      <div class="mt-3">
+      <div class="mt-3" v-if="!isMobile">
         <v-btn v-if="pageType !== 'noLoginToRegister'" color="primary" variant="text" @click="router.push('/recruitHome')">{{ `<< 回到首页` }}</v-btn>
         <div v-else style="height: 30px;"></div>
       </div>
@@ -13,7 +13,7 @@
           <span>原因:{{ failureReason }}</span>
         </div>
         <!-- 标题 -->
-        <div class="mb-10 mt-n8" style="font-size: 22px; font-weight: bold; text-align: center;">{{ $t('enterprise.registeringNewEnterprise') }}</div>
+        <div class="mb-10" :class="isMobile ? 'mt-0': 'mt-n8'" style="font-size: 22px; font-weight: bold; text-align: center;">{{ $t('enterprise.registeringNewEnterprise') }}</div>
         <CtForm ref="CtFormRef" :items="formItems" style="width: 100%;">
           <template #businessLicense>
             <!-- 上传照片 -->
@@ -26,8 +26,8 @@
               <div class="file-box">
                 <Img 
                   class="mt-3" 
-                  v-model="licenseUrl" 
                   tips="上传图片" 
+                  :value="licenseUrl" 
                   :showSnackbar="false" 
                   @imgClick="showPreview = !showPreview" 
                   :showCursor="true" 
@@ -149,21 +149,21 @@ const formItems = ref({
     {
       type: 'text',
       key: 'contactName',
-      value: '林小姐',
+      value: '',
       label: '联系人姓名 *',
       rules: [v => !!v || '请输入联系人姓名']
     },
     {
       type: 'phoneNumber',
       key: 'phone',
-      value: '13229740091',
+      value: '',
       label: '联系电话 *',
       rules: [v => !!v || '请输入联系电话']
     },
     {
       type: 'text',
       key: 'email',
-      value: email ? email : 'lin@qq.com',
+      value: email ? email : '',
       label: '企业邮箱 *',
       rules: [
         value => {
@@ -179,7 +179,7 @@ const formItems = ref({
     {
       type: 'password',
       key: 'password',
-      value: 'Citu123456',
+      value: '',
       appendInnerIcon: 'mdi-eye-off-outline',
       label: '账户登录密码 *',
       placeholder: '请输入账户登录密码',
@@ -198,7 +198,7 @@ const formItems = ref({
     {
       type: 'password',
       key: 'passwordConfirm',
-      value: 'Citu123456',
+      value: '',
       appendInnerIcon: 'mdi-eye-off-outline',
       label: '请再次输入账户登录密码 *',
       placeholder: '请再次输入账户登录密码',
@@ -290,11 +290,11 @@ if (info && Object.keys(info).length && info.status === '2') {
   failureReason.value = info?.reason || ''
   licenseUrl.value = info?.businessLicenseUrl
   // prepareValue.value = info?.prepare || false
-  isPrepareChange()
   formItems.value.options.forEach(e => {
     if (e.key === 'passwordConfirm') e.value = info.password
     else e.value = info[e.key]
   })
+  isPrepareChange()
 }
 
 </script>
@@ -352,7 +352,8 @@ if (info && Object.keys(info).length && info.status === '2') {
   margin-left: 32px;
 }
 .mobileBox {
-  width: 100vw;
+  width: calc(100vw - 16px);
+  margin: 0 auto;
   .resume-header {
     margin-bottom: 12px;
   }

+ 3 - 2
src/views/register/company.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="box">
+  <div class="box" style="overflow-x: hidden;">
     <PhonePage v-if="!valid" :isCompany="true" @success="handleValidate" :isLogin="query.login ? true : false"></PhonePage>
   </div>
 </template>
@@ -24,10 +24,11 @@ const handleValidate = async () => {
   } 
   // 查看用户是否有在申请中的数据
   const data = await getUserRegisterEnterpriseApply()
-  const bool = data && Object.keys(data).length // 已经有数据说明已经申请过了
+  const bool = data && Object.keys(data).length && data.status !== '1' // 已经有数据说明已经申请过了 且申请状态如果为已通过,则跳转到注册页面让用户可以注册新的企业
   const path = bool ? '/recruit/entRegister/inReview' : '/recruit/entRegister'
   router.push({ path, query: { type: 'noLoginToRegister' } })
 }
+// handleValidate() // 测试
 
 </script>