shmily1213 1 месяц назад
Родитель
Сommit
9cab46e7e2

+ 0 - 1
.eslintrc-auto-import.json

@@ -19,7 +19,6 @@
     "WritableComputedRef": true,
     "acceptHMRUpdate": true,
     "computed": true,
-    "createApp": true,
     "createPinia": true,
     "customRef": true,
     "defineAsyncComponent": true,

+ 1 - 0
.gitignore

@@ -68,3 +68,4 @@ package-lock.json
 *bak
 .vscode
 dist
+.hbuilderx

+ 8 - 6
src/pagesOther/pages/career/detail/components/related-jobs.vue

@@ -83,12 +83,14 @@ const customStyle = {
 watch(() => props.name, (newVal) => {
   if (newVal) {
     const index = list.value.findIndex(item => item.name === newVal);
-    getJobDetail(index);
-    setTimeout(() => {
-      nextTick(() => {
-        current.value = index;
-      });
-    }, 350);
+    if (index !== -1) {
+      getJobDetail(index);
+      setTimeout(() => {
+        nextTick(() => {
+          current.value = index;
+        });
+      }, 350);
+    }
   }
 });
 

+ 3 - 1
src/pagesOther/pages/university/detail/detail.vue

@@ -2,7 +2,9 @@
   <ie-page>
     <ie-navbar :title="prevData.name" transparent bg-color="#FFFFFF" title-color="black" keep-title-color />
     <uv-skeletons v-if="loading" :skeleton="skeleton" />
-    <ie-image v-else :src="baseInfo.bannerUrl || baseInfo.logo" custom-class="w-full h-[240px]" mode="aspectFill" />
+    <view v-else class="w-full h-[240px]">
+      <ie-image :src="baseInfo.bannerUrl || baseInfo.logo" custom-class="w-full h-full" mode="aspectFill" />
+    </view>
     <view class="-mt-60 z-1 rounded-t-3xl p-30 bg-white">
       <college-info :info="baseInfo" :loading="loading" />
     </view>

+ 29 - 32
src/pagesOther/pages/voluntary/result/components/voluntary-result-compare.vue

@@ -1,46 +1,43 @@
 <template>
-    <view class="p-28 bg-white rounded-xl">
-        <voluntary-result-title title="专业报录比">
-            <template #right>
-                <ie-picker v-model="year" :list="years" icon="arrow-down" width="" color="text-primary"
-                           icon-color="primary"/>
-            </template>
-        </voluntary-result-title>
-        <view class="pt-28 px-100 flex justify-between items-center">
-            <view class="flex flex-col items-center gap-18">
-                <view class="px-25 py-10 bg-primary text-white font-bold text-28 rounded">报考人数</view>
-                <view class="text-60 text-fore-title">{{currentHistory.application||'-'}}</view>
-            </view>
-            <view class="flex flex-col items-center gap-18">
-                <view class="h-48"></view>
-                <view class="text-60 text-fore-title">:</view>
-            </view>
-            <view class="flex flex-col items-center gap-18">
-                <view class="px-25 py-10 bg-primary text-white font-bold text-28 rounded">计划人数</view>
-                <view class="text-60 text-fore-title">{{currentHistory.admission||'-'}}</view>
-            </view>
-        </view>
+  <view class="p-28 bg-white rounded-xl">
+    <voluntary-result-title title="专业报录比">
+      <template #right>
+        <ie-picker v-model="year" :list="years" icon="arrow-down" width="" color="text-primary" icon-color="primary" />
+      </template>
+    </voluntary-result-title>
+    <view class="pt-28 px-100 flex justify-between items-center">
+      <view class="flex flex-col items-center gap-18">
+        <view class="px-25 py-10 bg-primary text-white font-bold text-28 rounded">报考比例</view>
+        <view class="text-60 text-fore-title">{{ currentHistory.application || '-' }}</view>
+      </view>
+      <view class="flex flex-col items-center gap-18">
+        <view class="h-48"></view>
+        <view class="text-60 text-fore-title">:</view>
+      </view>
+      <view class="flex flex-col items-center gap-18">
+        <view class="px-25 py-10 bg-primary text-white font-bold text-28 rounded">计划比例</view>
+        <view class="text-60 text-fore-title">{{ currentHistory.admission || '-' }}</view>
+      </view>
     </view>
+  </view>
 </template>
 
 <script setup lang="ts">
 import VoluntaryResultTitle from "@/pagesOther/pages/voluntary/result/components/plus/voluntary-result-title.vue";
-import {VOLUNTARY_RESULT} from "@/types/injectionSymbols";
-import {VoluntaryResult} from "@/types/voluntary";
+import { VOLUNTARY_RESULT } from "@/types/injectionSymbols";
+import type { VoluntaryResult, VoluntaryResultHistory } from "@/types/voluntary";
 
 const result = inject(VOLUNTARY_RESULT) || ref({} as VoluntaryResult)
 const historyList = computed(() => result?.value.histories || [])
-const years = computed(() => historyList.value.map(h => ({label: h.year + '年', value: h.year})))
+const years = computed(() => historyList.value.map(h => ({ label: h.year + '年', value: h.year })))
 const year = ref<string | number>('')
-const currentHistory = computed(() => historyList.value.find(h => h.year == year.value) || {})
+const currentHistory = computed(() => historyList.value.find(h => h.year == year.value) || {} as VoluntaryResultHistory)
 
 watch(historyList, (list) => {
-    if (list.length) {
-        year.value = list[0].year
-    }
-}, {immediate: true})
+  if (list.length) {
+    year.value = list[0].year
+  }
+}, { immediate: true })
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>

+ 1 - 1
vite.config.js

@@ -48,7 +48,7 @@ export default defineConfig(({ mode }) => ({
         'uni-app',
         'pinia'
       ],
-      exclude: ['createApp'],
+      ignore: ['createApp', 'h5'],
       eslintrc: {
         enabled: true
       }