Explorar el Código

修改细节问题

快乐的梦鱼 hace 1 mes
padre
commit
2da0b026ae

+ 7 - 0
src/pages/article/common/CommonContent.ts

@@ -15,14 +15,17 @@ export interface IHomePageMiniCommonListGoMoreAndGoDetail {
  */
 export function useHomePageMiniCommonListGoMoreAndGoDetail(p: {
   title?: string,
+  mainBodyId?: number,
   mainBodyColumnId?: number|number[],
   modelId?: number,
+  villageId?: number,
   itemType?: string,
   detailsPage: string,
   count?: number,
 }) : IHomePageMiniCommonListGoMoreAndGoDetail {
   function goDetail(id: number) {
     navTo(p.detailsPage, {
+      mainBodyId: p.mainBodyId,
       mainBodyColumnId: p.mainBodyColumnId,
       modelId: p.modelId,
       id,
@@ -31,9 +34,11 @@ export function useHomePageMiniCommonListGoMoreAndGoDetail(p: {
   function goList() {
     navTo('/pages/article/common/list', {
       title: p.title,
+      mainBodyId: p.mainBodyId,
       mainBodyColumnId: typeof p.mainBodyColumnId == 'object' ? 
         p.mainBodyColumnId.join(',') : 
         p.mainBodyColumnId,
+      villageId: p.villageId,
       modelId: p.modelId,
       itemType: p.itemType,
       detailsPage: p.detailsPage,
@@ -42,6 +47,8 @@ export function useHomePageMiniCommonListGoMoreAndGoDetail(p: {
 
   const loader = useSimpleDataLoader(async () => 
     (await CommonContent.getContentList(new GetContentListParams().setSelfValues({
+      villageId: p.villageId,
+      mainBodyId: p.mainBodyId,
       mainBodyColumnId: p.mainBodyColumnId,
       modelId: p.modelId,
     }), 1, p.count ?? 4)).list

+ 5 - 0
src/pages/article/common/list.vue

@@ -5,6 +5,7 @@
     :itemType="querys.itemType as any || undefined"
     :detailsPage="querys.detailsPage || undefined"
     :detailsParams="{
+      mainBodyId: querys.mainBodyId || undefined,
       mainBodyColumnId: querys.mainBodyColumnId || undefined,
       modelId: querys.modelId || undefined,
     }"
@@ -18,6 +19,8 @@ import CommonListPage from './CommonListPage.vue';
 import CommonContent, { GetContentListParams } from '@/api/CommonContent';
 
 const { querys } = useLoadQuerys({
+  villageId: 0,
+  mainBodyId: 0,
   mainBodyColumnId: '',
   modelId: 0,
   itemType: '',
@@ -36,6 +39,8 @@ async function loadData(
   const mainBodyColumnId = stringDotNumbersToNumbers(querys.value.mainBodyColumnId);
 
   const res = await CommonContent.getContentList(new GetContentListParams().setSelfValues({
+    villageId: querys.value.villageId || undefined,
+    mainBodyId: querys.value.mainBodyId || undefined,
     mainBodyColumnId: mainBodyColumnId || undefined,
     modelId: querys.value.modelId || undefined,
     keywords: searchText,

+ 6 - 1
src/pages/article/details.vue

@@ -114,6 +114,9 @@ const recommendListLoader = useSimpleDataLoader(async () => {
   return (await CommonContent.getContentList(new GetContentListParams()
     .setModelId(querys.value.modelId)
     .setMainBodyColumnId(querys.value.mainBodyColumnId)
+    .setSelfValues({
+      mainBodyId: querys.value.mainBodyId,
+    })
   , 1, 10)).list.filter((p) => p.id !== querys.value.id);
 });
 
@@ -122,13 +125,15 @@ function goDetails(id: number) {
   navTo('/pages/article/details', { 
     id, 
     mainBodyColumnId: querys.value.mainBodyColumnId, 
-    modelId: querys.value.modelId 
+    modelId: querys.value.modelId,
+    mainBodyId: querys.value.mainBodyId,
   });
 }
 
 const { querys } = useLoadQuerys({ 
   id: 0,
   mainBodyColumnId: 0,
+  mainBodyId: 0,
   modelId: 0,
 }, (t) => loader.loadData(t));
 

+ 8 - 2
src/pages/home/village/details.vue

@@ -86,12 +86,13 @@
               v-if="data.address"
               :title="data.address"
               touchable
+              direction="column"
               :padding="20"
               @click="goAddress"
             >
               <IconTextBlock 
                 icon="map-filling"
-                :iconProps="{ size: 27 }"
+                :iconProps="{ size: 30 }"
                 :title="data.address"
                 extra="去这里"
                 :extraProps="{
@@ -148,7 +149,6 @@ import FlexCol from '@/components/layout/FlexCol.vue';
 import Image from '@/components/basic/Image.vue';
 import Text from '@/components/basic/Text.vue';
 import FlexRow from '@/components/layout/FlexRow.vue';
-import Cell from '@/components/basic/Cell.vue';
 import Touchable from '@/components/feedback/Touchable.vue';
 import Height from '@/components/layout/space/Height.vue';
 import IconTextBlock from '@/components/display/block/IconTextBlock.vue';
@@ -158,7 +158,9 @@ const EmptyImage = 'https://mncdn.wenlvti.net/app_static/minnan/EmptyImage.png';
 interface TagDataItem {
   image: string, 
   title: string,
+  villageId?: number,
   modelId?: number,
+  mainBodyId?: number,
   mainBodyColumnId?: number,
 }
 interface TagDataRecommendItem extends TagDataItem, IHomePageMiniCommonListGoMoreAndGoDetail {
@@ -229,6 +231,8 @@ const contentLoader = useSimpleDataLoader(async () => {
       title: item.name,
       image: item.logo || EmptyImage,
       modelId: item.modelId as number,
+      villageId: item.villageId as number,
+      mainBodyId: item.mainBodyId as number,
       mainBodyColumnId: item.mainBodyColumnId as number,
     };
   });
@@ -238,6 +242,8 @@ const contentLoader = useSimpleDataLoader(async () => {
       ...t,
       ...(toRefs(useHomePageMiniCommonListGoMoreAndGoDetail({
         title: t.title,
+        villageId: t.villageId,
+        mainBodyId: t.mainBodyId,
         mainBodyColumnId: t.mainBodyColumnId,
         modelId: t.modelId,
         itemType: 'article-common',