<template>
|
<view class="box">
|
<scroll-view class="box_list" scroll-x>
|
<view class="box_list_item">
|
<image src="@/static/uni.png" mode="widthFix"></image>
|
<text>查看全部</text>
|
</view>
|
<view class="box_list_item">
|
<image class="active" src="@/static/uni.png" mode="widthFix"></image>
|
<text>行业简讯</text>
|
</view>
|
<view class="box_list_item">
|
<image src="@/static/uni.png" mode="widthFix"></image>
|
<text>原创文章</text>
|
</view>
|
</scroll-view>
|
<view class="box_cate">
|
<view class="box_cate_box">
|
<view class="box_cate_item" v-for="(item, index) in cate" :key="index" @click="i = index">
|
<text :class="i === index ? 'activeColor' : ''">{{item.name}}</text>
|
<view class="active" v-show="i === index"></view>
|
</view>
|
</view>
|
</view>
|
<view class="box_list1">
|
<shopitem @jump="jump" />
|
<shopitem @jump="jump" />
|
<shopitem @jump="jump" />
|
</view>
|
</view>
|
</template>
|
|
<script>
|
import shopitem from '@/components/ShopItem/index.vue'
|
export default {
|
data() {
|
return {
|
i: 0,
|
cate: [
|
{
|
name: '最新'
|
},
|
{
|
name: '最热'
|
}
|
]
|
}
|
},
|
components: { shopitem },
|
methods: {
|
jump() {
|
uni.navigateTo({
|
url: '/pages/InformationDetails/index'
|
});
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.box {
|
width: 100%;
|
padding: 32rpx;
|
box-sizing: border-box;
|
.box_list {
|
width: 100%;
|
white-space: nowrap;
|
.box_list_item {
|
width: 120rpx;
|
display: inline-flex;
|
flex-direction: column;
|
align-items: center;
|
margin-left: 68rpx;
|
&:first-child {
|
margin-left: 0 !important;
|
}
|
.active {
|
box-sizing: border-box;
|
border: 3rpx solid #D20A0A;
|
}
|
image {
|
width: 120rpx;
|
height: 120rpx;
|
border-radius: 50%;
|
}
|
text {
|
font-size: 24rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #666666;
|
margin-top: 18rpx;
|
}
|
}
|
}
|
.box_cate {
|
width: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
margin-top: 38rpx;
|
.box_cate_box {
|
width: 300rpx;
|
display: flex;
|
align-items: center;
|
.box_cate_item {
|
flex: 1;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
flex-direction: column;
|
.activeColor {
|
font-size: 32rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #333333;
|
}
|
.active {
|
width: 40rpx;
|
height: 4rpx;
|
background: #D20A0A;
|
border-radius: 12rpx;
|
margin-top: 8rpx;
|
}
|
text {
|
font-size: 28rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #666666;
|
}
|
}
|
}
|
}
|
.box_list1 {
|
width: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
flex-wrap: wrap;
|
margin-top: 24rpx;
|
}
|
}
|
</style>
|