226 lines
4.9 KiB
Vue
226 lines
4.9 KiB
Vue
<template>
|
||
<view class="industry--list">
|
||
<block v-if="list.length > 0">
|
||
<view class="industry--box" v-for="(item, index) in list" :key="index" @click="industry(item)">
|
||
<image class="industry--cover" :src="item.cover" mode="aspectFill"></image>
|
||
<view class="industry--vip">{{item.level.name}}</view>
|
||
<view class="industry--content">
|
||
<view class="industry--title nowrap">{{item.name}}</view>
|
||
<view class="industry--credit">信用值 {{item.integrity}}</view>
|
||
<view class="industry--trade nowrap" v-if="item.industry">行业:{{item.industry.title}}</view>
|
||
<view class="industry--bar">
|
||
<view class="industry--color">
|
||
<view class="industry--strip" :style="{width: item.process + '%'}"></view>
|
||
</view>
|
||
<view class="industry--per">{{item.process}}%</view>
|
||
</view>
|
||
<!-- <view class="industry--credibility">
|
||
<uni-rate
|
||
:readonly="true"
|
||
color="#ddd"
|
||
active-color="#e93340"
|
||
:value="item.star"
|
||
:size="14"
|
||
/>
|
||
</view> -->
|
||
<!-- <uni-icons class="industry--arrow" type="arrowright" color="#ddd" size="14" /> -->
|
||
<view class="industry--tool">
|
||
<view class="industry--deal">
|
||
权证数<text class="industry--number">{{item.goodsCount}}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</block>
|
||
<block v-else>
|
||
<view class="industry--null">
|
||
|
||
|
||
|
||
</view>
|
||
</block>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
export default {
|
||
name: "industry-list",
|
||
props: {
|
||
// 数据列表
|
||
list: {
|
||
type: Array,
|
||
default: () => {
|
||
return new Array
|
||
}
|
||
},
|
||
// 列表空提示
|
||
toast: {
|
||
type: String,
|
||
default: '暂无商品数据 -_-!'
|
||
}
|
||
},
|
||
methods: {
|
||
industry(e) {
|
||
this.$emit('on-industry', e)
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
// 列表信息
|
||
.industry--list {
|
||
padding-bottom: $padding;
|
||
}
|
||
|
||
.industry--box {
|
||
position: relative;
|
||
margin: $margin - 10 $margin;
|
||
background: white;
|
||
border-radius: $radius/2;
|
||
padding: $padding ($padding*3) $padding ($padding * 2 + 128);
|
||
min-height: 128rpx;
|
||
|
||
.industry--vip {
|
||
position: absolute;
|
||
top: $padding;
|
||
left: $padding;
|
||
background-color: #191919;
|
||
color: #f3c8a8;
|
||
font-size: 24rpx;
|
||
line-height: 32rpx;
|
||
padding: 0 8rpx;
|
||
border-radius: 6rpx 6rpx 6rpx 0;
|
||
}
|
||
|
||
.industry--cover {
|
||
position: absolute;
|
||
left: $padding;
|
||
top: $padding;
|
||
width: 128rpx;
|
||
height: 128rpx;
|
||
}
|
||
|
||
.industry--title {
|
||
font-weight: bold;
|
||
font-size: $title-size-lg;
|
||
width: 80%;
|
||
line-height: 40rpx;
|
||
}
|
||
|
||
.industry--credit {
|
||
font-size: 22rpx;
|
||
display: inline-block;
|
||
font-weight: normal;
|
||
color: #ec652f;
|
||
border: 2rpx solid #ec652f;
|
||
line-height: 36rpx;
|
||
border-radius: 6rpx;
|
||
padding: 0 6rpx;
|
||
margin: 10rpx 0;
|
||
}
|
||
|
||
.industry--trade {
|
||
font-size: 24rpx;
|
||
color: $text-gray;
|
||
line-height: 40rpx;
|
||
}
|
||
|
||
.industry--bar {
|
||
display: flex;
|
||
width: 70%;
|
||
margin-top: 4rpx;
|
||
|
||
.industry--color {
|
||
background: #ebebeb;
|
||
border-left: 2rpx solid transparent;
|
||
border-right: 2rpx solid transparent;
|
||
width: calc(100% - 50rpx);
|
||
border-radius: 60rpx;
|
||
margin: 6rpx 10rpx 0 0;
|
||
height: 18rpx;
|
||
|
||
.industry--strip {
|
||
background-color: #ff8562;
|
||
border: 1px solid #ff8562;
|
||
border-radius: 10px;
|
||
box-shadow: 1vw 3vh 10vh rgba(168, 7, 7, 0.8);
|
||
background-size: 3em 3em;
|
||
background-image: linear-gradient(-45deg, transparent 0em, transparent 0.8em, #ec3950 0.9em, #ec3950 2.1em, transparent 2.1em, transparent 2.9em, #ec3950 3.1em);
|
||
height: 14rpx;
|
||
border-radius: 60rpx;
|
||
position: relative;
|
||
|
||
&::after {
|
||
content: '';
|
||
position: absolute;
|
||
top: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
right: 0;
|
||
z-index: 1;
|
||
height: 100%;
|
||
background-image: linear-gradient(to bottom, #db152e, rgba(168, 7, 7, 0.6) 15%, transparent 60%, #db152e);
|
||
border-radius: 20rpx;
|
||
}
|
||
}
|
||
}
|
||
|
||
.industry--per {
|
||
font-size: 20rpx;
|
||
color: rgba(0, 0, 0, 0.8);
|
||
transform: scale(.8);
|
||
}
|
||
}
|
||
|
||
.industry--tool {
|
||
position: absolute;
|
||
top: 60rpx;
|
||
right: $padding;
|
||
|
||
.industry--deal {
|
||
width: 120rpx;
|
||
height: 120rpx;
|
||
text-align: center;
|
||
background: linear-gradient(to bottom, #e1293f, #f85d31);
|
||
box-shadow: 0 0 14rpx rgba(260, 60, 80, .9);
|
||
color: #FFFFFF;
|
||
font-size: 26rpx;
|
||
border-radius: 50%;
|
||
padding-top: 25rpx;
|
||
box-sizing: border-box;
|
||
font-size: 24rpx;
|
||
|
||
.industry--number {
|
||
font-size: 28rpx;
|
||
font-weight: 600;
|
||
display: block;
|
||
margin-top: 4rpx;
|
||
}
|
||
}
|
||
}
|
||
|
||
.industry--credibility {
|
||
padding-top: 8rpx;
|
||
height: 48rpx;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.industry--arrow {
|
||
position: absolute;
|
||
right: $margin;
|
||
top: 50%;
|
||
margin-top: -7px;
|
||
}
|
||
}
|
||
|
||
// 数据空
|
||
.industry--null {
|
||
width: 100%;
|
||
padding: 20vh 0;
|
||
text-align: center;
|
||
font-size: $title-size-m;
|
||
color: $text-gray;
|
||
}
|
||
</style>
|