Преглед на файлове

修改志愿图片显示

shmily1213 преди 2 седмици
родител
ревизия
933293851d

+ 5 - 1
src/pagesMain/pages/volunteer/components/volunteer-banner-item.vue

@@ -7,7 +7,7 @@
                 {{ desc }}
             </view>
         </view>
-        <ie-image :src="bgSrc" is-oss custom-class="w-full"/>
+        <ie-image :src="bgSrc" is-oss :custom-class="`w-full ${customClass}`" mode="widthFix" />
     </view>
 </template>
 
@@ -28,6 +28,10 @@ defineProps({
     bgSrc: {
         type: String,
         default: ''
+    },
+    customClass: {
+        type: String,
+        default: ''
     }
 })
 defineEmits(['click'])

+ 3 - 3
src/pagesMain/pages/volunteer/components/volunteer-banner.vue

@@ -1,12 +1,12 @@
 <template>
     <view class="px-28 flex gap-18">
         <volunteer-banner-item title="测录取概率" desc="院校录取风险评估" desc-bg-color="#A8F496"
-                               bg-src="/volunteer/index/banner_rate.png" class="flex-1" @click="goRateCalc"/>
+                               bg-src="/volunteer/index/banner_rate.png" class="flex-1" custom-class="h-342" @click="goRateCalc"/>
         <view class="flex-1 flex flex-col justify-between">
             <volunteer-banner-item title="测技能分" desc="精准定位" desc-bg-color="#F8ECA6"
-                                   bg-src="/volunteer/index/banner_skill.png" @click="goSkillCalc"/>
+                                   bg-src="/volunteer/index/banner_skill.png" custom-class="h-162" @click="goSkillCalc"/>
             <volunteer-banner-item title="志愿表" desc="我的报考意向" desc-bg-color="#DDD6FF"
-                                   bg-src="/volunteer/index/banner_list.png" @click="goVoluntaryList"/>
+                                   bg-src="/volunteer/index/banner_list.png" custom-class="h-162" @click="goVoluntaryList"/>
         </view>
     </view>
 </template>

+ 1 - 1
src/pagesMain/pages/volunteer/components/volunteer-menu-item.vue

@@ -1,6 +1,6 @@
 <template>
     <view class="w-92 flex flex-col items-center gap-8" @click="$emit('click')">
-        <ie-image is-oss :src="icon" custom-class="w-92"/>
+        <ie-image is-oss :src="icon" custom-class="w-92 h-92" />
         <text class="keep-all whitespace-nowrap text-xs text-fore-title">{{ title }}</text>
     </view>
 </template>

+ 1 - 1
src/pagesMain/pages/volunteer/components/volunteer-policy-item.vue

@@ -5,7 +5,7 @@
             <view class="mt-5 text-nowrap text-3xs text-fore-tip">{{desc}}</view>
         </view>
         <view/>
-        <ie-image is-oss :src="icon" custom-class="w-108" />
+        <ie-image is-oss :src="icon" custom-class="w-108 h-88" />
     </view>
 </template>
 

+ 1 - 1
src/pagesMain/pages/volunteer/components/volunteer-tier-item.vue

@@ -3,7 +3,7 @@
           :style="{ background: `radial-gradient( 0% 0% at 0% 0%, ${data.colorFrom} 0%, ${data.colorTo} 100%)` }">
         <view class="h-90 px-30 flex justify-between items-center">
             <view class="flex items-center">
-                <ie-image is-oss :src="data.icon" custom-class="w-48"/>
+                <ie-image is-oss :src="data.icon" custom-class="w-48 h-48"/>
                 <text class="ml-8 text-base font-bold" :style="{color:data.colorText}">{{ data.typeName }}</text>
             </view>
             <view class="text-sm text-fore-light flex items-center">

+ 3 - 0
src/pagesMain/pages/volunteer/volunteer.vue

@@ -45,6 +45,9 @@ const {baseStickyTop} = useNavbar();
 const examTypeName = computed(() => {
     return dictStore.getDictLabel(EnumDictName.EXAM_TYPE, userStore.getExamType)
 })
+
+// 为了让子组件触发页面滚动
+onPageScroll(() => { })
 </script>
 
 <style lang="scss" scoped></style>

+ 5 - 2
src/pagesOther/pages/voluntary/index/components/voluntary-form-major.vue

@@ -1,6 +1,6 @@
 <template>
-    <view class="mt-24 p-28 flex items-center gap-24 bg-back-light rounded-xl">
-        <ie-image :src="data.universityLogo" custom-class="w-80"/>
+    <view class="mt-24 p-28 flex items-center gap-24 bg-back-light rounded-10" :class="props.customClass">
+        <ie-image :src="data.universityLogo" custom-class="w-80 h-80"/>
         <view class="flex-1">
             <view class="text-28 text-fore-title font-bold">{{ data.universityName }}</view>
             <view class="flex items-center gap-8">
@@ -19,6 +19,9 @@
 import {VOLUNTARY_FORM} from "@/types/injectionSymbols";
 import {SelectedCollegeMajorWithRules} from "@/types/voluntary";
 
+const props = defineProps<{
+    customClass?: string;
+}>();
 const data = inject(VOLUNTARY_FORM) || {} as SelectedCollegeMajorWithRules
 </script>
 

+ 5 - 2
src/pagesOther/pages/voluntary/index/index.vue

@@ -4,7 +4,7 @@
         <!-- #ifdef MP-WEIXIN -->
         <view class="h-90 bg-gradient-to-r from-white to-cyan-100"/>
         <!-- #endif -->
-        <ie-image is-oss src="/volunteer/voluntary/index/banner.png"/>
+        <ie-image is-oss src="/volunteer/voluntary/index/banner.png" custom-class="w-full h-483"/>
         <view class="mx-30 -mt-180 z-1 bg-white rounded-xl p-35">
             <view class="flex justify-between items-center">
                 <view class="text-lg text-fore-title">报考院校专业</view>
@@ -41,7 +41,7 @@ const model = ref<VoluntaryModel>({})
 const {transferTo} = useTransferPage<any, VoluntaryDto>()
 
 const handleSubmit = async () => {
-    await form.value.validate()
+    await form.value?.validate()
     const bigData = {data: data.value, model: model.value}
     transferTo(routes.voluntaryResult, {bigData})
 }
@@ -123,6 +123,9 @@ onMounted(async () => {
 
 provide(VOLUNTARY_FORM, data)
 provide(VOLUNTARY_MODEL, model)
+
+// 为了让子组件触发页面滚动
+onPageScroll(() => { })
 </script>
 
 <style lang="scss">

+ 7 - 8
src/pagesOther/pages/voluntary/result/components/plus/voluntary-result-progress.vue

@@ -13,15 +13,14 @@
 
 <script setup lang="ts" name="VoluntaryResultProgress">
 
-// import {VoluntaryScoreItem} from "@/types/voluntary";
+import {VoluntaryScoreItem} from "@/types/voluntary";
 
-// const props = defineProps<VoluntaryScoreItem>()
-const props = defineProps({
-    label: String,
-    score: Number,
-    total: Number,
-    labelWidth: String,
-    scoreWidth: String
+const props = withDefaults(defineProps<VoluntaryScoreItem>(), {
+    label: '',
+    score: 0,
+    total: 0,
+    labelWidth: '',
+    scoreWidth: ''
 })
 
 const progress = computed(() => props.total && props.score ? props.score * 100 / props.total : 0)

+ 4 - 2
src/pagesOther/pages/voluntary/result/result.vue

@@ -4,9 +4,9 @@
         <!-- #ifdef MP-WEIXIN -->
         <view class="h-90" style="background: linear-gradient(to Right, rgba(100, 200, 255, 1), rgba(165, 229, 255, 0.87))"/>
         <!-- #endif -->
-        <ie-image is-oss src="/volunteer/voluntary/result/banner.png"/>
+        <ie-image is-oss src="/volunteer/voluntary/result/banner.png" custom-class="w-full h-483"/>
         <view class="px-30 flex flex-col gap-20 -mt-180 z-1">
-            <voluntary-form-major class="!bg-white !mt-0"/>
+            <voluntary-form-major custom-class="bg-white mt-0"/>
             <voluntary-result-analysis />
             <voluntary-result-score />
         </view>
@@ -37,6 +37,8 @@ const handleSubmit = async () => {
 
 provide(VOLUNTARY_FORM, data)
 provide(VOLUNTARY_MODEL, model)
+// 为了让子组件触发页面滚动
+onPageScroll(() => { })
 </script>
 
 <style lang="scss">