This commit is contained in:
zmr900709
2020-07-09 16:35:23 +08:00
parent 3d8cfd23d4
commit 10bbccc2bd
7 changed files with 139 additions and 37 deletions

View File

@@ -4,11 +4,11 @@
<view class="activity" v-for="(item, index) in actives" :key="index">
<view class="times">{{item.type}}</view>
<view class="content">
<view class="title">{{item.name}}</view>
<view class="title">{{item.title}}</view>
<view class="images_about">
<image :src="item.url"></image>
<image :src="item.goods_image"></image>
<view>
<text>{{item.about}}</text>
<text>{{item.summary}}</text>
</view>
</view>
</view>
@@ -21,43 +21,23 @@
data() {
return {
actives: [
{
url: '../../pageE/static/mine/1.png',
name: '百元趋势新品',
type: '2020-05-14 20:11',
about: '百搭休闲格纹裙!你值得有用!'
},
{
url: '../../pageE/static/mine/1.png',
name: '百元趋势新品',
type: '2020-05-14 20:11',
about: '百搭休闲格纹裙!你值得有用!'
},
{
url: '../../pageE/static/mine/1.png',
name: '百元趋势新品',
type: '2020-05-14 20:11',
about: '百搭休闲格纹裙!你值得有用!'
},
{
url: '../../pageE/static/mine/1.png',
name: '百元趋势新品',
type: '2020-05-14 20:11',
about: '百搭休闲格纹裙!你值得有用!'
},
{
url: '../../pageE/static/mine/1.png',
name: '百元趋势新品',
type: '2020-05-14 20:11',
about: '百搭休闲格纹裙!你值得有用!'
},
]
};
},
onLoad(){
this.messageactivityList()
},
methods: {
titletext(){
console.log("22345")
},
// 活动消息列表
messageactivityList(){
this.$u.api.messageactivityList({}).then((res)=>{
console.log(res)
this.actives = res.data
})
}
},
components:{
@@ -66,6 +46,9 @@
</script>
<style lang="scss" scoped>
uni-page-body{
height: 100%;
}
#actives{
background: #ECECEC;
height: 100%;
@@ -106,6 +89,10 @@
width: 400rpx;
padding-left: 15rpx;
line-height: 36rpx;
display: block;
overflow:hidden; //超出的文本隐藏
text-overflow:ellipsis; //用省略号显示
white-space:nowrap; //不换行
}
view{
display: inline-block;