Răsfoiți Sursa

已购详情和专栏详情修改

jwyu 2 ani în urmă
părinte
comite
c7c00edab5
2 a modificat fișierele cu 15 adăugiri și 3 ștergeri
  1. 8 2
      pages-buy/detail.vue
  2. 7 1
      pages-report/specialColumn/detail.vue

+ 8 - 2
pages-buy/detail.vue

@@ -2,13 +2,13 @@
     <page-meta :page-style="loading? 'overflow: hidden;' : ''" />
     <!-- <scroll-view scroll-y="true" :scroll-into-view="scrollViewId" upper-threshold="10" @scrolltoupper="onScrollTop" style="height: 100vh;"> -->
         <view class="list">
-            <view class="item" v-for="item in list" :key="item.report_id" :id="`msg${item.report_id}${item.activity_id}`" >
+            <view class="item" v-for="(item,index) in list" :key="index" :id="`msg${item.report_id}${item.activity_id}`" >
                 <view class="msg-time">{{formatMsgTime(item.time)}}</view>
                 <view class="content" @click="goDetail(item)">
                     <view class="top-img" :style="'background-image:url('+item.img_url+')'">
                         <text class="name">{{item.top_name}}</text>
                     </view>
-                    <view class="title">{{item.title}}</view>
+                    <view class="title">{{formatTitle(item)}}</view>
                     <view :class="['intro',item.content.substr(0,1)=='【'?'text-indent':'']">{{item.content}}</view>
                 </view>
             </view>
@@ -148,6 +148,12 @@ export default {
                 this.page++
                 this.getList()
             }
+        },
+
+        //格式化标题
+        formatTitle(item){
+            let t=moment(item.time).format('MMDD')
+            return `${item.title}(${t})`
         }
     }
 }

+ 7 - 1
pages-report/specialColumn/detail.vue

@@ -27,7 +27,7 @@
             <view class="flex item" v-for="item in list" :key="item" @click="goDetail(item)">
                 <image class="img" :src="item.report_img_url" mode="aspectFill" lazy-load/>
                 <view class="con">
-                    <view class="title">【第{{item.stage}}期】{{item.classify_name_second}}</view>
+                    <view class="title">{{formatTitle(item)}}</view>
                     <view class="time">{{item.publish_time|formatReportTime}}</view>
                     <view v-if="info.auth_ok" :class="['audio-box',!info.auth_ok&&'grey-audio-box']" @click.stop="handleClickAudio(item)">
                         <image :src="curAudioReportId==item.report_id&&!curAudioPaused?'../static/audio-s.png':'../static/audio.png'" mode="aspectFill"/>
@@ -61,6 +61,7 @@ import {apiSpecialColumnDetail,apiSpecialColumnReportList} from '@/api/report'
 import {apiGetSceneToParams} from '@/api/common'
 import audioBox from '../components/audioBox.vue'
 import sharePoster from '@/components/sharePoster/sharePoster.vue'
+const moment=require('@/utils/moment-with-locales.min')
 export default {
     computed: {
         showAudioPop(){//是否显示音频弹窗
@@ -210,6 +211,11 @@ export default {
                 })
             }
             
+        },
+
+        formatTitle(item){
+            let t=moment(item.publish_time).format('MMDD')
+            return `【第${item.stage}期】${item.classify_name_second}(${t})`
         }
     }
 }