Commit 834c77f5 authored by Zhang Xiaojie's avatar Zhang Xiaojie

update:activity 发布时间改为更新时间

parent 128b9bc3
export interface ActivityItem{ export interface ActivityItem{
created_at:number, created_at:number,
file_name:string, file_name:string,
uuid:string uuid:string,
update_at:string
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<nav-bar title="精彩活动" /> <nav-bar title="精彩活动" />
<div class="px-5 py-8"> <div class="px-5 py-8">
<p class="text-base text-gray-800 font-semibold">{{ title }}</p> <p class="text-base text-gray-800 font-semibold">{{ title }}</p>
<p class="text-xs text-gray-400 mt-5">发布时间 {{ timestampFormat(created_at) }}</p> <p class="text-xs text-gray-400 mt-5">发布时间 {{ timestampFormat(update_at) }}</p>
<img :src="src" class="text-center" /> <img :src="src" class="text-center" />
<p class="text-sm text-gray-800 text-justify mt-5" v-html="content"></p> <p class="text-sm text-gray-800 text-justify mt-5" v-html="content"></p>
</div> </div>
...@@ -19,7 +19,7 @@ import { timestampFormat } from "@/utils/time" ...@@ -19,7 +19,7 @@ import { timestampFormat } from "@/utils/time"
const uuid = useRoute().params.uuid as string; const uuid = useRoute().params.uuid as string;
const title = ref(""); const title = ref("");
const created_at = ref(0); const update_at = ref(0);
const content = ref(""); const content = ref("");
const file_name = ref(""); const file_name = ref("");
const src = ref(""); const src = ref("");
...@@ -28,7 +28,7 @@ onMounted(() => { ...@@ -28,7 +28,7 @@ onMounted(() => {
queryActivityInfo({ uuid: uuid }).then((ret) => { queryActivityInfo({ uuid: uuid }).then((ret) => {
if (ret.code === 200) { if (ret.code === 200) {
title.value = ret.data.title; title.value = ret.data.title;
created_at.value = ret.data.created_at; update_at.value = ret.data.update_at;
content.value = ret.data.content; content.value = ret.data.content;
file_name.value = ret.data.file_name; file_name.value = ret.data.file_name;
src.value = getImageSrcFromFileHash(file_name.value); src.value = getImageSrcFromFileHash(file_name.value);
......
<template> <template>
<div> <div>
<div class="text-xs text-gray-400 text-center mt-5 "> <div class="text-xs text-gray-400 text-center mt-5 ">
{{ timestampFormat(created_at) }} {{ timestampFormat(update_at) }}
</div> </div>
<div class="text-center mt-2"> <div class="text-center mt-2">
<img :src="src" class="w-83 h-22 object-cover object-center inline-block" /> <img :src="src" class="w-83 h-22 object-cover object-center inline-block" />
...@@ -15,7 +15,7 @@ import { timestampFormat } from "@/utils/time"; ...@@ -15,7 +15,7 @@ import { timestampFormat } from "@/utils/time";
import { getImageSrcFromFileHash } from "@/service/FileService"; import { getImageSrcFromFileHash } from "@/service/FileService";
import { ref } from "vue" import { ref } from "vue"
const props = defineProps({ const props = defineProps({
created_at: Number, update_at: Number,
file_name: String, file_name: String,
}); });
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<Skeleton :loading="skeLoading" :row="3" class="mt-2"> <Skeleton :loading="skeLoading" :row="3" class="mt-2">
<card <card
v-for="activity in activityList" v-for="activity in activityList"
:created_at="activity.created_at" :update_at="activity.update_at"
:file_name="activity.file_name" :file_name="activity.file_name"
:key="activity.id" :key="activity.id"
@click=" @click="
......
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