deming/pageD/activity/activity.vue

107 lines
2.2 KiB
Vue
Raw Normal View History

2020-06-11 08:43:51 +08:00
<template>
<view id="actives">
<!-- 活动消息推送 -->
2020-08-06 20:42:03 +08:00
<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>
2020-06-11 08:43:51 +08:00
</view>
</template>
<script>
export default {
data() {
return {
actives: [
]
};
},
2020-07-09 16:35:23 +08:00
onLoad(){
this.messageactivityList()
},
2020-06-11 08:43:51 +08:00
methods: {
titletext(){
2020-07-09 16:35:23 +08:00
},
// 活动消息列表
messageactivityList(){
this.$u.api.messageactivityList({}).then((res)=>{
2020-08-06 20:42:03 +08:00
if (res.errCode == 0) {
this.actives = res.data;
}
2020-07-09 16:35:23 +08:00
})
2020-06-11 08:43:51 +08:00
}
},
components:{
}
};
</script>
<style lang="scss" scoped>
2020-07-09 16:35:23 +08:00
uni-page-body{
height: 100%;
}
2020-06-11 08:43:51 +08:00
#actives{
background: #ECECEC;
height: 100%;
2020-08-06 20:42:03 +08:00
.time {
padding: 30rpx 0;
color: #666;
text-align: center;
font-size: 28rpx;
}
2020-06-11 08:43:51 +08:00
}
.activity{
.times{
width:100%;
font-size:28rpx;
font-weight:400;
color:rgba(102,102,102,1);
text-align: center;
padding: 39rpx 0 30rpx;
}
.content{
width:630rpx;
padding: 30rpx;
background:rgba(255,255,255,1);
border-radius:20rpx;
margin: 0 auto;
overflow: hidden;
image{
2020-08-06 20:42:03 +08:00
flex-shrink: 0;
width: 140rpx;
2020-06-11 08:43:51 +08:00
height: 140rpx;
}
.title{
font-size:30rpx;
color:rgba(51,51,51,1);
padding: 0rpx 0 19rpx;
}
.images_about{
2020-08-06 20:42:03 +08:00
display: flex;
& > view{
display: flex;
flex-direction: column;
justify-content: center;
width: 100%;
2020-06-11 08:43:51 +08:00
height: 140rpx;
2020-08-06 20:42:03 +08:00
padding: 20rpx;
background: rgba(241,241,241,1);
& > text {
}
2020-06-11 08:43:51 +08:00
}
}
}
}
</style>