ソースを参照

🎨 按要求修改问题

快乐的梦鱼 1 週間 前
コミット
881646013c

+ 10 - 0
src/api/research/DiscussContent.ts

@@ -0,0 +1,10 @@
+import { CommonContentApi } from '../CommonContent';
+
+export class DiscussContentApi extends CommonContentApi {
+
+  constructor() {
+    super(undefined, 19, "理论研讨", 266);
+  }
+}
+
+export default new DiscussContentApi();

+ 10 - 0
src/api/research/ExpertContent.ts

@@ -0,0 +1,10 @@
+import { CommonContentApi } from '../CommonContent';
+
+export class ExpertContentApi extends CommonContentApi {
+
+  constructor() {
+    super(undefined, 7, "专家学者", 263);
+  }
+}
+
+export default new ExpertContentApi();

+ 10 - 0
src/api/research/IndexTeamsContent.ts

@@ -0,0 +1,10 @@
+import { CommonContentApi } from '../CommonContent';
+
+export class IndexTeamsContentApi extends CommonContentApi {
+
+  constructor() {
+    super(undefined, 17, "研究团队", 264);
+  }
+}
+
+export default new IndexTeamsContentApi();

+ 10 - 0
src/api/research/InnovationContent.ts

@@ -0,0 +1,10 @@
+import { CommonContentApi } from '../CommonContent';
+
+export class InnovationContentApi extends CommonContentApi {
+
+  constructor() {
+    super(undefined, 18, "创新发展", 362);
+  }
+}
+
+export default new InnovationContentApi();

+ 10 - 0
src/api/research/ProjectContent.ts

@@ -0,0 +1,10 @@
+import { CommonContentApi } from '../CommonContent';
+
+export class ProjectContentApi extends CommonContentApi {
+
+  constructor() {
+    super(undefined, 19, "研究项目", 265);
+  }
+}
+
+export default new ProjectContentApi();

+ 10 - 0
src/api/research/ResultContent.ts

@@ -0,0 +1,10 @@
+import { CommonContentApi } from '../CommonContent';
+
+export class ResultContetApi extends CommonContentApi {
+
+  constructor() {
+    super(undefined, 19, "研究成果", 269);
+  }
+}
+
+export default new ResultContetApi();

+ 10 - 0
src/api/research/TeamsContent.ts

@@ -0,0 +1,10 @@
+import { CommonContentApi } from '../CommonContent';
+
+export class TeamsContentApi extends CommonContentApi {
+
+  constructor() {
+    super(undefined, 17, "研究团队", 264);
+  }
+}
+
+export default new TeamsContentApi();

+ 4 - 4
src/common/scss/define/size.scss

@@ -9,10 +9,10 @@ $font-sizes: (
   base: 30rpx,
   l: 32rpx,
   ll: 36rpx,
-  lll: 50rpx,
-  xl: 75rpx,
-  xxl: 100rpx,
-  xxxl: 150rpx,
+  lll: 44rpx,
+  xl: 55rpx,
+  xxl: 70rpx,
+  xxxl: 100rpx,
 );
 
 $image-sizes: (

+ 3 - 3
src/common/style/commonParserStyle.ts

@@ -1,7 +1,7 @@
 export default {
-  p: 'line-height:1.76;font-size:30rpx;margin-bottom:37rpx;color:#111111;text-align:justify;',
-  div: 'line-height:1.76;font-size:30rpx;margin-bottom:37rpx;color:#111111;text-align:justify;',
-  img: 'display:block;max-width:100%;height:auto;margin-bottom:30rpx;',
+  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;',

+ 12 - 0
src/pages.json

@@ -327,6 +327,18 @@
       "style": {
         "navigationBarTitleText": "投稿"
       }
+    },
+    {
+      "path": "pages/research/index",
+      "style": {
+        "navigationBarTitleText": "创新发展"
+      }
+    },
+    {
+      "path": "pages/document/details",
+      "style": {
+        "navigationBarTitleText": "文档详情"
+      }
     }
   ],
   "globalStyle": {

+ 44 - 0
src/pages/document/details.vue

@@ -0,0 +1,44 @@
+<template>
+  <web-view v-if="loader.content.value" :src="loader.content.value?.archives || ''"  />
+</template>
+
+<script setup lang="ts">
+import type { GetContentDetailItem } from "@/api/CommonContent";
+import { useSimplePageContentLoader } from "@/common/composeabe/SimplePageContentLoader";
+import { useLoadQuerys } from "@/common/composeabe/LoadQuerys";
+import { onShareAppMessage, onShareTimeline } from "@dcloudio/uni-app";
+import NewsIndexContent from "@/api/news/NewsIndexContent";
+
+const loader = useSimplePageContentLoader<
+  GetContentDetailItem, 
+  { id: number }
+>(async (params) => {
+  if (!params)
+    throw new Error("!params");
+  const res = await NewsIndexContent.getContentDetail(params.id);
+  uni.setNavigationBarTitle({ title: res.title });
+  return res;
+});
+
+function getPageShareData() {
+  if (!loader.content.value)
+    return { title: '文章详情', imageUrl: '' }
+  return {
+    title: loader.content.value.title,
+    imageUrl: loader.content.value.images[0],
+  }
+}
+onShareTimeline(() => {
+  return getPageShareData(); 
+})
+onShareAppMessage(() => {
+  return getPageShareData();
+})
+
+const { querys } = useLoadQuerys({ 
+  id: 0
+}, (t) => loader.loadData(t));
+</script>
+
+<style lang="scss">
+</style>

+ 15 - 11
src/pages/home/index.vue

@@ -26,17 +26,16 @@
           />
         </view>
         
-        <HomeButton
-          title="闽南百科"
-          icon="https://mncdn.wenlvti.net/app_static/minnan/images/home/IconMap.png"
-          bg="https://mncdn.wenlvti.net/app_static/minnan/images/home/ButtonMapBg.png"
-          large
-          @click="navTo('/pages/introduction/explore')"
-        />
-
         <view class="position-relative d-flex flex-row flex-wrap justify-between mt-25 row-gap-sss">
           <HomeButton
-            title="闽南资讯"
+            title="文化常识"
+            icon="https://mncdn.wenlvti.net/app_static/minnan/images/home/IconMap.png"
+            bg="https://mncdn.wenlvti.net/app_static/minnan/images/home/ButtonMapBg.png"
+            
+            @click="navTo('/pages/introduction/explore')"
+          />
+          <HomeButton
+            title="文化资讯"
             icon="https://mncdn.wenlvti.net/app_static/minnan/images/home/IconDoc.png"
             @click="navTo('/pages/introduction/news')"
           />
@@ -46,12 +45,17 @@
             @click="navTo('/pages/introduction/inhert')"
           />
           <HomeButton
-            title="世界闽南"
+            title="创新发展"
+            icon="https://mncdn.wenlvti.net/app_static/minnan/images/home/IconReserch.png"
+            @click="navTo('/pages/research/index')"
+          />
+          <HomeButton
+            title="交流传播"
             icon="https://mncdn.wenlvti.net/app_static/minnan/images/home/IconArtifact.png"
             @click="navTo('/pages/introduction/recommend-news')"
           />
           <HomeButton
-            title="乐游闽南"
+            title="乐游厦门"
             icon="https://mncdn.wenlvti.net/app_static/minnan/images/home/IconDiscover.png"
             @click="navTo('/pages/introduction/travel')"
           />

+ 4 - 4
src/pages/home/introduction.vue

@@ -11,14 +11,14 @@
 
       <!-- 标题 -->
       <view class="font-songti color-title-text d-flex flex-col align-center justify-center p-3">
-        <text class="size-lll">世界闽南文化交流中心</text>
-        <text class="size-base mt-2">闽南文化生态保护区<text class="size-s">(厦门市)</text></text>
+        <text class="size-xl">世界闽南文化交流中心</text>
+        <text class="size-lll mt-2">闽南文化生态保护区<text class="size-ll ml-2">(厦门市)</text></text>
       </view>
 
       <!-- 分栏 -->
-      <view class="shadow-base radius-l bg-base p-3">
+      <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" :tag-style="commonParserStyle"  />
         </SimplePageContentLoader>
 
         <!--保护区建设历程-->

+ 3 - 3
src/pages/parts/HomeButton.vue

@@ -1,13 +1,13 @@
 <template>
   <view 
-    class="position-relative d-flex flex-row justify-center align-center radius-base bg-light-light-primary p-2 pt-3 pb-3 gap-sss"
+    class="position-relative d-flex flex-row justify-center align-center radius-base bg-light-light-primary p-1 pt-3 pb-3 gap-xs"
     :style="{
-      width: large ? '' : 'calc(50% - 15rpx)'
+      width: large ? '' : 'calc(33% - 15rpx)'
     }"
     @click="onClick"
   >
     <Image :src="icon" width="40rpx" height="40rpx" />
-    <text class="title color-primary">{{ title }}</text>
+    <text class="size-s color-primary">{{ title }}</text>
     <Image 
       v-if="bg" :src="bg" 
       :width="160" 

+ 59 - 0
src/pages/research/index.vue

@@ -0,0 +1,59 @@
+<template>
+  <CommonListPage 
+    itemType="article-common"
+    :dropDownNames="dropdownNames"
+    :tabs="[
+      { id: 0, text: '创新发展' },
+      { id: 1, text: '研究成果' },
+    ]"
+    :detailsPage="{
+      0: '/pages/doc/details',
+      1: '/pages/article/details',
+    }"
+    :startTabIndex="startTab"
+    :load="loadData" 
+  />
+</template>
+
+<script setup lang="ts">
+import { ref } from 'vue';
+import { GetContentListParams } from '@/api/CommonContent';
+import CommonListPage, { type DropDownNames } from '@/pages/article/common/CommonListPage.vue';
+import ResultContent from '@/api/research/ResultContent';
+import InnovationContent from '@/api/research/InnovationContent';
+
+const dropdownNames = ref<DropDownNames[]>([]);
+const startTab = ref(0);
+async function loadData(
+  page: number, 
+  pageSize: number,
+  searchText: string,
+  dropDownValues: number[],
+  tabSelect: number,
+) {
+  let res;
+  switch (tabSelect) {
+    case 1: 
+      res = (await ResultContent.getContentList(new GetContentListParams()
+        .setKeywords(searchText)
+      , page, pageSize))
+      break;
+    default:
+    case 0: 
+      res = (await InnovationContent.getContentList(new GetContentListParams()
+        .setKeywords(searchText)
+      , page, pageSize));
+    break;
+  }
+  res.list.forEach((item) => {
+    item.desc = item.from ? `来源:${item.from}` : '';
+    item.bottomTags = [
+      item.levelText, 
+      item.mainBodyColumnName, 
+      item.ichTypeText, 
+      item.batchText,
+    ]
+  })
+  return res;
+}
+</script>