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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<template>
    <div class="prod-list-component">
        <div class="prod-list-box"
             v-for="(item, index) in lists"
             :key="index"
             @click="productJump(item)">
            <div class="prod-list-container">
                <div class="getTime vux-1px-b" v-if="item.applyTime">点击时间:{{item.applyTime}}</div>
                <div class="prod-box">
                    <div class="prod-logo">
                        <img :src="item.content[0]" alt="logo">
                    </div>
                    <div class="prod-info">
                        <div class="prod-title-box">
                            <span class="prod-title">{{ item.content[1] }}</span>
                            <span v-if="item.content[2]" class="prod-tag vux-1px">{{ item.content[2] }}</span>
                        </div>
                        <div class="prod-content">
                            <div class="content-left">
                                <div>{{ item.content[3] }}:<span class="high-light">{{ item.content[4] }}</span></div>
                                <div>{{ item.content[7] }}</div>
                            </div>
                            <div class="content-right">
                                <div>{{ item.content[5] }}:<span class="high-light">{{ item.content[6] }}</span></div>
                                <div>{{ item.applyNumber }}</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="gutter" v-if="gutter"></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.
     * 组件的命名 项目名(F---filean) + 组件的描述(区别与框架的组件)
     * 全局的产品列表----可见设计规范图
     * 这是产品列表
     * @params
     * @lists {Array} 渲染的数据
     * @gutter {Boolean} 每个产品之间是否需要间距
     *
     */
    export default {
        name: 'f-product-list',
        props: {
            lists: {
                type: Array,
            },
            gutter: {
                type: Boolean,
                default: false
            },
            showNone: {
                type: Boolean,
                default: false
            }
        },
        methods: {
            // 产品的点击的跳转
            productJump(item) {
                this.$emit('on-click-prodItem', item);
            }
        }
    }
</script>
 
<style lang="less">
    @import '../../style/mixin.less';
 
    .vux-1px:before {
        border-radius: @border-radius-normal-size;
    }
 
    .prod-list-component {
        overflow: hidden;
        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;
            }
        }
        .prod-list-box {
            min-height: 88px;
            .gutter {
                height: 10px;
                background-color: @color-background-default;
            }
            .prod-list-container {
                box-sizing: border-box;
                padding: 0 12px;
            }
            .getTime {
                height: 32px;
                line-height: 32px;
                font-size: @font-size-small;
                color: @color-text-placeholder-red;
            }
            .prod-box {
                .flexLayout(flex-start, center, row);
                box-sizing: border-box;
                padding: 14px 0;
                .prod-logo {
                    width: 64px;
                    height: 64px;
                    border-radius: @border-radius-normal-size;
                    text-align: center;
                    img {
                        width: 64px;
                        height: 64px;
                    }
                }
                .prod-info {
                    margin-left: 15px;
                    .prod-title-box {
                        margin-bottom: 5px;
                        .flexLayout();
                        .prod-title {
                            font-size: @font-size-medium;
                            .ellipsis(145px);
                        }
                        .prod-tag {
                            margin-left: 10px;
                            box-sizing: border-box;
                            color: @color-primary-light;
                            padding: 2px 2px 1px;
                            font-size: @font-size-tiny;
                            text-align: center;
                            vertical-align: middle;
                        }
                        .vux-1px:before {
                            border-radius: 0 !important;
                            border: 1Px solid @color-primary-light !important;
                        }
                    }
                    .prod-content {
                        .flexLayout(flex-start, center, row);
                        div {
                            div {
                                color: @color-text-third;
                                .high-light {
                                    color: @color-text-placeholder-red !important;
                                }
                                span {
                                    font-size: @font-size-small;
                                }
                            }
                        }
                        .content-left {
                            width: 155px;
                        }
                        .content-right {
                            width: 110px;
                            .high-light {
                                transform: scale(0.9);
                                font-size: 12px;
                            }
                        }
                    }
                }
            }
        }
    }
 
    @media only screen
    and ( min-device-width: 320Px )
    and ( max-device-width: 320Px )
    and ( -webkit-min-device-pixel-ratio: 1 )
    and ( orientation: portrait ) {
        .prod-list-component {
            .prod-list-box {
                .prod-box {
                    .prod-info {
                        margin-left: 5px;
                        .prod-title-box {
                            margin-bottom: 5px;
                            .prod-title {
                                display: inline-block;
                                width: 120px !important;
                                font-size: @font-size-medium;
                                transform: scale(0.9);
                            }
                            .prod-tag {
                                margin-left: 5px;
                            }
                        }
                        .prod-content {
                            .flexLayout(flex-start, center, row);
                            div {
                                div {
                                    color: @color-text-third;
                                    .high-light {
                                        color: @color-text-placeholder-red;
                                    }
                                    span {
                                        font-size: @font-size-small;
                                    }
                                }
                            }
                            .content-left {
                                width: 120px !important;
                                font-size: 12px;
                                transform: scale(0.9);
                                .high-light {
                                    transform: scale(0.9);
                                    display: inline-block;
 
                                }
                            }
                            .content-right {
                                /*margin-left: 8px;*/
                                width: 119px !important;
                                transform: scale(0.9);
                                .high-light {
                                    transform: scale(0.9);
                                    font-size: 12px;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
</style>