qingnianyexiao2.0/packageA/my/stationDetail.vue
2025-04-01 09:03:51 +08:00

117 lines
2.0 KiB
Vue

<template>
<view class="box flex justify-center ">
<view class="center flex flex-column flex-start">
<span class="title">{{detail.title}}</span>
<span style="margin-bottom: 16rpx;">{{detail.createtime_text}}</span>
<span >
<!-- <u-parse :content="detail.desc" :selectable="true"></u-parse> -->
<rich-text :nodes="detail.desc" selectable user-select></rich-text>
</span>
</view>
</view>
</template>
<script>
export default {
data() {
return {
id: '',
detail:{}
};
},
onLoad(option) {
this.id = option.id
this.getDetail(option.id)
},
methods: {
getDetail(id) {
uni.$u.http.get('/api/school/message/detail', {
params: {
id: id
}
}).then(res => {
if (res.code == 1) {
this.detail = res.data.detail
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
}).catch(error => {});
}
}
}
</script>
<style lang="scss" scoped>
.box {
background: #F1F2F8;
width: 750rpx;
height: 100vh;
}
.w-100 {
width: 100%;
}
.flex {
display: flex;
}
.flex-start {
align-items: flex-start;
}
.white-space {
overflow: hidden;
/* 确保超出容器的文本被隐藏 */
white-space: nowrap;
/* 确保文本在一行内显示 */
text-overflow: ellipsis;
/* 使用省略号表示被截断的文本 */
}
.justify-center {
justify-content: center;
}
.align-items {
align-items: center;
}
.flex-column {
flex-flow: column;
}
.justify-start {
justify-content: start;
}
.center {
margin-top: 42rpx;
width: 640rpx;
height: 308rpx;
background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx;
padding: 25rpx;
span {
font-family: PingFang SC, PingFang SC;
font-weight: 500;
font-size: 26rpx;
color: #7A7A7A;
}
.title {
font-family: PingFang SC, PingFang SC;
font-weight: 800;
font-size: 34rpx;
color: #343434;
margin: 7rpx 0 42rpx 0;
}
}
</style>