Ver código fonte

feat: 下载目录册模块,逻辑已完成部分

chenpeng 2 semanas atrás
pai
commit
243f0e00f0

BIN
assets/images/baozhen_1748937135247.pdf


BIN
assets/images/email.png


BIN
assets/images/wechat.png


+ 16 - 0
assets/style/common.less

@@ -186,6 +186,22 @@
     }
 }
 
+.el-popper {
+    .el-select-dropdown {
+        .el-select-dropdown__wrap {
+            .el-select-dropdown__item {
+                &:hover {
+                    color: #9B6CFF !important;
+                }
+
+                &.is-selected {
+                    color: #9B6CFF !important;
+                }
+            }
+        }
+    }
+}
+
 .custom-title-bg {
     position: relative;
     display: inline-block;

+ 1 - 1
components/common/block/catalogs.vue

@@ -132,7 +132,7 @@ function onViewAll() {
   border-radius: 10px;
   background-color: #fff;
 }
- 
+
 .swiper-slide{
     background-color: #F3F4FB;
   &.swiper-slide-prev{

+ 2 - 2
components/common/loginAndDownload/comp/account/list.vue

@@ -1,10 +1,10 @@
 <script lang='ts' setup>
-import useLogin from '../../useLoginAndDownload'
+import useLoginAndDownload from '../../useLoginAndDownload'
 import { useCommonStore } from '@/stores/modules/common'
 
 const commonStore = useCommonStore()
 const { accountList } = storeToRefs(commonStore)
-const { onSelectAccount } = useLogin()
+const { onSelectAccount } = useLoginAndDownload()
 function selectOtherLogin() {
   commonStore.setLoginType('choice')
 }

+ 65 - 0
components/common/loginAndDownload/comp/info/finish.vue

@@ -0,0 +1,65 @@
+<script lang='ts' setup>
+import { useCommonStore } from '@/stores/modules/common'
+import { downloadFile } from '@/utils/common/download'
+
+const commonStore = useCommonStore()
+const { downloadCatalog } = storeToRefs(commonStore)
+
+function startDownload() {
+  if (downloadCatalog.value)
+    downloadFile(downloadCatalog.value.pdfUrl, `${downloadCatalog.value.title}.pdf`)
+  else
+    console.error('No download catalog available')
+}
+startDownload()
+</script>
+
+<template>
+  <div>
+    <div class="custom-title-font text-24px fw-800 text-#333 mb-10px flex items-center">
+      Download Successfully!👏
+    </div>
+    <div class="text-14px text-#1A1A1A lh-22px mb-20px">
+      Please feel free to contact us to customize your exclusive product solution.
+    </div>
+    <div class="b-rd-200px bg-#fff text-#333 py-14px px-46px b-1px b-solid b-#D8D8D8 hover:b-#9B6CFF flex  !bg-#fff items-center mb-24px">
+      <div class="p-14px b-rd-50% bg-#F2E5F2 mr-26px">
+        <img src="@/assets/images/email.png" alt="" class="w-24px h-24px ">
+      </div>
+      <div>
+        <div class="text-18px fw-bold custom-title-font">
+          Email
+        </div>
+        <div class="text-#9B6CFF lh-24px">
+          spark@ejet.com
+        </div>
+      </div>
+    </div>
+    <div class="b-rd-200px bg-#fff b-1px py-14px px-46px text-#333 b-solid b-#D8D8D8   hover:b-#9B6CFF flex  items-center">
+      <div class="p-14px b-rd-50% bg-#F2E5F2 mr-26px">
+        <img src="@/assets/images/wechat.png" class="w-24px h-24px" alt="">
+      </div>
+      <div>
+        <div class="text-18px fw-bold custom-title-font">
+          WhatsApp
+        </div>
+        <div class="text-#9B6CFF lh-24px">
+          +1 (234) 567-890
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<style lang='less' scoped>
+::v-deep(.login-input) {
+  &.error-txt{
+    .el-input__wrapper{
+      border: 1px solid red!important;
+   }
+  }
+   .el-input__wrapper{
+    border-radius: 10px;
+   }
+}
+</style>

+ 293 - 0
components/common/loginAndDownload/comp/info/index.vue

@@ -0,0 +1,293 @@
+<!-- @format -->
+
+<script lang="ts" setup>
+import type { FormInstance, FormRules } from 'element-plus'
+import useLoginAndDownload from '../../useLoginAndDownload'
+import { getDictListApi } from '~/api/model/common'
+
+const { formInfo, visible, setSubmitInfo } = useLoginAndDownload()
+const ruleFormRef = ref<FormInstance>()
+const annualPurchaseAmountList = ref()
+const mobileAreaCodeList = ref()
+const rules = ref<FormRules>({
+  firstName: [
+    {
+      required: true,
+      message: 'FirstName must be filled in',
+      trigger: 'blur',
+    },
+  ],
+  lastName: [
+    {
+      required: true,
+      message: 'LastName must be filled in',
+      trigger: 'blur',
+    },
+  ],
+  mobile: [
+    {
+      required: true,
+      message: 'Mobile must be filled in',
+      trigger: 'blur',
+    },
+  ],
+  type: [
+    {
+      required: true,
+      message: 'Mobile must be filled in',
+      trigger: 'blur',
+    },
+  ],
+  companyName: [
+    {
+      required: true,
+      message: 'CompanyName must be filled in',
+      trigger: 'change',
+    },
+  ],
+  annualPurchaseAmount: [
+    {
+      required: true,
+      message: 'AnnualPurchaseAmount must be selected',
+      trigger: 'change',
+    },
+  ],
+})
+
+async function getMobileAreaCodeList() {
+  const list = await getDictListApi('A064')
+  mobileAreaCodeList.value = list
+}
+async function getAnnualPurchaseAmountList() {
+  const list = await getDictListApi('A072')
+  annualPurchaseAmountList.value = list
+}
+getMobileAreaCodeList()
+getAnnualPurchaseAmountList()
+</script>
+
+<template>
+  <div>
+    <div
+      class="custom-title-font text-24px fw-800 text-#333 mb-10px flex items-center"
+    >
+      Fill in Your Information
+    </div>
+    <div class="text-14px text-#1A1A1A lh-22px mb-20px">
+      We need some basic information to create your account.
+    </div>
+    <el-form ref="ruleFormRef" :rules="rules" :model="formInfo">
+      <div class="flex">
+        <el-form-item
+          class="custom-form-item custom-form-item-hidden-label mr-20px"
+          label=""
+          prop="firstName"
+        >
+          <el-input
+            v-model="formInfo.firstName"
+            placeholder="* First Name"
+            class="h-50px"
+          />
+        </el-form-item>
+        <el-form-item
+          class="custom-form-item custom-form-item-hidden-label mr-12px"
+          label=""
+          prop="lastName"
+        >
+          <el-input
+            v-model="formInfo.lastName"
+            placeholder="* Last Name"
+            class="h-50px"
+          />
+        </el-form-item>
+      </div>
+
+      <el-form-item label="" class="custom-form-item" prop="mobile">
+        <el-input
+          v-model="formInfo.mobile"
+          placeholder="Phone number"
+          class="h-50px custom-inner-input"
+        >
+          <template #prepend>
+            <el-select
+              v-model="formInfo.mobileAreaCode"
+              class="!h-50px !lh-50px"
+              placeholder="Select"
+              style="width: 120px"
+            >
+              <el-option
+                v-for="(item, index) in mobileAreaCodeList"
+                :key="index"
+                :value="item.value"
+                :label="`${item.value} ${item.label}`"
+              >
+                {{ item.value }} {{ item.label }}
+              </el-option>
+            </el-select>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-form-item label="" class="custom-form-item" prop="type">
+        <el-select v-model="formInfo.type" placeholder="* Needs">
+          <el-option
+            class="!h-50px !lh-50px"
+            label="Just browing"
+            value="browing"
+          />
+          <el-option
+            class="!h-50px !lh-50px"
+            label="Find suppliers"
+            value="suppliers"
+          />
+        </el-select>
+      </el-form-item>
+
+      <el-form-item
+        v-if="visible"
+        label=""
+        class="custom-form-item"
+        prop="companyName"
+      >
+        <el-input
+          v-model="formInfo.companyName"
+          placeholder="Company name"
+          class="h-50px"
+        />
+      </el-form-item>
+      <el-form-item
+        v-if="visible"
+        label=""
+        prop="annualPurchaseAmount"
+        class="custom-form-item"
+      >
+        <el-select
+          v-model="formInfo.annualPurchaseAmount"
+          placeholder="* Sourcing Budget "
+        >
+          <el-option
+            v-for="(item, index) in annualPurchaseAmountList"
+            :key="index"
+            class="!h-50px !lh-50px"
+            :label="item.label"
+            :value="item.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item v-if="visible" label="" class="custom-form-item">
+        <el-input
+          v-model="formInfo.mark"
+          type="textarea"
+          placeholder="Describe your needs"
+          :rows="4"
+        />
+      </el-form-item>
+
+      <el-form-item>
+        <el-button
+          class="!w-full !h-50px mb-50px !text-16px !fw-500 !b-rd-10px !bg-#9B6CFF !text-#fff"
+          @click="setSubmitInfo(ruleFormRef)"
+        >
+          Download Catalog
+        </el-button>
+      </el-form-item>
+    </el-form>
+  </div>
+</template>
+
+<style lang="less" scoped>
+::v-deep(.login-input) {
+  &.error-txt {
+    .el-input__wrapper {
+      border: 1px solid red !important;
+    }
+  }
+  .el-input__wrapper {
+    border-radius: 10px;
+  }
+}
+:deep(.custom-form-item) {
+  margin-bottom: 24px;
+  display: block !important;
+  .el-form-item__content {
+    justify-content: space-between;
+    .el-input {
+      .el-input__wrapper {
+        border-radius: 10px;
+      }
+      .el-input-group__prepend {
+        border-top-left-radius: 10px;
+        border-bottom-left-radius: 10px;
+        .el-select {
+          .el-select__wrapper {
+            height: 50px !important;
+            background-color: #fff !important;
+            border-top-left-radius: 10px;
+            border-bottom-left-radius: 10px;
+            &:hover {
+              border: 1px solid #9b6cff !important;
+            }
+          }
+        }
+      }
+
+      &.custom-inner-input {
+        .el-input__wrapper {
+          border-top-left-radius: 0px;
+          border-bottom-left-radius: 0px;
+        }
+        .el-select {
+          .el-select__wrapper {
+            height: 50px !important;
+            background-color: #fff !important;
+            border-top-left-radius: 10px;
+            border-bottom-left-radius: 10px;
+            border-top-right-radius: 0px !important;
+            border-bottom-right-radius: 0px !important;
+          }
+        }
+      }
+    }
+    .el-select {
+      .el-select__wrapper {
+        height: 50px !important;
+        background-color: #fff !important;
+        border-radius: 10px;
+        &.is-focused {
+          box-shadow: none !important;
+          border: 1px solid #9b6cff !important;
+        }
+        &:hover {
+          box-shadow: none !important;
+          border: 1px solid #9b6cff !important;
+        }
+      }
+    }
+    .el-textarea{
+      .el-textarea__inner{
+        border-radius: 10px;
+        &:focus {
+          box-shadow: none !important;
+          border: 1px solid #9b6cff !important;
+        }
+      }
+    }
+  }
+
+  .el-form-item__label-wrap {
+    margin-left: unset !important;
+    .el-form-item__label {
+      margin-bottom: 5px;
+      font-size: 16px !important;
+      color: #5b463e !important;
+    }
+  }
+  &.custom-form-item-hidden-label {
+    width: 100%;
+    &:last-child {
+      .el-form-item__label-wrap {
+        opacity: 0;
+      }
+    }
+  }
+}
+</style>

+ 56 - 0
components/common/loginAndDownload/comp/info/request.vue

@@ -0,0 +1,56 @@
+<script lang='ts' setup>
+import type { FormInstance, FormRules } from 'element-plus'
+import useLoginAndDownload from '../../useLoginAndDownload'
+
+const { loginForm, finishCode, errorCodeTxt, seconds, getMailCode, backStep } = useLoginAndDownload()
+const ruleFormRef = ref<FormInstance>()
+
+const rules = ref<FormRules>({
+  code: [
+    { required: true, message: 'Please enter a valid email.', trigger: 'blur' },
+  ],
+})
+</script>
+
+<template>
+  <div>
+    <div class="custom-title-font text-24px fw-800 text-#333 mb-10px flex items-center">
+      Request Successfully!👏
+    </div>
+    <div class="text-14px text-#1A1A1A lh-22px  ">
+      Our product expert will contact you soon to send you the catalog. Please check your mailbox later.
+    </div>
+    <el-divider class="!my-30px">
+      or
+    </el-divider>
+    <div class="text-14px text-#1A1A1A lh-22px mb-30px">
+      Directly contact us now to talk about your product needs and sourcing requirements.
+    </div>
+    <div class="b-rd-200px bg-#fff b-1px py-14px px-46px text-#333 b-solid b-#D8D8D8   hover:b-#9B6CFF flex  items-center">
+      <div class="p-14px b-rd-50% bg-#F2E5F2 mr-26px">
+        <img src="@/assets/images/wechat.png" class="w-24px h-24px" alt="">
+      </div>
+      <div>
+        <div class="text-18px fw-bold custom-title-font">
+          WhatsApp
+        </div>
+        <div class="text-#9B6CFF lh-24px">
+          +1 (234) 567-890
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<style lang='less' scoped>
+::v-deep(.login-input) {
+  &.error-txt{
+    .el-input__wrapper{
+      border: 1px solid red!important;
+   }
+  }
+   .el-input__wrapper{
+    border-radius: 10px;
+   }
+}
+</style>

+ 46 - 0
components/common/loginAndDownload/comp/info/submitRequest.vue

@@ -0,0 +1,46 @@
+<script lang='ts' setup>
+import useLoginAndDownload from '../../useLoginAndDownload'
+
+const { onSubmitRequest } = useLoginAndDownload()
+</script>
+
+<template>
+  <div>
+    <div class="custom-title-font text-24px fw-800 text-#333 mb-10px">
+      Submit Catalog Request
+    </div>
+    <div class="text-14px text-#1A1A1A lh-22px mb-22px">
+      You are requesting the catalog with your EJET Spark account below.
+    </div>
+    <div class="flex flex-col gap-20px">
+      <div class="flex py-15px px-35px b-rd-10px b-#D8D8D b-1px b-solid cursor-pointer hover:b-#9B6CFF">
+        <!-- 获取首字母 -->
+        <div class="w-50px h-50px bg-#F2E5F2 text-#9B6CFF text-24px flex justify-center b-rd-50% items-center mr-28px">
+          E
+        </div>
+        <div>
+          <div class="text-18px fw-bold text-#333 custom-title-font">
+            EJET Spark
+          </div>
+          <div class="text-#9B6CFF mt-8px">
+            spark@ejet.com
+          </div>
+        </div>
+      </div>
+    </div>
+    <el-button
+      class="!w-full !h-50px mt-24px !text-16px !fw-500 !b-rd-10px !bg-#9B6CFF !text-#fff"
+      @click="onSubmitRequest"
+    >
+      Request Catalog
+    </el-button>
+  </div>
+</template>
+
+<style lang='less' scoped>
+::v-deep(.login-input) {
+   .el-input__wrapper{
+    border-radius: 10px;
+   }
+}
+</style>

+ 46 - 25
components/common/loginAndDownload/index.vue

@@ -6,17 +6,19 @@ import Mail from './comp/email/index.vue'
 import Code from './comp/email/code.vue'
 import Google from './comp/email/google.vue'
 import AccountList from './comp/account/list.vue'
+import Info from './comp/info/index.vue'
+import Finish from './comp/info/finish.vue'
+import SubmitRequest from './comp/info/submitRequest.vue'
+import Request from './comp/info/request.vue'
 import useLoginAndDownload from './useLoginAndDownload'
 import { useUserStore } from '@/stores/modules/user'
 import { useCommonStore } from '@/stores/modules/common'
 
 const commonStore = useCommonStore()
-const { downloadCatalog, accountList, loginType } = storeToRefs(commonStore)
-const { emailStep, isEmailGoogle, selectedAccount } = useLoginAndDownload()
-
+const { downloadCatalog, accountList, loginType, isCompletedInfo } = storeToRefs(commonStore)
+const { emailStep, isEmailGoogle, selectedAccount, setEmailStep } = useLoginAndDownload()
 const userStore = useUserStore()
 const { isLogin } = storeToRefs(userStore)
-
 const { isLoginAndDownloadOpen } = useLoginAndDownLoadModal()
 
 watch(() => accountList.value, (newVal: any) => {
@@ -25,6 +27,18 @@ watch(() => accountList.value, (newVal: any) => {
   else
     commonStore.setLoginType('choice')
 }, { immediate: true })
+
+watchEffect(() => {
+  if (isLogin.value && isCompletedInfo.value)
+    setEmailStep(4)
+  else
+    console.log('watchEffect-------1', isLogin.value, isCompletedInfo.value)
+})
+
+onUnmounted(() => {
+  console.log('组件卸载了', isCompletedInfo.value)
+  setEmailStep(3)
+})
 </script>
 
 <template>
@@ -41,37 +55,44 @@ watch(() => accountList.value, (newVal: any) => {
       class="w-32px h-32px bg-#F4F4F4 cursor-pointer p-8px b-rd-50% pos-absolute top-24px right-24px"
       @click="isLoginAndDownloadOpen = false"
     >
-    <div class="flex">
-      <div class="pt-110px pb-45px px-45px pos-relative bg-#D7C4FF w-375px">
-        <img
-          src="@/assets/images/login_icon01.png"
-          alt=""
-          class="w-110px h-110px pos-absolute top-0 left-0"
-        >
-        <div class="custom-title-font text-24px fw-800 text-#333">
-          Welcome to EJET Spark!
-        </div>
-        <img
-          src="@/assets/images/login_img01.png"
-          alt=""
-          class="my-20px w-276px h-225px mx-auto"
-        >
-        <div class="mb-10px custom-title-font text-18px fw-800 text-#333">
-          EJET Spark Intro
-        </div>
-        <div class="text-14px text-#333 lh-22px">
-          EJET Spark catalog description, spark the trend, ignate sales. EJET
-          Spark catalog description, spark the trend, ignate sales.
+    <div class="flex min-h-550px">
+      <div class="pt-110px pb-52px px-45px flex flex-col justify-between pos-relative w-375px bg-cover bg-no-repeat" :style="{ backgroundImage: `url(${downloadCatalog.img})` }">
+        <svgo-spark-logo
+          class="!w-100px !h-24px  text-#fff"
+        />
+        <div>
+          <div class="custom-title-font text-24px fw-800 text-#fff mb-24px">
+            Download The Catalog
+          </div>
+          <div class="mb-10px custom-title-font text-18px fw-800 text-#fff">
+            {{ downloadCatalog.title }}
+          </div>
+          <div class="text-14px text-#fff lh-22px mb-36px">
+            {{ downloadCatalog.description }}
+          </div>
+          <!-- <div
+            class="w-110px h-32px lh-32px text-center b-rd-6px text-14px text-#9B6CFF fw-bold b-solid b-1px b-#9B6CFF cursor-pointer hover:bg-#9B6CFF hover:text-#fff"
+          >
+            <NuxtLink to="/">
+              Learn More
+            </NuxtLink>
+          </div> -->
         </div>
       </div>
       <div class="flex-1 b-rd-10px bg-#fff px-70px pt-100px">
         <div v-if="!isLogin">
+          <!-- 登陆部分 -->
           <AccountList v-if="emailStep === 0 && accountList.length && loginType === 'account'" />
           <Choice v-if="emailStep === 0 && loginType === 'choice'" />
           <Mail v-if="emailStep === 1 && !selectedAccount" />
           <Mail v-if="emailStep === 1 && selectedAccount" />
           <Code v-if="emailStep === 2 && !isEmailGoogle " />
           <Google v-if="emailStep === 2 && isEmailGoogle === 'google'" />
+          <!-- 填写信息 -->
+          <Info v-if="emailStep === 3 && !isCompletedInfo" />
+          <SubmitRequest v-if="emailStep === 3 && !!isCompletedInfo && downloadCatalog.type === 'request'" />
+          <Finish v-if="emailStep === 4 && downloadCatalog.type === 'download'" />
+          <Request v-if="emailStep === 4 && downloadCatalog.type === 'request'" />
         </div>
       </div>
     </div>

+ 43 - 5
components/common/loginAndDownload/useLoginAndDownload.ts

@@ -10,15 +10,32 @@ const loginForm = ref<any>({
   mail: '',
   code: '',
 })
-const emailStep = ref<number>(0)
-const seconds = ref<number>(0)
+const emailStep = ref<number>(4)
 const selectedAccount = ref<string>('')
-const errorCodeTxt = ref<string>('')
 const isEmailGoogle = ref<string>('')
+
 export default function useRegister() {
+  const seconds = ref<number>(0)
+  const errorCodeTxt = ref<string>('')
+  const formInfo = ref<any>({
+    firstName: '',
+    lastName: '',
+    mobile: '',
+    mobileAreaCode: '+86',
+    type: undefined,
+    companyName: '',
+    annualPurchaseAmount: undefined,
+    mark: '',
+
+  })
+  const visible = computed(() => formInfo.value.type === 'suppliers')
+
   const nextStep = () => {
     emailStep.value++
   }
+  const setEmailStep = (val: number) => {
+    emailStep.value = val
+  }
   const backStep = () => {
     if (emailStep.value > 0)
       emailStep.value--
@@ -90,7 +107,7 @@ export default function useRegister() {
       if (valid) {
       // 验证已存在google的邮箱
 
-        isEmailGoogle.value = 'google' // 模拟google邮箱验证
+        // isEmailGoogle.value = 'google' // 模拟google邮箱验证
         nextStep()
       }
       else { console.log('error submit!', fields) }
@@ -124,5 +141,26 @@ export default function useRegister() {
       errorCodeTxt.value = 'The code is wrong or invalid.'
     }
   }
-  return { emailStep, loginForm, selectedAccount, onSelectAccount, errorCodeTxt, seconds, isEmailGoogle, sendEmail, nextStep, onSelectEmail, finishCode, backStep, getMailCode }
+
+  // ------------------------  填写信息部分 ------------------------
+  const setSubmitInfo = (formEl: FormInstance | undefined) => {
+    if (!formEl)
+      return
+    emailStep.value = 4
+    // await formEl.validate(async (valid, fields) => {
+    //   if (valid)
+    //     await handleLogin()
+
+    //   else console.log('error submit!', fields)
+    // })
+  }
+
+  /**
+   * 已经填写了用户信息---提交请求
+   */
+  const onSubmitRequest = () => {
+    emailStep.value = 4
+  }
+
+  return { emailStep, visible, loginForm, formInfo, selectedAccount, setEmailStep, setSubmitInfo, onSubmitRequest, onSelectAccount, errorCodeTxt, seconds, isEmailGoogle, sendEmail, nextStep, onSelectEmail, finishCode, backStep, getMailCode }
 }

+ 8 - 0
pages/categories/[slug].vue

@@ -8,24 +8,32 @@ const list = [
     title: 'Stationary & Office Supplies',
     description: 'Discover bestsellers and fresh arrivals tailored to your niche.',
     img: 'https://picsum.photos/560/310',
+    pdfUrl: 'https://static.ejetselection.com/temp/baozhen_1748937135247.pdf',
+    type: 'download',
   },
   {
     id: 2,
     title: 'Stationary & Office Supplies',
     description: 'Discover bestsellers and fresh arrivals tailored to your niche.',
     img: 'https://picsum.photos/560/310',
+    pdfUrl: 'https://static.ejetselection.com/temp/baozhen_1748937135247.pdf',
+    type: 'request',
   },
   {
     id: 3,
     title: 'Stationary & Office Supplies',
     description: 'Discover bestsellers and fresh arrivals tailored to your niche.',
     img: 'https://picsum.photos/560/310',
+    pdfUrl: 'https://static.ejetselection.com/temp/baozhen_1748937135247.pdf',
+    type: 'request',
   },
   {
     id: 4,
     title: 'Stationary & Office Supplies',
     description: 'Discover bestsellers and fresh arrivals tailored to your niche.',
     img: 'https://picsum.photos/560/310',
+    pdfUrl: 'https://static.ejetselection.com/temp/baozhen_1748937135247.pdf',
+    type: 'request',
   },
 ]
 const { openLoginAndDownloadModal } = useLoginAndDownLoadModal()

+ 10 - 2
stores/modules/common.ts

@@ -1,7 +1,6 @@
 /** @format */
 
 import { defineStore } from 'pinia'
-import { id } from 'element-plus/es/locales.mjs'
 import { useUserStore } from './user'
 
 export const useCommonStore = defineStore(
@@ -9,6 +8,7 @@ export const useCommonStore = defineStore(
   () => {
     const navigateTextColor = ref('#ffffff')
     const navigateBgColor = ref('#0F0820')
+    const isCompletedInfo = ref<boolean>(true) // 是否提交过的信息
     const loginType = ref<string>('choice')
     const downloadCatalog = ref<any>(null)
     const accountList = ref([
@@ -27,7 +27,6 @@ export const useCommonStore = defineStore(
 
     /**
      * 设置头部导航背景色
-     * @returns
      */
     const setNavigateBgColor = (color: string) => {
       if (!color)
@@ -69,15 +68,24 @@ export const useCommonStore = defineStore(
       downloadCatalog.value = catalog
     }
 
+    /**
+     * 记录用户是否提交过信息
+     */
+    const setFilledInfo = (filled: boolean) => {
+      // isCompletedInfo.value = filled
+    }
+
     return {
       navigateTextColor,
       navigateBgColor,
       downloadCatalog,
+      isCompletedInfo,
       setNavigateBgColor,
       setLoginType,
       accountList,
       loginType,
       setAccountList,
+      setFilledInfo,
       setDownloadCatalog,
     }
   },