ソースを参照

🤢 按要求修改栏目显示

快乐的梦鱼 1 ヶ月 前
コミット
8874cb5d37
共有2 個のファイルを変更した8 個の追加3 個の削除を含む
  1. 6 1
      src/api/CommonContent.ts
  2. 2 2
      src/pages/home/introduction.vue

+ 6 - 1
src/api/CommonContent.ts

@@ -177,6 +177,9 @@ export class GetContentListItem extends DataModel<GetContentListItem> {
       brandType: { clientSide: 'splitCommaArray', serverSide: 'commaArrayMerge' },
       type: { clientSide: 'number', serverSide: 'number' },
     };
+    this._nameMapperServer = {
+      'column_name': 'mainBodyColumnName',
+    };
     this._convertKeyType = (key, direction) => {
       if (key.endsWith('Time'))
         return {
@@ -187,13 +190,15 @@ export class GetContentListItem extends DataModel<GetContentListItem> {
     };
   }
   id = 0;
+  modelId = 0;
+  modelName = '';
   mainBodyColumnId = 0;
+  mainBodyColumnName = '';
   latitude = 0;
   longitude = 0;
   mapX = '';
   mapY = '';
   from = '';
-  modelId = 0;
   title = '!title';
   region = 0;
   image = '';

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

@@ -88,14 +88,14 @@ const listLoader = useSimplePageListLoader<{
 }>(8, async (page, pageSize, params) => {
   const res = await CommonContent.getContentList(new GetContentListParams().setSelfValues({
     modelId: 17, 
-    mainBodyColumnId: '255,256,283,284',
+    mainBodyColumnId: '255,283',
   }), page, pageSize);
   return { list: res.list.map((item) => {
     return {
       id: item.id,
       image: item.thumbnail || item.image,
       title: item.title,
-      desc: '重点保护区域',
+      desc: item.mainBodyColumnName || '',
       date: DataDateUtils.formatDate(item.publishAt, 'YYYY-MM-dd'),
     }
   }), total: res.total }