Browse Source

文章详情添加广告

test
Enzo 4 years ago
parent
commit
222858206d
  1. 57
      pages/notice/article.vue

57
pages/notice/article.vue

@ -1,4 +1,5 @@
<template>
<view>
<view class="lf-m-l-32 lf-m-r-32">
<view>
<view class="lf-font-32 lf-color-333 lf-row-center lf-m-t-30 lf-m-b-20">
@ -15,7 +16,27 @@
</view>
<rich-text :nodes="content" v-if="content"></rich-text>
<lf-nocontent v-else></lf-nocontent>
<!-- 回到顶部 -->
</view>
<!-- 活动列表 -->
<view class="content" v-if="list">
<view class="item" v-for="(item,index) in list" :key="index" @click="$url('/pages/goodsDetail/index?goods_id='+item.id)">
<view class="cover">
<image :src="item.picture" class="lf-w-100 lf-h-100" mode="aspectFill"></image>
</view>
<view style="width: 420rpx;">
<view class="lf-font-28 lf-color-333 lf-line-2" style="height: 78rpx;">{{item.title}}</view>
<view class="lf-font-24 lf-color-gray lf-line-2" style="height: 64rpx;">本套票只包含两个成人不可带小孩本套票只包含两个成人不可带小孩本套票只包含两个成人不可带小孩</view>
<view class="lf-flex lf-m-t-25">
<lf-price :price="item.price"></lf-price>
<text class="lf-font-24 lf-color-gray lf-line-through lf-m-l-15">¥{{item.original_price}}</text>
</view>
</view>
</view>
</view>
<!-- 加载 -->
<view class="loading-more">
<!-- <text v-if="list.length" :class="{'loading-more-text': loadingClass}">{{ loadingText }}</text> -->
</view>
<u-back-top :scroll-top="pageScrollTop" :custom-style="{background: 'rgba(51, 51 51, 0.3)'}"></u-back-top>
</view>
</template>
@ -26,7 +47,13 @@
return {
content: '',
article_id: 0,
title_content: ''
title_content: '',
list: [],
loadingClass: false,
loadingText: '已加载全部数据~',
page: 1,
isPage: true,
pageSize: 20,
}
},
onLoad(e){
@ -40,6 +67,7 @@
this.$http(this.API.API_FINDARTICLEDETAILS,{id: this.article_id}).then(res => {
this.content = res.data?.content;
this.title_content = res.data
this.list = res.data?.product
console.log(this.content)
})
}
@ -48,5 +76,28 @@
</script>
<style lang="scss" scoped="scoped">
.content{
padding: 0 32rpx;
box-sizing: border-box;
width: 750rpx;
height: max-content;
margin-top: 30rpx;
.item{
width: 100%;
height: auto;
border-bottom: 1rpx solid #E5E5E5;
padding: 30rpx 0;
display: flex;
&:last-child{
border-bottom: none;
}
.cover{
width: 250rpx;
height: 210rpx;
border-radius: 20rpx;
overflow: hidden;
margin-right: 15rpx;
}
}
}
</style>
Loading…
Cancel
Save