<template>
    <div>
        <div
            class="mt-10px shadow-default bg-white pl-35px pr-30px pr-35px h-60px rounded-10px relative flex items-center justify-between">
            <h3 class="nav-title"> 名师工作室 - <span>{{ detailData.tm_gzsmc }}</span> - <span>成果展示</span> - <span
                    class="text-18px font-medium">{{ detailData.tmy_title
                    }}</span></h3>
            <div class="btnDiv">
                <el-button size="large" @click="linkBack" class="w-100px">返回
                </el-button>
            </div>
        </div>
        <div class="shadow-default bg-white rounded-10px p-40px mt-5">
            <div class="flex h-60px">
                <img v-if="detailData.tmy_img" class="w-60px h-60px rounded-1/2" :src="detailData.tmy_img.split('|')[0]"
                    alt="">
                <div class="ml-5 h-full flex flex-col justify-between">
                    <h3 class="text-20px font-mudiem ">{{ detailData.tmy_title }}</h3>
                    <p class="text-gray-400 text-14px">发布人: {{ detailData.tmy_fbr }} <span class="ml-5" v-if="detailData.tmy_fbsj_datetime">发布时间: {{
                        detailData.tmy_fbsj_datetime.split(' ')[0] }}</span></p>
                </div>
            </div>
            <div class="mt-30px" v-html="detailData.tmy_content"></div>
        </div>
    </div>
</template>
<script setup>
import { useRoute, useRouter } from 'vue-router';
import { yxcg_detail } from './api';
const route = useRoute();
const router = useRouter();
let tmy_id = route.params.tmy_id
let title = $ref('');
let detailData = $ref({});
yxcg_detail({ tmy_id }).then(res => {
    if (res.code == '1') {
        detailData = res.data.one_info;
    }
})
const linkTo = (name) => {
    router.push({
        name,
    });
}
const linkBack = () => {
    router.back();
}
</script>
<style lang="scss" scoped>
$color: #1259A1;

.color {
    color: $color;
}

.btnDiv {
    .el-button {
        background: $color;
        border-color: $color;
        color: #fff;
    }
}

.shadow-default {
    box-shadow: 0 10px 24px rgba(161, 153, 168, 0.18);
}
</style>