89 lines
1.7 KiB
Vue
89 lines
1.7 KiB
Vue
|
|
<template>
|
||
|
|
<view class="home-seckill bg-white">
|
||
|
|
<view class="seckill-hd flex row-between">
|
||
|
|
<view class="white xxl bold">商城快讯</view>
|
||
|
|
</view>
|
||
|
|
<view v-if="list" class="goods-seckill">
|
||
|
|
<router-link v-for="(item, index) in list" :key="index"
|
||
|
|
:to="{path: '/bundle_b/pages/mall_news/detail', query: {id: item.id}}">
|
||
|
|
<view class="item bg-white flex">
|
||
|
|
<view class="goods-info m-l-20 flex-1">
|
||
|
|
<view class="goods-name line-2 bold">{{item.title}}</view>
|
||
|
|
<view class="goods-name line-2 m-t-10">{{item.desc}}</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</router-link>
|
||
|
|
</view>
|
||
|
|
<router-link :to="'/bundle_b/pages/mall_news/index'">
|
||
|
|
<view class="xs flex row-center more">查看更多 <u-icon name="arrow-right"></u-icon>
|
||
|
|
</view>
|
||
|
|
</router-link>
|
||
|
|
</view>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
export default {
|
||
|
|
name: "mall-news",
|
||
|
|
props: {
|
||
|
|
list: {
|
||
|
|
type: Array,
|
||
|
|
default: () => ([])
|
||
|
|
}
|
||
|
|
},
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
};
|
||
|
|
},
|
||
|
|
methods: {
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style lang="scss">
|
||
|
|
.home-seckill {
|
||
|
|
border-radius: 14rpx;
|
||
|
|
overflow: hidden;
|
||
|
|
.seckill-hd {
|
||
|
|
padding: 0 20rpx;
|
||
|
|
height: 100rpx;
|
||
|
|
background: url(https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/bg_seckill.png) no-repeat;
|
||
|
|
background-size: 100%;
|
||
|
|
}
|
||
|
|
|
||
|
|
.time-item {
|
||
|
|
display: inline-flex;
|
||
|
|
width: 160rpx;
|
||
|
|
height: 100%;
|
||
|
|
|
||
|
|
&.active {
|
||
|
|
.time {
|
||
|
|
color: $-color-primary;
|
||
|
|
}
|
||
|
|
|
||
|
|
.state {
|
||
|
|
color: $-color-white;
|
||
|
|
background-color: $-color-primary;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
.state {
|
||
|
|
padding: 0 10rpx;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
.goods-seckill .item {
|
||
|
|
padding: 20rpx;
|
||
|
|
.border-btn {
|
||
|
|
border: 1px solid $-color-primary;
|
||
|
|
color: $-color-primary;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
.more {
|
||
|
|
height: 80rpx;
|
||
|
|
border-top: $-solid-border;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</style>
|