Эх сурвалжийг харах

fix:1.签证模块的bug 修改。

suwenjiang 2 сар өмнө
parent
commit
3e6b1dcab1

+ 18 - 7
src/pages/visa/details/[id].vue

@@ -86,7 +86,7 @@
         v-html="visaData?.dataText"
         class="box-border w-full py-16 pb-100"
       ></div>
-      <div v-if="navIndex === 1" class="box-border w-full py-16 pb-60">
+      <div v-if="navIndex == 1" class="box-border w-full py-16 pb-60">
         <template v-for="(item, index) in argumentList" :key="index + 'need'">
           <div
             class="mb-12 box-border w-full border-b-[1px] pb-9 text-base font-semibold text-black"
@@ -106,7 +106,13 @@
         </template>
       </div>
 
-      <div v-if="navIndex === 2" class="box-border w-full py-16 pb-80">
+      <div v-if="navIndex == 2" class="box-border w-full py-16 pb-80">
+        <div
+          v-if="!metarialsLists?.length"
+          class="w-full flex items-center justify-center min-h-100"
+        >
+          <div class="text-[#BFC8DB]">暂无基础材料</div>
+        </div>
         <div
           class="w-full pb-8 mb-15 border-b-[1px]"
           v-for="(item, index) in metarialsLists"
@@ -126,16 +132,15 @@
       class="fixed bottom-0 left-0 z-50 bg-white box-brder w-full h-100 border-t-[1px] p-15 pb-38 flex justify-bewteen items-center"
       style="box-shadow: 0px -4px 4px 0px rgba(0, 0, 0, 0.1)"
     >
-      <p class="w-full">
+      <p class="w-full line-clamp-1">
         <span class="truncate whitespace-nowrap text-nowrap text-base font-normal text-black/[0.9]">
           合计费用:
         </span>
         <span class="text-sm font-normal text-[#FF476A]">
           ¥
           <span class="text-3xl font-semibold">
-            {{ visaData?.floorPrice ? visaData?.floorPrice : '????' }}
+            {{ visaData?.floorPrice ? visaData?.floorPrice : '????' }}.00
           </span>
-          <!-- RMB -->
         </span>
       </p>
@@ -145,7 +150,7 @@
         type="warring"
         color="#FA8446"
         round
-        class="box-border w-180 h-46 text-white shrink-0 rounded-full text-xl font-semibold"
+        class="box-border w-160 h-46 text-white shrink-0 rounded-full text-xl font-semibold"
       >
         联系顾问
       </van-button>
@@ -197,7 +202,7 @@
             </p>
             <p
               :title="phoneSection(consultantInfo?.countryCodeId, consultantInfo?.counselorPhone)"
-              class="line-clamp-1 text-xl font-semibold text-[#000]"
+              class="line-clamp-1 text-xl font-semibold text-black"
             >
               {{ phoneSection(consultantInfo?.countryCodeId, consultantInfo?.counselorPhone) }}
             </p>
@@ -364,6 +369,12 @@ async function getVisaDetails() {
 
     if (counselor) {
       consultantInfo.value = counselor
+      if (visa.countryCodeId) {
+        consultantInfo.value.countryCodeId = visa.countryCodeId
+      } else {
+        consultantInfo.value.countryCodeId = visa.countryCodeIdDictMap.id
+      }
+
       consultantInfo.value.workingTime = `${isValue(counselor.start)}:00 - ${isValue(counselor.end)}:00`
     }
 

+ 11 - 13
src/pages/visa/index.vue

@@ -10,7 +10,7 @@
           @keydown.enter="navigateTovisaList({ searchString })"
           style="outline: none; background: none"
         />
-        <!-- @keydown.enter="navigateTovisaList({ searchString })" -->
+
         <button
           @click="navigateTovisaList({ searchString })"
           class="h-full border flex justify-center items-center w-66 shrink-0 rounded-r-full"
@@ -92,30 +92,28 @@
             :to="`/visa/details/${item?.id}`"
             v-for="(item, index) in hotVisaList?.slice(0, 8)"
             :key="item.id"
-            :class="`mb-12 w-[48%] cursor-pointer overflow-hidden  rounded-xl bg-[#fff]`"
+            :class="`mb-12 w-[48%]  relative  cursor-pointer overflow-hidden  rounded-xl bg-[#fff]`"
           >
             <div class="h-98 w-full overflow-hidden rounded-t-xl">
               <img v-if="item?.img" :src="item?.img" alt="" class="h-full w-full" />
             </div>
-
+            <div
+              :class="` absolute top-0 right-0 z-2 shrink-0 line-clamp-1 px-4  text-center text-sm leading-5xl  rounded-bl-md rounded-tr-xl   text-[${formatStatus(item?.visaTypeIdDictMap?.id)}] bg-black/[0.2]`"
+            >
+              {{ item?.visaTypeIdDictMap.name }}
+            </div>
             <div class="box-border border flex rounded-b-xl items-center justify-between p-8">
               <span
                 :title="item?.countryCodeIdDictMap?.name"
-                class="w-42 line-clamp-1 text-base font-medium text-black-3"
+                class="w-60 shrink-0 line-clamp-1 text-base font-medium text-black-3"
               >
                 {{ item?.countryCodeIdDictMap?.name }}
               </span>
 
-              <div
-                :class="` shrink-0 line-clamp-1 px-4 h-20 text-center text-sm leading-3xl rounded-full text-[${formatStatus(item?.visaTypeIdDictMap?.id)}] bg-[${formatStatus(item?.visaTypeIdDictMap?.id)}]/[0.1]`"
-              >
-                {{ item?.visaTypeIdDictMap.name }}
-              </div>
-
-              <span class="shrink-0 line-clamp-1">
-                <span class="text-sm text-[#f0a020]">¥</span>
+              <span class="shrink-0 text-sm line-clamp-1">
+                <span class="text-[#f0a020]">¥</span>
                 <span class="text-base text-[#f0a020]">{{ item?.floorPrice }}</span>
-                <span class="text-sm text-[#999]">起</span>
+                <span class="text-black-9">起</span>
               </span>
             </div>
           </NuxtLink>

+ 14 - 13
src/pages/visa/visaList.vue

@@ -93,7 +93,7 @@
     <div class="w-full box-border px-16">
       <!-- 每一项签证的展示  -->
       <Empty v-if="!visaList?.length && !loading" title="暂无该签证数据" top="100" />
-      <!-- @load="getLoadList" -->
+      <!-- @load="getLoadList"  v-model:loading="loading"-->
       <van-list
         v-else-if="visaList.length"
         :finished="finished"
@@ -153,7 +153,7 @@
                 <span class="text-5xl font-semibold">
                   {{ item?.floorPrice ? item?.floorPrice : '????' }}
                 </span>
-                RMB 
+                起
               </p>
 
               <button
@@ -236,7 +236,7 @@
               </p>
               <p class="text-right text-sm font-semibold leading-2xl text-black-9">
                 <span class="text-base text-[#FF476A]">
-                  ¥ {{ item?.price ? item?.price : '????' }} RMB
+                  ¥ {{ item?.price ? item?.price : '????' }}
                 </span>
               </p>
@@ -359,12 +359,14 @@ watch(showItemType.value, () => {}, { deep: true })
 
 // 监听签证类型筛选框收起
 function onVisaFilterClose() {
+  // itemTypeRef.value.toggle()
   // visaTypeIndex.value = activeIndex.value
 }
 
 // 监听出签地筛选框收起
 function onVisaLocFilterClose() {
   // visaLocIndex.value = activeIndex2.value
+  // itemLocationRef.value.toggle()
 }
 
 const queryParams = reactive({
@@ -437,7 +439,7 @@ const handleCheckedVisaTypeChange = (parmas) => {
     visaTypeTitle.value = parmas.title
   }
   checkedVisaType.value = parmas.id
-  itemTypeRef.value.toggle()
+  itemTypeRef.value.toggle(false)
   showItemType.value = !showItemType.value
   document.title = parmas.title
   getVisaList()
@@ -459,7 +461,7 @@ const handleCheckedCitiesChange = (parmas) => {
   }
 
   checkedIssueVisaAddr.value = parmas.code
-  itemLocationRef.value.toggle()
+  itemLocationRef.value.toggle(false)
   showItemLocation.value = !showItemLocation.value
   document.title = parmas.name
   getVisaList()
@@ -485,7 +487,6 @@ async function getVisaTypeList() {
 // 获取签证列表
 async function getVisaList() {
   try {
-    loading.value = true
     let url = `/website/tourism/visa/list/page`
     let data = {}
 
@@ -496,7 +497,7 @@ async function getVisaList() {
     if (checkedIssueVisaAddr.value != 0) {
       data.issueVisaCode = checkedIssueVisaAddr?.value
     }
-
+    loading.value = true
     let {
       data: { dataList, totalCount }
     } = await request(url, {
@@ -511,19 +512,18 @@ async function getVisaList() {
     } else {
       visaList.value = []
     }
+
     loading.value = false
 
     if (totalCount <= visaList.value.length) {
-      finished.value = false
-    } else {
-      finished.value = false
+      finished.value = true
     }
   } catch (err) {}
 }
 
 // 获取筛选签证列表
-async function getLoadList() {
-  queryParams.pageNum += 1
+function getLoadList() {
+  queryParams.pageNum++
   getVisaList()
 }
 
@@ -576,6 +576,7 @@ watch(
   () => queryParams.pageNum,
   () => getVisaList()
 )
+
 watch(searchString, (newValue, oldValue) => {
   searchString.value = newValue
   if (newValue) {
@@ -610,7 +611,7 @@ onMounted(() => {
   getCounselorQr()
 
   // getCountryList()
-  getVisaList()
+  // getVisaList()
 })
 
 useSeoMeta({