ソースを参照

📦 添加政策法规页面

快乐的梦鱼 1 ヶ月 前
コミット
76ec44d0fb
共有3 個のファイルを変更した42 個の追加0 個の削除を含む
  1. 6 0
      src/pages.json
  2. 7 0
      src/pages/home/introduction.vue
  3. 29 0
      src/pages/home/laws.vue

+ 6 - 0
src/pages.json

@@ -21,6 +21,12 @@
       }
     },
     {
+      "path": "pages/home/laws",
+      "style": {
+        "navigationBarTitleText": "政策法规"
+      }
+    },
+    {
       "path": "pages/introduction/character/list",
       "style": {
         "navigationBarTitleText": "历史人物列表",

+ 7 - 0
src/pages/home/introduction.vue

@@ -29,6 +29,13 @@
           <text class="iconfont icon-task-history-4 size-lll mr-2"></text>
           <text>保护区建设历程</text>
         </view>
+        <view 
+          class="mt-3 d-flex flex-row justify-center align-center p-25 radius-base border-all-primary color-primary"
+          @click="navTo('./laws')"
+        >
+          <text class="iconfont icon-task-history-4 size-lll mr-2"></text>
+          <text>相关政策法规</text>
+        </view>
       </view>
 
       <view class="d-flex flex-col mt-3">

+ 29 - 0
src/pages/home/laws.vue

@@ -0,0 +1,29 @@
+<template>
+  <CommonListPage 
+    title="政策法规"
+    itemType="image-large-2"
+    showTotal
+    :dropDownNames="dropdownNames"
+    :load="loadData" 
+  />
+  <!--  -->
+</template>
+
+<script setup lang="ts">
+import { ref } from 'vue';
+import CommonListPage, { type DropDownNames } from '@/pages/article/common/CommonListPage.vue';
+import { GetContentListParams } from '@/api/CommonContent';
+import PolicyContent from '@/api/introduction/PolicyContent';
+
+const dropdownNames = ref<DropDownNames[]>([]);
+
+async function loadData(
+  page: number, 
+  pageSize: number,
+  searchText: string,
+  dropDownValues: number[],
+  tabSelect: number,
+) {
+  return await PolicyContent.getContentList(new GetContentListParams().setKeywords(searchText), page, pageSize);
+}
+</script>