deming/components/informations/notice/notice.vue

93 lines
2.0 KiB
Vue
Raw Normal View History

2020-06-11 00:43:51 +00:00
<template>
2020-08-20 06:23:21 +00:00
<view class="notice" :style="{height : height + 'px'}">
2020-08-11 01:36:03 +00:00
<view v-for="(item,index) in notice" :key="index" @click="gotoInfo(index)">
2020-08-06 12:42:03 +00:00
<view class="time_notice">{{ item.addtime }}</view>
2020-06-11 00:43:51 +00:00
<view class="notice_view">
2020-08-06 12:42:03 +00:00
<image :src="item.picture" mode="aspectFill" ></image>
2020-09-03 01:50:18 +00:00
<view class="text_view">
<view class="u-line-2">{{ item.content }}</view>
</view>
2020-08-11 01:36:03 +00:00
<view class="notice_list">
2020-06-11 00:43:51 +00:00
<text>查看详情</text>
2020-08-04 13:46:52 +00:00
<u-icon name="arrow-right" color="#666"></u-icon>
2020-06-11 00:43:51 +00:00
</view>
</view>
</view>
</view>
</template>
<style lang="scss" scoped>
.notice {
.notice_view{
width: 690rpx;
height: 489rpx;
border-radius: 20rpx;
background: #fff;
margin: 0 auto;
}
.notice_view image{
height: 285rpx;
width: 100%;
border-radius: 20rpx 20rpx 0px 0px;
}
.text_view{
2020-09-03 01:50:18 +00:00
width: 690rpx;
height: 120rpx;
padding: 26rpx;
color: #333;
font-size: 26rpx;
line-height: 38rpx;
2020-06-11 00:43:51 +00:00
}
.notice_view > view:nth-child(3){
2020-09-01 12:30:23 +00:00
height: 80rpx;
line-height: 80rpx;
2020-06-11 00:43:51 +00:00
border-top: 1px #F5F5F5 solid;
}
}
.time_notice{
text-align: center;
font-size:28rpx;
font-weight:400;
color:rgba(102,102,102,1);
padding: 26rpx 0 39rpx 0;
}
.notice_list{
2020-09-03 01:50:18 +00:00
display: flex;
align-items: center;
justify-content: space-between;
2020-06-11 00:43:51 +00:00
width: 100%;
padding: 0 25rpx;
}
</style>
<script>
export default {
name: "notice",
2020-08-06 12:42:03 +00:00
props: ['list'],
2020-06-11 00:43:51 +00:00
data() {
return {
2020-08-20 06:23:21 +00:00
notice : [],
height : ''
2020-06-11 00:43:51 +00:00
};
2020-08-06 12:42:03 +00:00
},
watch: {
list(newVal,old) {
// console.log(newVal);
this.notice = newVal;
}
},
2020-08-20 06:23:21 +00:00
onLoad() {
},
2020-08-06 12:42:03 +00:00
methods: {
2020-08-09 03:31:47 +00:00
gotoInfo(index) {
console.log(index);
this.$u.route({
url: "/pageD/notice/info",
params: {
index: index
},
})
}
2020-08-06 12:42:03 +00:00
}
2020-06-11 00:43:51 +00:00
}
</script>