Commit 318381cc authored by xhx's avatar xhx

资讯消息发布时间

parent c1bcd56f
......@@ -3,7 +3,7 @@
<div class=" flex justify-between py-5 border-b border-gray-200"
@click="$router.push({path: 'msgDetail', query: { info: JSON.stringify(info) }})">
<span class=" text-sm text-left font-semibold" :class="isRead?'text-gray-400':'text-gray-800'">{{ info.title }}</span>
<span class=" text-sm text-right text-gray-400">{{ $format(info.created_at, 'YYYY-MM-DD HH:mm:ss') }}</span>
<span class=" text-sm text-right text-gray-400">{{ $format(info.update_at, 'YYYY-MM-DD HH:mm:ss') }}</span>
</div>
</div>
</template>
......
......@@ -3,7 +3,7 @@
<div class=" text-base text-gray-800 font-semibold pt-5 news-title">{{ info.title }}</div>
<!-- <p class=" text-xs text-gray-400 pt-5">{{ info.desc }}</p> -->
<div class=" text-sm text-gray-800 text-justify pt-3 news-info">{{ info.desc }}</div>
<div class=" text-xs text-gray-400 py-5 border-b border-red border-solid">发布时间:{{ $format(info.created_at, 'YYYY-MM-DD') }} &nbsp;&nbsp;&nbsp;作者: {{ info.writer }}</div>
<div class=" text-xs text-gray-400 py-5 border-b border-red border-solid">发布时间:{{ $format(info.update_at, 'YYYY-MM-DD') }} &nbsp;&nbsp;&nbsp;作者: {{ info.writer }}</div>
</div>
</template>
......
......@@ -6,7 +6,7 @@
v-if="showImg"
class=" h-32 bg-app-blue mt-2 bg-cover bg-center bg-no-repeat"
:style="{'background-image': `url('${url}')`}"></div>
<div class=" text-xs text-gray-400 pt-4 tracking-wide">发布时间:{{ $format(info.created_at, 'YYYY-MM-DD') }}</div>
<div class=" text-xs text-gray-400 pt-4 tracking-wide">发布时间:{{ $format(info.update_at, 'YYYY-MM-DD') }}</div>
</div>
</template>
......
......@@ -159,7 +159,7 @@ export default defineComponent({
const ret = await queryNotifyList({ notify_type: "1" });
if (ret.code === 200) {
const list = ret.data.items;
list.sort((a, b) => b.created_at - a.created_at)
list.sort((a, b) => b.update_at - a.update_at)
this.notifyList = list;
}
},
......
......@@ -22,7 +22,7 @@ export default defineComponent({
const notifyList = () => {
getNotifyList(type).then(res => {
list.value = res.data.items
list.value.sort((a: {created_at: number}, b: {created_at: number}) => b.created_at - a.created_at)
list.value.sort((a: {update_at: number}, b: {update_at: number}) => b.update_at - a.update_at)
})
}
notifyList()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment