<template>
|
<view class="diy-article">
|
<view class="hdzq-icon">
|
<image :src="itemData.style.image" mode="aspectFill"></image>
|
</view>
|
<view class="diy-bg" :style="'background:url('+itemData.style.background+') no-repeat;'">
|
<!--列表-->
|
<view class="article-item" v-for="(item, index) in listData" :class="'show-type__'+ itemData.style.display"
|
:key="index" @click="gotoPageFunc(item)">
|
<template>
|
|
<view class="f24 text-ellipsis-2 lh200" :style="'color:'+itemData.style.textColor+';'">
|
{{ item.name }}
|
</view>
|
</template>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
/*数据列表*/
|
listData: []
|
};
|
},
|
props: ['itemData'],
|
created() {
|
this.listData = this.itemData.data;
|
},
|
methods: {
|
|
/*跳转页面*/
|
gotoPageFunc(e) {
|
if(e.is_check == 1){
|
let url = 'pages3/release/project/detail?project_id=' + e.project_id
|
this.gotoPage(url);
|
}else{
|
uni.showToast({
|
title: '请开通查看权限'
|
});
|
}
|
|
},
|
add0(m) {
|
return m < 10 ? '0' + m : m
|
},
|
format(t) {
|
//shijianchuo是整数,否则要parseInt转换
|
var time = new Date(t);
|
var y = time.getFullYear();
|
var m = time.getMonth() + 1;
|
var d = time.getDate();
|
return y + '-' + this.add0(m) + '-' + this.add0(d);
|
}
|
}
|
};
|
</script>
|
|
<style>
|
.mr15{
|
margin-right: 15rpx;
|
}
|
.diy-article {
|
background: #ffffff;
|
margin: 20rpx 0px;
|
padding:0px 10rpx;
|
border-radius: 6rpx;
|
box-shadow: 0px 8rpx 3rpx 0px rgba(6, 0, 1, 0.03);
|
}
|
|
.diy-bg{
|
background-size: 100%;
|
}
|
|
.diy-article .show-type__10,
|
.diy-article .show-type__20 {
|
display: flex;
|
padding: 20rpx;
|
border-bottom: 1rpx solid #eeeeee;
|
}
|
|
.diy-article .show-type__10:last-child,
|
.diy-article .show-type__20:last-child {
|
border-bottom: none;
|
}
|
|
.diy-article .show-type__10 .picture {
|
width: 246rpx;
|
height: 140rpx;
|
border-radius: 12rpx;
|
|
}
|
|
.diy-article .show-type__10 .title {
|
height: 80rpx;
|
}
|
|
.diy-article .show-type__10 .des {
|
height: 36rpx;
|
}
|
|
.diy-article .show-type__10 .icon.iconfont {
|
font-size: 18rpx;
|
color: #999999;
|
}
|
|
.diy-article .hdzq-icon {
|
width: 100%;
|
}
|
|
.diy-article .hdzq-icon image {
|
width: auto;
|
height: 80rpx;
|
}
|
</style>
|