<template>
    <view>
        <view class="box" >
            <view class="leftbox" @click="linkDetails(info[0])">
                <view class="leftbox_title">
                    <u--image class="" width="40rpx" height="40rpx" src="/static/index/iconm_goutong.png" ></u--image>
                    <view style="margin-left:16rpx">精选互动</view> 
                </view>
                <view class="leftbox_content">
                    {{info[0].title}}
                </view>
                <view class="leftbox_num">
                    {{info[0].views}} 人正在互动
                </view>
            </view>
            <view class="rightbox">
                <view class="rightbox_item" @click="linkDetails(info[1])">
                    <view class="rightbox_title">
                        <u--image style="float: left;margin-left: 20rpx;" class="" width="40rpx" height="40rpx" src="/static/index/iconm_goutong.png" ></u--image>
                        <view style="margin-left:16rpx">{{info[1].title}}</view> 
                    </view>
                    <view class="leftbox_num">
                        {{info[1].views}} 人正在互动
                    </view>
                </view>
                <view style="margin-top: 20rpx;background: #EAF0FF;" class="rightbox_item" @click="linkDetails(info[2])">
                    <view class="rightbox_title">
                        <u--image style="float: left;margin-left: 20rpx;" class="" width="40rpx" height="40rpx" src="/static/index/iconm_goutong.png" ></u--image>
                        <view style="margin-left:16rpx">{{info[2].title}}</view> 
                    </view>
                    <view class="leftbox_num">
                        {{info[2].views}} 人正在互动
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>
<script>
export default {
props: {
    info: {
        type: Array,
        default: [],
    },
},
// watch:{
//     info: {
//         immediate: true,
//         handler(val) {
//            console.log(val);
//         },
//     }
// },
data() {
    return {
        
    }
},
onLoad() {

},
methods: {
    linkDetails(e){
        uni.navigateTo({
             url: '/pages/home/ArticleDetails?id=' + e.id
        });
    }
}
}
</script>

<style>
.box{
    display: flex;
    margin: 20rpx auto;
    justify-content: center;
    background: white;
    padding: 20rpx 0;
}
.leftbox{
    width: 343rpx;
    height: 400rpx;
    background: #FFF7EC;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    opacity: 1;
    
    display: flex;
    flex-direction: column;
    justify-content: space-around;

}
.rightbox{
    margin-left: 20rpx;
    width: 356rpx;
    height: 320rpx;
    background: white;
    opacity: 1;
}
.rightbox_item{
    width: 343rpx;
    height: 192rpx;
    background: #EFF9F1;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    opacity: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}
.leftbox_title{
    display: flex;
    font-weight: 400;
    color: #666666;
    font-size: 28rpx;
    padding-left: 40rpx;
}
.leftbox_content{
    width: 252rpx;
    font-size: 28rpx;
    font-weight: bold;
    color: #333333;
    margin: 0 auto;

    height: 180rpx;

    display: -webkit-box;
    word-break: break-all;
    text-overflow: ellipsis;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp:3;
}
.leftbox_num{
    width: 185rpx;
    height: 33rpx;
    font-size: 24rpx;
    font-weight: 400;
    color: #999999;
    
    padding-left: 40rpx;
}
.rightbox_title{
    display: flex;
    margin-left: 20rpx;
    width: 288rpx;
    height: 70rpx;
    font-size: 28rpx;
    font-weight: bold;
    color: #333333;

    /* display: -webkit-box; */
    word-break: break-all;
    text-overflow: ellipsis;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp:2;
}
</style>
    