This commit is contained in:
Gdpao
2020-08-06 20:42:03 +08:00
parent 201f858833
commit 090b7cc753
22 changed files with 209 additions and 184 deletions

View File

@@ -1,18 +1,20 @@
<template>
<view id="actives">
<!-- 活动消息推送 -->
<view class="activity" v-for="(item, index) in actives" :key="index">
<view class="times">{{item.type}}</view>
<view class="content">
<view class="title">{{item.title}}</view>
<view class="images_about">
<image :src="item.goods_image"></image>
<view>
<text>{{item.summary}}</text>
</view>
</view>
</view>
</view>
<block v-for="(item, index) in actives" :key="index">
<view class="time">{{ item.addtime }}</view>
<view class="activity">
<view class="content">
<view class="title">{{item.title}}</view>
<view class="images_about">
<image :src="item.goods_image" mode="aspectFill"></image>
<view>
<text class="u-line-2">{{item.summary}}</text>
</view>
</view>
</view>
</view>
</block>
</view>
</template>
@@ -30,13 +32,13 @@
},
methods: {
titletext(){
console.log("22345")
},
// 活动消息列表
messageactivityList(){
this.$u.api.messageactivityList({}).then((res)=>{
console.log(res)
this.actives = res.data
if (res.errCode == 0) {
this.actives = res.data;
}
})
}
},
@@ -52,9 +54,14 @@
#actives{
background: #ECECEC;
height: 100%;
.time {
padding: 30rpx 0;
color: #666;
text-align: center;
font-size: 28rpx;
}
}
.activity{
.times{
width:100%;
font-size:28rpx;
@@ -71,9 +78,9 @@
margin: 0 auto;
overflow: hidden;
image{
width: 137rpx;
flex-shrink: 0;
width: 140rpx;
height: 140rpx;
float: left;
}
.title{
font-size:30rpx;
@@ -81,25 +88,17 @@
padding: 0rpx 0 19rpx;
}
.images_about{
overflow: hidden;
text{
display: table-cell;
display: flex;
& > view{
display: flex;
flex-direction: column;
justify-content: center;
width: 100%;
height: 140rpx;
vertical-align: middle;
width: 400rpx;
padding-left: 15rpx;
line-height: 36rpx;
display: block;
overflow:hidden; //超出的文本隐藏
text-overflow:ellipsis; //用省略号显示
white-space:nowrap; //不换行
}
view{
display: inline-block;
float: left;
width:430rpx;
height:140rpx;
background:rgba(241,241,241,1);
padding: 20rpx;
background: rgba(241,241,241,1);
& > text {
}
}
}
}