Sfoglia il codice sorgente

🎨 按要求修改问题

快乐的梦鱼 1 settimana fa
parent
commit
e56b286c6a

+ 1 - 1
src/common/scss/global/color.scss

@@ -11,7 +11,7 @@
 .color {
 	@each $key, $color in $colors {
 		&-#{''+$key} {
-			color: $color;
+			color: $color!important;
 		}
 	}
 }

+ 0 - 8
src/common/style/commonParserStyle.ts

@@ -1,8 +0,0 @@
-export default {
-  p: 'line-height:1.76;font-size:28rpx;margin-bottom:37rpx;color:#111111;text-align:justify;',
-  div: 'line-height:1.76;font-size:28rpx;margin-bottom:37rpx;color:#111111;text-align:justify;',
-  img: 'display:block;max-width:100%;height:auto;margin-bottom:28rpx;',
-  h2:'margin-bottom:30rpx;font-size:32rpx;line-height:1.7;',
-  h1:'margin-bottom:30rpx;font-size:36rpx;line-height:1.7;',
-  h3:'margin-bottom:30rpx;font-size:30rpx;line-height:1.7;',
-} as Record<string, string>;

+ 11 - 1
src/components/nav/NavBar.vue

@@ -1,6 +1,6 @@
 <template>
   <view 
-    class="nana-nav-title"
+    :class="['nana-nav-title', innerClass]"
     :style="{
       backgroundColor: theme.resolveThemeColor(backgroundColor),
       height: theme.resolveThemeSize(height),
@@ -33,6 +33,7 @@
           paddingLeft: 0,
           paddingRight: 0,
         }"
+        :innerClass="titleClass"
         :color="textColor"
         :textAlign="align"
         :text="title"
@@ -44,6 +45,7 @@
           ...props.titleStyle,
           flex: 1,
         }"
+        :innerClass="titleClass"
         :textAlign="align"
         :color="textColor"
         :text="title"
@@ -139,6 +141,10 @@ export interface NavBarProps {
    */
   titleStyle?: object;
   /**
+   * 自定义标题文字样式
+   */
+  titleClass?: any;
+  /**
    * 标题文字超出时,是否自动滚动
    * @default true
    */
@@ -147,6 +153,10 @@ export interface NavBarProps {
    * 图标透传样式
    */
   iconProps?: IconProps;
+  /**
+   * 自定义类名
+   */
+  innerClass?: any;
 }
 
 function getButton(type: NavBarButtonTypes) {

+ 2 - 1
src/pages.json

@@ -234,7 +234,8 @@
     {
       "path": "pages/article/details",
       "style": {
-        "navigationBarTitleText": "新闻详情"
+        "navigationBarTitleText": "新闻详情",
+        "navigationStyle": "custom"
       }
     },
     {

+ 0 - 3
src/pages/article/common/DetailTabPage.vue

@@ -46,12 +46,10 @@
               <Parse
                 v-if="loader.content.value.intro"
                 :content="loader.content.value.intro"
-                :tagStyle="commonParserStyle"
               />
               <Parse
                 v-if="loader.content.value.content"
                 :content="loader.content.value.content"
-                :tagStyle="commonParserStyle"
               />
               <text v-if="emptyContent">暂无简介</text>
             </template>
@@ -111,7 +109,6 @@ import SimplePageContentLoader from "@/common/components/SimplePageContentLoader
 import ImageGrid from "@/pages/parts/ImageGrid.vue";
 import ImageSwiper from "@/pages/parts/ImageSwiper.vue";
 import ContentNote from "@/pages/parts/ContentNote.vue";
-import commonParserStyle from "@/common/style/commonParserStyle";
 import { computed, type PropType, type Ref } from "vue";
 import Parse from "@/components/display/parse/Parse.vue";
 import Tabs from "@/components/nav/Tabs.vue";

+ 13 - 4
src/pages/article/details.vue

@@ -1,15 +1,21 @@
 <template>
-  <view class="d-flex flex-column bg-base pb-45">
+  <FlexCol backgroundColor="background.page">
+    <FlexCol position="absolute" :top="0" :left="0" :right="0" :zIndex="100">
+      <StatusBarSpace backgroundColor="transparent" />
+      <NavBar leftButton="back" :iconProps="{ color: 'white' }" textColor="white" />
+    </FlexCol>
     <SimplePageContentLoader :loader="loader">
       <template v-if="loader.content.value">
         <view class="d-flex flex-col">
           <ImageSwiper 
             v-if="loader.content.value.images.length > 0"
             :images="loader.content.value.images"
+            height="500rpx"
           />
           <Image 
             v-else-if="loader.content.value.image"
             width="100%"
+            height="500rpx"
             :radius="15"
             :src="loader.content.value.image"
             :defaultImage="AppCofig.defaultImage"
@@ -37,7 +43,6 @@
             <Parse
               v-if="loader.content.value.content"
               :content="loader.content.value.content"
-              :tagStyle="commonParserStyle"
             />
             <text v-if="emptyContent">暂无简介</text>
           </view>
@@ -67,7 +72,8 @@
         </view>
       </template>
     </SimplePageContentLoader>
-  </view>
+    <Footer text="到底了~" />
+  </FlexCol>
 </template>
 
 <script setup lang="ts">
@@ -78,7 +84,6 @@ import { useSimplePageContentLoader } from "@/common/composeabe/SimplePageConten
 import { useSwiperImagePreview } from "@/common/composeabe/SwiperImagePreview";
 import { useLoadQuerys } from "@/common/composeabe/LoadQuerys";
 import NewsIndexContent from "@/api/news/NewsIndexContent";
-import commonParserStyle from "@/common/style/commonParserStyle";
 import SimplePageContentLoader from "@/common/components/SimplePageContentLoader.vue";
 import ContentNote from "../parts/ContentNote.vue";
 import Parse from "@/components/display/parse/Parse.vue";
@@ -99,6 +104,10 @@ import IconWord from '@/components/images/files/word.png';
 import IconPdf from '@/components/images/files/pdf.png';
 import { StringUtils } from "@imengyu/imengyu-utils";
 import Icon from "@/components/basic/Icon.vue";
+import FlexCol from "@/components/layout/FlexCol.vue";
+import Footer from "@/components/display/Footer.vue";
+import NavBar from "@/components/nav/NavBar.vue";
+import StatusBarSpace from "@/components/layout/space/StatusBarSpace.vue";
 
 const loader = useSimplePageContentLoader<
   GetContentDetailItem, 

+ 1 - 2
src/pages/article/editor/preview.vue

@@ -1,12 +1,11 @@
 <template>
   <Empty v-if="!content" image="default" description="空内容,请先编写内容后再预览" />
   <view v-else class="p-3">
-    <Parse :content="content" :tagStyle="commonParserStyle" />
+    <Parse :content="content" />
   </view>
 </template>
 
 <script setup lang="ts">
-import commonParserStyle from '@/common/style/commonParserStyle';
 import Parse from '@/components/display/parse/Parse.vue';
 import Empty from '@/components/feedback/Empty.vue';
 import { onLoad } from '@dcloudio/uni-app';

+ 7 - 10
src/pages/article/index.vue

@@ -1,16 +1,13 @@
 <template>
   <FlexCol>
     <StatusBarSpace backgroundColor="background.page" />
-    <NavBar leftButton="custom" backgroundColor="background.page">
-      <template #left>
-        <Image
-          src="https://mn.wenlvti.net/app_static/minnan/images/discover/Title.png"
-          mode="widthFix"
-          :width="110"
-          :innerStyle="{ marginLeft: '30rpx', marginTop: '30rpx' }"
-        />
-      </template>
-    </NavBar>
+    <NavBar 
+      title="闽南新鲜事" 
+      :titleScroll="false" 
+      titleClass="size-lll font-songti color-title-text" 
+      align="left" 
+      backgroundColor="background.page" 
+    />
     <News />
     <Height :height="140" />
     <Tabbar :current="1" />

+ 6 - 3
src/pages/home/index.vue

@@ -10,9 +10,12 @@
 
       <!-- 分栏 -->
       <view class="shadow-base radius-l bg-base p-3">
+        <!--
+          点击介绍
+          @click="navTo('introduction')"
+        -->
         <view 
           class="main-banner-box mb-25"
-          @click="navTo('introduction')"
         >
           <text class="title">世界闽南文化交流中心</text>
           <text>闽南文化生态保护区(厦门市)</text>
@@ -28,7 +31,7 @@
           <HomeButton
             title="常识一点通"
             icon="https://mncdn.wenlvti.net/app_static/minnan/images/home/IconMap.png"
-            :size="100"
+            :size="50"
             @click="navTo('/pages/introduction/explore')"
           />
           <HomeButton
@@ -58,7 +61,7 @@
           <HomeButton
             title="来厦门䢐迌"
             icon="https://mncdn.wenlvti.net/app_static/minnan/images/home/IconDiscover.png"
-            :size="100"
+            :size="50"
             @click="navTo('/pages/introduction/travel')"
           />
         </view>

+ 1 - 2
src/pages/home/introduction.vue

@@ -18,7 +18,7 @@
       <!-- 分栏 -->
       <view class="shadow-base radius-l bg-base p-3 size-base">
         <SimplePageContentLoader :loader="introdData">
-          <Parse :content="introdData.content.value" :tag-style="commonParserStyle"  />
+          <Parse :content="introdData.content.value" />
         </SimplePageContentLoader>
 
         <!--保护区建设历程-->
@@ -66,7 +66,6 @@ import SimplePageListLoader from '@/common/components/SimplePageListLoader.vue';
 import Box2LineImageRightShadow from '@/pages/parts/Box2LineImageRightShadow.vue';
 import NewsIndexContent from '@/api/news/NewsIndexContent';
 import Tabbar from '@/common/components/tabs/Tabbar.vue';
-import commonParserStyle from '@/common/style/commonParserStyle';
 import SimplePageContentLoader from '@/common/components/SimplePageContentLoader.vue';
 import { useSimplePageListLoader } from '@/common/composeabe/SimplePageListLoader';
 import { DataDateUtils } from '@imengyu/js-request-transform';

+ 3 - 4
src/pages/inhert/artifact/details.vue

@@ -41,15 +41,15 @@
       </template>
       <template v-if="tabCurrentId==TAB_ID_PROTECTED_AREA">
         <!-- 保护范围 -->
-        <Parse :content="content.protectedArea" :tagStyle="commonParserStyle" />
+        <Parse :content="content.protectedArea" />
       </template>
       <template v-if="tabCurrentId==TAB_ID_ENVIRONMENT">
         <!-- 建筑环境 -->
-        <Parse :content="content.environment" :tagStyle="commonParserStyle" />
+        <Parse :content="content.environment" />
       </template>
       <template v-if="tabCurrentId==TAB_ID_VALUE">
         <!-- 价值评估 -->
-        <Parse :content="content.value" :tagStyle="commonParserStyle" />
+        <Parse :content="content.value" />
       </template>
     </template>
     <template #titleEnd="{ content }">
@@ -96,7 +96,6 @@ import { useTabId, type TabControlItem } from "@/common/composeabe/TabControl";
 import { ref, type Ref } from "vue";
 import { navTo } from "@/components/utils/PageAction";
 import UnmoveableContent from "@/api/inheritor/UnmoveableContent";
-import commonParserStyle from "@/common/style/commonParserStyle";
 import IntroBlock from "@/pages/article/common/IntroBlock.vue";
 import DetailTabPage, { type DetailTabPageTabsArray } from "@/pages/article/common/DetailTabPage.vue";
 import { onShareTimeline, onShareAppMessage } from "@dcloudio/uni-app";

+ 1 - 2
src/pages/inhert/inheritor/details.vue

@@ -31,7 +31,7 @@
     <template #extraTabs="{ content, tabCurrentId }">
       <template v-if="tabCurrentId==TAB_ID_PRIZE">
         <!-- 荣誉奖项 -->
-        <Parse :content="content.prize" :tagStyle="commonParserStyle" />
+        <Parse :content="content.prize" />
       </template>
       <template v-else-if="tabCurrentId==TAB_ID_ASSOCIATION_ME">
         <!-- 非遗项目 -->
@@ -131,7 +131,6 @@ import { useTabId, type TabControlItem } from "@/common/composeabe/TabControl";
 import { ref, type Ref } from "vue";
 import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app';
 import RoundTags from "@/pages/parts/RoundTags.vue";
-import commonParserStyle from "@/common/style/commonParserStyle";
 import SeminarContent from "@/api/inheritor/SeminarContent";
 import InheritorContent from "@/api/inheritor/InheritorContent";
 import ProjectsContent from "@/api/inheritor/ProjectsContent";

+ 1 - 2
src/pages/inhert/intangible/DetailsCommon.vue

@@ -69,7 +69,7 @@
       <template v-else-if="tabCurrentId==TAB_ID_PEDIGREE">
         <!-- 传承谱系 -->
         <view class="d-flex flex-col mt-3 mb-2">
-          <Parse :content="content.pedigree" :tagStyle="commonParserStyle" />
+          <Parse :content="content.pedigree" />
         </view>
       </template>
       <template v-else-if="tabCurrentId==TAB_ID_WORKS">
@@ -229,7 +229,6 @@ import SeminarContent from "@/api/inheritor/SeminarContent";
 import ImagesUrls from "@/common/config/ImagesUrls";
 import Tag from "@/components/display/Tag.vue";
 import Parse from "@/components/display/parse/Parse.vue";
-import commonParserStyle from "@/common/style/commonParserStyle";
 
 defineProps({	
   commonRefName : {

+ 1 - 2
src/pages/inhert/village/details.vue

@@ -46,7 +46,7 @@
             ]"
           />
           <view class="mt-3 color-text-content">
-            <Parse :content="data.overview" :tagStyle="commonParserStyle" />
+            <Parse :content="data.overview" />
             <text v-if="!data.overview" >无内容,请添加内容! {{ data.overview }}</text>
           </view>
         </view>
@@ -114,7 +114,6 @@
 
 <script setup lang="ts">
 import VillageApi from '@/api/inhert/VillageApi';
-import commonParserStyle from '@/common/style/commonParserStyle';
 import SimplePageContentLoader from '@/common/components/SimplePageContentLoader.vue';
 import HomeTitle from '@/pages/parts/HomeTitle.vue';
 import Box2LineLargeImageUserShadow from '@/pages/parts/Box2LineLargeImageUserShadow.vue';

+ 2 - 2
src/pages/introduction/explore.vue

@@ -64,9 +64,9 @@ const categoryDefine : CategoryDefine[] = [
     type: '',
   },
   {
-    title: '常识一点通',
+    title: '闽南百问',
     content: useHomeCommonCategoryBlock({
-      title: '常识一点通',
+      title: '闽南百问',
       mainBodyColumnId: 320,
       modelId: 18,
       itemType: 'article-common',

+ 6 - 0
src/pages/parts/ImageSwiper.vue

@@ -2,6 +2,7 @@
   <swiper 
     class="image-swiper" 
     circular
+    :style="{ height: height }"
     :indicator-dots="true"
     :autoplay="true"
     :interval="2000"
@@ -12,6 +13,7 @@
         <Image
           :src="item"
           width="100%"
+          :height="height"
           :radius="15"
           mode="aspectFill"
           touchable
@@ -32,6 +34,10 @@ const props = defineProps({
     type: Array as PropType<string[]>,
     default: () => [],
   },
+  height: {
+    type: String,
+    default: '400rpx',
+  },
 })
 
 const { onPreviewImage } = useSwiperImagePreview(() => props.images || [])

+ 7 - 10
src/pages/travel/index.vue

@@ -1,16 +1,13 @@
 <template>
   <FlexCol>
     <StatusBarSpace backgroundColor="background.page" />
-    <NavBar leftButton="custom" backgroundColor="background.page">
-      <template #left>
-        <Image
-          src="https://mn.wenlvti.net/app_static/minnan/images/travel/TitleTravel.png"
-          mode="widthFix"
-          :width="110"
-          :innerStyle="{ marginLeft: '30rpx', marginTop: '30rpx' }"
-        />
-      </template>
-    </NavBar>
+    <NavBar 
+      title="来厦门䢐迌" 
+      :titleScroll="false" 
+      titleClass="size-lll font-songti color-title-text" 
+      align="left" 
+      backgroundColor="background.page" 
+    />
     <Travel />
     <Height :height="150" />
     <Tabbar :current="3" />

+ 1 - 2
src/pages/video/details.vue

@@ -28,7 +28,7 @@
             </view>
           </view>
           <view class="content radius-l bg-light p-3">
-            <Parse :content="loader.content.value.content" :tagStyle="commonParserStyle" />
+            <Parse :content="loader.content.value.content"/>
             <text v-if="emptyContent" class="size-s color-text-content-second">暂无简介</text>
           </view>
 
@@ -65,7 +65,6 @@
 import type { GetContentDetailItem } from "@/api/CommonContent";
 import { useSimplePageContentLoader } from "@/common/composeabe/SimplePageContentLoader";
 import NewsIndexContent from "@/api/news/NewsIndexContent";
-import commonParserStyle from "@/common/style/commonParserStyle";
 import SimplePageContentLoader from "@/common/components/SimplePageContentLoader.vue";
 import { useLoadQuerys } from "@/common/composeabe/LoadQuerys";
 import { DataDateUtils } from "@imengyu/js-request-transform";