Bläddra i källkod

🎨 修改细节问题

快乐的梦鱼 2 veckor sedan
förälder
incheckning
d3dea866c6

+ 2 - 0
src/components/typography/HorizontalScrollText.vue

@@ -82,6 +82,8 @@ async function lodScrollInfo() {
       .exec();
   })
 
+  if (!realTextRef.value) return;
+
   let textWidth = await realTextRef.value.measureTextWidth();
   //console.log('textWidth', textWidth, 'conWidth', conWidth);
   

+ 27 - 30
src/pages/home/discover/index.vue

@@ -19,18 +19,18 @@
       GridItemPaddingHorizontal: 0,
     }">
       <Grid :borderGrid="false" :mainAxisCount="3">
-        <GridItem title="全部" icon="https://xy.wenlvti.net/app_static/images/discover/IconAll.png" touchable @click="goList('')" />
-        <GridItem title="优秀案例" icon="https://xy.wenlvti.net/app_static/images/discover/IconExamples.png" touchable @click="goList('环境格局')" />
-        <GridItem title="经验分享" icon="https://xy.wenlvti.net/app_static/images/discover/IconShare.png" touchable @click="goList('传统建筑')" />
-        <GridItem title="常见问题" icon="https://xy.wenlvti.net/app_static/images/discover/IconQuestions.png" touchable @click="goList('民俗文化')" />
-        <GridItem title="挖掘技巧" icon="https://xy.wenlvti.net/app_static/images/discover/IconTrick.png" touchable @click="goList('美食物产')" />
-        <GridItem title="认知基础" icon="https://xy.wenlvti.net/app_static/images/discover/IconBase.png" touchable @click="goList('历史人物')" />
+        <GridItem title="全部" icon="https://xy.wenlvti.net/app_static/images/discover/IconAll.png" touchable @click="goList(354, '知识库 · 全部')" />
+        <GridItem title="优秀案例" icon="https://xy.wenlvti.net/app_static/images/discover/IconExamples.png" touchable @click="goList(359, '知识库 · 优秀案例')" />
+        <GridItem title="经验分享" icon="https://xy.wenlvti.net/app_static/images/discover/IconShare.png" touchable @click="goList(358, '知识库 · 经验分享'  )" />
+        <GridItem title="常见问题" icon="https://xy.wenlvti.net/app_static/images/discover/IconQuestions.png" touchable @click="goList(357, '知识库 · 常见问题')" />
+        <GridItem title="挖掘技巧" icon="https://xy.wenlvti.net/app_static/images/discover/IconTrick.png" touchable @click="goList(356, '知识库 · 挖掘技巧')" />
+        <GridItem title="认知基础" icon="https://xy.wenlvti.net/app_static/images/discover/IconBase.png" touchable @click="goList(355, '知识库 · 认知基础')" />
       </Grid>
     </ProvideVar>
     
     <HomeTitle title="最新推荐" />
     <SimplePageContentLoader :loader="discoverLoader">
-      <FlexCol :gap="25" backgroundColor="background.tertiary" radius="radius.md" :padding="30">
+      <FlexCol :gap="25">
         <ImageBlock3 
           v-for="(item, i) in discoverLoader.content.value"
           :key="i"
@@ -41,7 +41,7 @@
           :imageRadius="15"
           :imageWidth="200"
           :imageHeight="140"
-          @click="goDetails(item)"
+          @click="goDetail(item)"
         />
       </FlexCol>
     </SimplePageContentLoader>
@@ -61,35 +61,32 @@ import Height from '@/components/layout/space/Height.vue';
 import ProvideVar from '@/components/theme/ProvideVar.vue';
 import Grid from '@/components/layout/grid/Grid.vue';
 import GridItem from '@/components/layout/grid/GridItem.vue';
-import VillageInfoApi from '@/api/inhert/VillageInfoApi';
-import Tag from '@/components/display/Tag.vue';
 import Image from '@/components/basic/Image.vue';
 import HomeLargeTitle from '@/common/components/parts/HomeLargeTitle.vue';
 import HomeTitle from '@/common/components/parts/HomeTitle.vue';
 import ImageBlock3 from '@/components/display/block/ImageBlock3.vue';
+import CommonContent, { GetContentListItem, GetContentListParams } from '@/api/CommonContent';
 
-function goList(keywords: string) {
-  navTo('/pages/home/discover/list', {
-    keywords,
-    title: keywords,
+const discoverLoader = useSimpleDataLoader(async () => {
+  return (await CommonContent.getContentList(new GetContentListParams()
+    .setModelId(18)
+    .setMainBodyColumnId(354)
+  , 1, 30)).list
+});
+
+function goDetail(item: GetContentListItem) {
+  navTo('/pages/article/details', {
+    modelId: item.modelId,
+    mainBodyColumnId: item.mainBodyColumnId,
+    id: item.id,
   });
 }
-function goDetails(item: any) {
-  navTo('/pages/home/discover/details', {
-    id: item.id,
-    collectModelId: item.collectModuleId,
-    collectModelInternalName: item.collectModuleInternalName,
+function goList(mainBodyColumnId: number|undefined, title: string, search?: string) {
+  navTo('/pages/article/common/list', {
+    modelId: 18,
+    mainBodyColumnId,
+    title,
+    search: search || '',
   });
 }
-
-const discoverLoader = useSimpleDataLoader(async () => {
-  return (await VillageInfoApi.getListForDiscover(1, 30)).list.map((item) => {
-    return {
-      ...item,
-      image: (item.thumbnail || item.image) as string,
-      desc: item.desc || '',
-      title: item.title,
-    }
-  })
-});
 </script>

+ 2 - 3
src/pages/user/index.vue

@@ -17,14 +17,13 @@
           :failedImage="UserHead"
           mode="aspectFill" 
           class="avatar" 
-          width="100rpx"
-          height="100rpx"
+          width="75rpx"
+          height="75rpx" 
           :showFailed="false"
           round
         />
         <H4 v-if="userInfo">{{ userInfo.nickname }}</H4>
         <H4 v-else>欢迎登录</H4>
-        <H4 v-if="userInfo">{{ userInfo.mobile }}</H4>
       </FlexRow>
       <Icon icon="arrow-right" size="30" />
     </Touchable>