123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <template>
- <view class="detail">
- <view class="detail-image">
- <image class="detail-image" :src="detail.cover_resource?detail.cover_resource.url:''" mode="aspectFill"></image>
- </view>
-
- <view class="news_detail">
- <view class="title">
- {{detail.title}}
- </view>
- <view class="time">
- {{detail.created_at}}
- </view>
- <!-- <view class="img">
- <image :src="detail.cover_resource ? detail.cover_resource.url :'../../static/images/active_top.png'"></image>
- </view> -->
- <view class="top">
- <u-parse :html="detail.body"></u-parse>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- detail: ''
- }
- },
- onLoad(options) {
-
- let id = options.id
- this.get_content(id)
- },
- methods: {
-
- get_content(id) {
- let params = {
- title: '',
- organization_id: '',
- category_id: 2,
- id: id
- }
- this.$u.get('/page/news/' + id).then(res => {
- console.log(res, 'content')
- this.detail = res.data
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- page{
- padding: 0;
- }
- .detail{
- .detail-image{
- height: 178px;
- width: 100%;
- // width: 100%;
- }
- }
- .news_detail {
- padding: 16px;
- image {
- width: 100%;
- height: 198px;
- }
- .title {
- font-size: 17px;
- font-weight: 500;
- line-height: 20px;
- color: #282828;
- line-height: 22px;
- opacity: 1;
- }
- .time {
- margin-top: 15px;
- font-weight: 400;
- line-height: 9px;
- font-size: 12px;
- color: #A2A2A2;
- opacity: 1;
- }
- .img {
- height: 133px;
- overflow: hidden;
- border-radius: 10px;
- margin-top: 20px;
- image {
- width: 100%;
- }
- }
- .top {
- margin-top: 20px;
- text-align: justify;
- }
- }
- </style>
|