Explorar o código

🎨 修改细节问题

快乐的梦鱼 hai 2 meses
pai
achega
9372994ee7

+ 15 - 0
src/components/content/CommonListBlock.vue

@@ -260,6 +260,10 @@ const props = defineProps({
     type: String,
     default: 'https://mncdn.wenlvti.net/app_static/minnan/EmptyImage.png'
   },
+  detailModelId: {
+    type: Number,
+    default: 0,
+  }
 })
 
 const router = useRouter();
@@ -306,6 +310,7 @@ function handleShowDetail(item: any) {
     path: props.detailsPage,
     query: {
       id: item.id,
+      modelId: props.detailModelId,
     }
   });
 }
@@ -316,6 +321,8 @@ const selectedTag = ref(props.defaultSelectTag);
 const pageSize = ref(props.pageSize);
 const route = useRoute();
 
+
+
 const newsLoader = await useSSrSimplePagerDataLoader(route.fullPath + '/list' + props.subName, Number(route.query.page || 1), pageSize, (page, size) => props.load(
   page, size, 
   selectedTag.value, 
@@ -330,6 +337,12 @@ watch(() => props.dropDownNames, () => {
   loadDropValues();
 })
 watch(selectedTag, () => {
+  router.replace({
+    query: {
+      ...route.query,
+      tag: selectedTag.value,
+    }
+  })
   newsLoader.loadData(undefined, true);
 })
 watch(tableListShow, (v) => {
@@ -346,6 +359,8 @@ function loadDropValues() {
 }
 
 onMounted(() => {
+  if (route.query.tag)
+    selectedTag.value = Number(route.query.tag);
   setTimeout(() => {
     loadDropValues();
   }, 600);

+ 4 - 0
src/components/content/CommonListPage.vue

@@ -114,6 +114,10 @@ const props = defineProps({
     type: String,
     default: 'https://mn.wenlvti.net/app_static/minnan/EmptyImage.png'
   },
+  detailModelId: {
+    type: Number,
+    default: 0,
+  }
 })
 </script>
 

+ 7 - 3
src/pages/fusion/fashion.vue

@@ -1,5 +1,5 @@
 <template>
-   <CommonListPage
+  <CommonListPage
     :title="'闽南时尚'"
     :dropDownNames="[]"
     :showSearch="true"
@@ -33,8 +33,10 @@ async function loadData(
 ) {
   _selectedTag = selectedTag;
   const res = await CustomContent.getContentList(new GetContentListParams()
-    .setModelId(16)
-    .setMainBodyColumnId(selectedTag > 0 ? selectedTag : 0)
+    .setModelId(tagsData.value.find((item) => item.id == selectedTag)?.modelId || 0)
+    .setMainBodyColumnId(selectedTag < 0 ? 
+      tagsData.value.find((item) => item.id == selectedTag)?.mainBodyColumnId || 0
+      : selectedTag)
     .setKeywords(searchText)
   , page, pageSize);
 
@@ -59,6 +61,8 @@ const tagsData = ref([
   { modelId: 16, id: 191, name: '闽南语经典歌曲' },
   { modelId: 16, id: 190, name: '南音' },
   { modelId: 16, id: 189, name: '闽南童谣' },
+  { modelId: 5, mainBodyColumnId: [ 257,235,237,210 ], id: -100, name: '常用闽南语' },
+  { modelId: 5, mainBodyColumnId: 313, id: -101, name: '闽南语原声' },
 ]);
 </script>
 

+ 1 - 1
src/pages/fusion/point.vue

@@ -4,7 +4,7 @@
     :prevPage="{ title: '文旅融合' }"
     :dropDownNames="[]"
     :pageSize="8"
-    rowType="4"
+    :rowType="4"
     :load="loadData"
     :loadDetail="loadDetail"
   />

+ 1 - 0
src/pages/inheritor/inheritor.vue

@@ -8,6 +8,7 @@
     :loadDetail="loadDetail"
     :tagsData="tagsData"
     showTableSwitch
+    :detailModelId="InheritorContent.modelId"
     :tableSwitchOptions="{
       title: '传承人姓名',
     }"

+ 1 - 0
src/pages/inheritor/products.vue

@@ -8,6 +8,7 @@
     :loadDetail="loadDetail"
     :tagsData="tagsData"
     :defaultSelectTag="tagsData[0].id"
+    :detailModelId="ProductsContent.modelId"
     detailsPage="/details/intangible"
   />
 </template>

+ 1 - 0
src/pages/inheritor/projects.vue

@@ -11,6 +11,7 @@
     :tableSwitchOptions="{
       title: '项目名称',
     }"
+    :detailModelId="ProjectsContent.modelId"
     :defaultSelectTag="tagsData[0].id"
     detailsPage="/details/intangible"
   />

+ 5 - 8
src/pages/introduction/history.vue

@@ -1,6 +1,6 @@
 <template>
    <CommonListPage
-    :title="'历史地理背景'"
+    :title="'闽南文化历史地理背景'"
     :prevPage="{ title: '文化常识' }"
     :dropDownNames="[]"
     :showSearch="true"
@@ -28,10 +28,10 @@ async function loadData(
   dropDownValues: number[]
 ) {
 
-  const res = await HistoryContent.getContentList(new GetContentListParams().setSelfValues({
-    mainBodyColumnId: selectedTag,
-    keywords: searchText,
-  }), page, pageSize);
+  const res = await HistoryContent.getContentList(new GetContentListParams()
+    .setMainBodyColumnId([ 233, 250, 251 ])
+    .setKeywords(searchText)
+  , page, pageSize);
 
   return { 
     page: page,
@@ -49,9 +49,6 @@ async function loadData(
 
 //子分类
 const tagsData = ref([
-  { id: 233, name: '历史和地理背景' },
-  { id: 250, name: '历史沿革' },
-  { id: 251, name: '地理条件' },
 ]);
 </script>
 

+ 4 - 6
src/pages/introduction/language.vue

@@ -28,10 +28,10 @@ async function loadData(
   dropDownValues: number[]
 ) {
 
-  const res = await LanguageContent.getContentList(new GetContentListParams().setSelfValues({
-    mainBodyColumnId: selectedTag,
-    keywords: searchText,
-  }), page, pageSize);
+  const res = await LanguageContent.getContentList(new GetContentListParams()
+    .setMainBodyColumnId([ 235, 237 ])
+    .setKeywords(searchText)
+  , page, pageSize);
 
   return { 
     page: page,
@@ -49,8 +49,6 @@ async function loadData(
 
 //子分类
 const tagsData = ref([
-  { id: 235, name: '全部' },
-  { id: 237, name: '方言历史' },
 ]);
 </script>