ann0707
2018-08-16 c9bc8ec61cff4076132f6396d99d383a2cdf5a03
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<template>
    <div class="card-list-component">
        <div v-if="prodList.length >= 1">
            <div class="card-list-box"
                 :class="{'vux-1px-b': (index + 1) !== prodList.length}"
                 v-for="(item,index) in prodList"
                 :key="index"
                 @click="productJump(item)">
                <div class="card-img">
                    <img :src="item.content[0]" :alt="item.content[1]">
                </div>
                <div class="card-info">
                    <div class="card-title">{{ item.content[1] }}</div>
                    <div class="card-description">{{ item.content[2] }}</div>
                    <div class="card-lines">申请人数:<span>{{item.applyNumber}}</span></div>
                </div>
            </div>
        </div>
        <div class="nothing" v-if="showNone">
            <img src="../assets/img/nothing.png" alt="这里什么都没有哦">
            <p>暂时没有数据~</p>
        </div>
    </div>
</template>
<script>
    /**
     * Created by 吴彦祖 on 2018/3/16.
     * 信用卡列表,用于信用卡贷款的页面
     * @params
     * @lists {Array} 用于展示的数据
     */
    export default {
        name: 'card-list',
        props:{
            showNone:{
                type:Boolean,
                default:false
            },
            prodList: {
                type:Array,
                default:()=>{
                    return [];
                }
            },
        },
        data(){
            return {
            }
        },
        methods:{
            productJump (productId) {
                this.$emit('on-click-prodItem', productId);
            }
        },
        activated(){
        }
    }
</script>
 
<style lang="less">
    @import '../style/mixin.less';
    .card-list-component{
        background-color: @color-white;
        .nothing {
            padding-top: 50px;
            text-align: center;
            img {
                width: 120px;
                height: auto;
            }
            p {
                font-size: @font-size-small;
                line-height: 30px;
                color: @color-text-third;
            }
        }
        .card-list-box{
            .flexLayout(flex-start,center,row);
            height:95px;
            box-sizing: border-box;
            margin:0 12px;
            padding:10px 0;
            .card-img{
                width:34%;
                text-align: center;
                margin-right:12Px;
                border-radius: @border-radius-normal-size;
                img{
                    width:100%;
                    height:100%;
                    border-radius: @border-radius-normal-size;
                }
            }
            .card-info{
                width:60%;
                box-sizing: border-box;
                margin-right: 10px;
                .card-title{
                    font-size:@font-size-medium;
                    margin-bottom:5px;
                }
                .card-description{
                    width:100%;
                    font-size:@font-size-small;
                    color: @color-text-third;
                    .ellipsis(100%);
 
                }
                .card-lines{
                    font-size:@font-size-small;
                    color: @color-text-third;
                    .ellipsis(217px);
                    span{
                        color: @color-text-placeholder-red;
                    }
                }
            }
        }
    }
</style>