Browse Source

🎨 修改细节问题

快乐的梦鱼 1 month ago
parent
commit
3c92685af6

+ 8 - 2
src/pages.json

@@ -19,9 +19,15 @@
       }
     },
     {
-      "path": "pages/introduction/character",
+      "path": "pages/introduction/character/list",
       "style": {
-        "navigationBarTitleText": "先贤列传"
+        "navigationBarTitleText": "历史人物列表"
+      }
+    },
+    {
+      "path": "pages/introduction/character/details",
+      "style": {
+        "navigationBarTitleText": "历史人物详情"
       }
     },
     {

+ 2 - 2
src/pages/home.vue

@@ -246,7 +246,7 @@ const subTabs = [
       detailsPage: '/pages/article/details',
     }) 
   },
-  { name: '历史人物', icon: MainBoxIcon3, onClick: () => navTo('/pages/introduction/character') },
+  { name: '历史人物', icon: MainBoxIcon3, onClick: () => navTo('/pages/introduction/character/list') },
   { 
     name: '民俗信俗', 
     icon: MainBoxIcon4, 
@@ -326,7 +326,7 @@ const indexAudioPlayer = useSimpleListAudioPlayer(async () => {
 })
 function handleGoAudioList() {
   navTo('/pages/article/common/list', {
-    title: '闽南原创歌曲',
+    title: '闽南',
     mainBodyColumnId: 313,
     modelId: 5,
     itemType: 'article-common',

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

@@ -100,11 +100,11 @@
           
           {
             label: '传承项目',
-            value: content.associationMeList[0]?.title || '暂无',
+            value: content.associationMeList[0]?.title,
           }, 
           {
             label: '传承人级别',
-            value: content.levelText || '暂无',
+            value: content.levelText,
           }, 
           {
             label: '公布批次',

+ 74 - 0
src/pages/introduction/character/details.vue

@@ -0,0 +1,74 @@
+<template>
+  <DetailTabPage
+    :load="load"
+    :showHead="false"
+  >
+    <template #extraTabs="{ content, tabCurrentId }">
+    </template>
+    <template #title="{ content }">
+      <view class="d-flex flex-col">
+        <view class="d-flex flex-row justify-between">
+          <view class="d-flex flex-col">
+            <text class="size-lll font-bold color-text-content">{{ content.title }}</text>
+            <text class="size-base color-text-content-second mt-2">{{ content.birthplace || content.desc }}</text>
+            <RoundTags
+              :tags="content.tags"
+              :tags2="[
+                content.age as string,
+                content.nation as string
+              ]"
+            />
+          </view>
+          <image 
+            class="width-150 height-150 radius-base flex-shrink-0" 
+            :src="content.image" mode="aspectFill"
+          />
+        </view>
+      </view> 
+    </template>
+    <template #titleExtra="{ content }">
+      <IntroBlock
+        small
+        :descItems="[
+          {
+            label: '民族',
+            value: content.nation,
+          },
+          {
+            label: '性别',
+            value: content.gender == '1'? '男' : '女', 
+          },
+          {
+            label: '出生日期',
+            value: content.dateBirth,
+          }, 
+          {
+            label: '出生地区',
+            value: content.birthplace,
+          },
+          {
+            label: '传承项目',
+            value: content.associationMeList[0]?.title,
+          }, 
+          {
+            label: '公布批次',
+            value: content.batchText,
+          },
+        ]"
+      />
+    </template>
+  </DetailTabPage>
+</template>
+<script setup lang="ts">
+import type { TabControlItem } from "@/common/composeabe/TabControl";
+import type { Ref } from "vue";
+import RoundTags from "@/pages/parts/RoundTags.vue";
+import InheritorContent from "@/api/inheritor/InheritorContent";
+import IntroBlock from "@/pages/article/common/IntroBlock.vue";
+import DetailTabPage from "@/pages/article/common/DetailTabPage.vue";
+
+async function load(id: number, tabsArray: Ref<TabControlItem[]>) {
+  const d = await InheritorContent.getContentDetail(id);
+  return d;
+}
+</script>

+ 1 - 1
src/pages/introduction/character.vue

@@ -5,7 +5,7 @@
     :dropDownNames="[]"
     itemType="article-character"
     showTotal
-    detailsPage="/pages/inhert/inheritor/details"
+    detailsPage="/pages/introduction/character/details"
     :load="loadData"
   />
 </template>