Просмотр исходного кода

🎨 按要求修改村社页显示文字和图片

快乐的梦鱼 недель назад: 2
Родитель
Сommit
3cdb08ace1

+ 1 - 1
src/pages/dig/index.vue

@@ -2,7 +2,7 @@
   <FlexCol>
     <Image 
       mode="aspectFill" 
-      src="https://mn.wenlvti.net/app_static/xiangyuan/images/dig/banner_dig_index.png"
+      src="https://mn.wenlvti.net/app_static/xiangyuan/images/dig/banner_dig_index.jpg"
       width="100%"
     />
     <FlexCol :padding="30">

+ 11 - 1
src/pages/home/light/details.vue

@@ -1,7 +1,16 @@
 <template>
   <SimplePageContentLoader :loader="contentLoader">
     <FlexCol v-if="contentLoader.loadStatus.value == 'finished'">
+      <Image 
+        v-if="data.images.length == 0"
+        src="https://mn.wenlvti.net/app_static/xiangyuan/images/dig/banner_dig_index.jpg" 
+        :radius="20"
+        :height="500"
+        :width="750"
+        mode="aspectFill"
+      />
       <swiper 
+        v-else
         circular
         :indicator-dots="false"
         :autoplay="true"
@@ -18,6 +27,7 @@
             :radius="20"
             :height="500"
             :width="750"
+            defaultImage="https://mn.wenlvti.net/app_static/xiangyuan/images/dig/banner_dig_index.jpg"
             mode="aspectFill"
             touchable
             @click="onPreviewImage(k as number)"
@@ -49,7 +59,7 @@
           />
           <FlexCol :margin="[20, 0, 0, 0]">
             <Parse :content="data.overview" />
-            <Text v-if="!data.overview" fontConfig="subText">无内容,请添加内容! </Text>
+            <Text v-if="!data.overview" fontConfig="subText">村社暂无介绍,欢迎点亮成为志愿者,贡献村社文化</Text>
           </FlexCol>
         </FlexCol>
 

+ 9 - 5
src/pages/home/light/form/claim.ts

@@ -7,6 +7,7 @@ import type { RuleItem } from 'async-validator';
 import type { Ref } from 'vue';
 import type { VolunteerInfo } from '@/api/inhert/VillageApi';
 import { VillageClaimInfo } from '@/api/inhert/VillageApi';
+import { waitTimeOut } from '@imengyu/imengyu-utils';
 
 function hasClaimType(formRef: Ref<IDynamicFormRef | undefined>, value: string) {
   const type = formRef.value?.getValueByPath('type');
@@ -56,11 +57,14 @@ export function getClaimVillageForm(options: {
               multiple: true,
               vertical: true,
               useCell: true,
-              loadData: async () => [
-                { text: '村民', value: 'villager' },
-                { text: '志愿者', value: 'volunteer' },
-                { text: '管理人员', value: 'staff' },
-              ],
+              loadData: async () => {
+                await waitTimeOut(200);
+                return [
+                  { text: '村民', value: 'villager' },
+                  { text: '志愿者', value: 'volunteer' },
+                  { text: '管理人员', value: 'staff' },
+                ]
+              },
             } as CheckBoxListProps,
             rules: [{ required: true, message: '请选择认领类型' }],
           },

+ 12 - 1
src/pages/home/village/details.vue

@@ -1,7 +1,16 @@
 <template>
   <SimplePageContentLoader :loader="contentLoader">
     <FlexCol v-if="contentLoader.loadStatus.value == 'finished'">
+      <Image 
+        v-if="data.images.length == 0"
+        src="https://mn.wenlvti.net/app_static/xiangyuan/images/dig/banner_dig_index.jpg" 
+        :radius="20"
+        :height="500"
+        :width="750"
+        mode="aspectFill"
+      />
       <swiper 
+        v-else
         circular
         :indicator-dots="false"
         :autoplay="true"
@@ -18,6 +27,8 @@
             :radius="20"
             :height="500"
             :width="750"
+            defaultImage="https://mn.wenlvti.net/app_static/xiangyuan/images/dig/banner_dig_index.jpg"
+            errorImage="https://mn.wenlvti.net/app_static/xiangyuan/images/dig/banner_dig_index.jpg"
             mode="aspectFill"
             touchable
             @click="onPreviewImage(k as number)"
@@ -49,7 +60,7 @@
           />
           <FlexCol :margin="[20, 0, 0, 0]">
             <Parse :content="data.overview" />
-            <Text v-if="!data.overview" fontConfig="subText">无内容,请添加内容! </Text>
+            <Text v-if="!data.overview" fontConfig="subText">村社暂无介绍,欢迎点亮成为志愿者,贡献村社文化! </Text>
           </FlexCol>
         </FlexCol>