32 changed files with 822 additions and 924 deletions
|
After Width: | Height: | Size: 825 B |
|
After Width: | Height: | Size: 234 B |
@ -0,0 +1,104 @@ |
|||||
|
<template> |
||||
|
<div class="brand-recommend"> |
||||
|
<p class="title">热门推荐</p> |
||||
|
<ScrollView :list="list" scroll-x class="content"> |
||||
|
<div class="recommend-content"> |
||||
|
<div class="group-item" @click="handleShop(item)" v-for="item of list" :key="item.shopId"> |
||||
|
<div class="logo-wrapper"> |
||||
|
<img loading="lazy" :src="config.sourceUrl + item.materialList?.[0]" alt="" class="shop-logo" /> |
||||
|
</div> |
||||
|
<p class="name"> |
||||
|
<span class="shop-name">{{ switchLanguage(item, 'shopName') }}</span> |
||||
|
<span class="name-right"><img :src="config.sourceUrl + item.industryUrl" class="format-icon" alt="" />{{ item.floor }}</span> |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</ScrollView> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script setup> |
||||
|
import ScrollView from '@/base/ScrollView/ScrollView.vue' |
||||
|
|
||||
|
defineProps({ |
||||
|
list: Array, |
||||
|
config: Object |
||||
|
}) |
||||
|
const emits = defineEmits(['click']) |
||||
|
|
||||
|
function handleShop(item) { |
||||
|
emits('click', item) |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.brand-recommend { |
||||
|
margin-left: 170px; |
||||
|
|
||||
|
.title { |
||||
|
font-weight: 700; |
||||
|
font-size: 24px; |
||||
|
font-family: 'font_bold'; |
||||
|
color: rgba(0, 0, 0, 0.8); |
||||
|
padding-bottom: 12px; |
||||
|
} |
||||
|
.content { |
||||
|
width: 910px; |
||||
|
overflow: hidden; |
||||
|
margin-bottom: 40px; |
||||
|
} |
||||
|
.recommend-content { |
||||
|
display: inline-block; |
||||
|
white-space: nowrap; |
||||
|
padding-top: 32px; |
||||
|
height: 255px; |
||||
|
} |
||||
|
.group-item { |
||||
|
display: inline-block; |
||||
|
width: 320px; |
||||
|
height: 220px; |
||||
|
background: rgba(255, 255, 255, 0.4); |
||||
|
border-radius: 8px; |
||||
|
overflow: hidden; |
||||
|
margin-right: 16px; |
||||
|
} |
||||
|
.logo-wrapper { |
||||
|
width: 320px; |
||||
|
height: 180px; |
||||
|
background-color: #fff; |
||||
|
} |
||||
|
.shop-logo { |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
border-radius: 8px; |
||||
|
object-fit: cover; |
||||
|
} |
||||
|
.name { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: space-between; |
||||
|
padding: 13px 12px; |
||||
|
} |
||||
|
.shop-name { |
||||
|
font-weight: 700; |
||||
|
font-size: 12px; |
||||
|
line-height: 14px; |
||||
|
font-family: 'font_bold'; |
||||
|
color: rgba(0, 0, 0, 0.6); |
||||
|
} |
||||
|
.name-right { |
||||
|
font-weight: 700; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
font-size: 12px; |
||||
|
line-height: 14px; |
||||
|
font-family: 'font_bold'; |
||||
|
color: rgba(0, 0, 0, 0.4); |
||||
|
} |
||||
|
.format-icon { |
||||
|
width: 14px; |
||||
|
height: 14px; |
||||
|
margin-right: 8px; |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,52 @@ |
|||||
|
<template> |
||||
|
<ScrollView class="brand-scroll" :list="list"> |
||||
|
<div class="brand-content"> |
||||
|
<div class="groups" v-for="item of list" v-show="item.shopList.length" :key="item.name"> |
||||
|
<h1 class="info">{{ item.name }}</h1> |
||||
|
<TransitionGroup name="zoom" mode="out-in" tag="div" class="group"> |
||||
|
<ShopItem :config="config" :shop="shop" @click="handleShop(shop)" v-for="shop of item.shopList" :key="shop.shopId" /> |
||||
|
</TransitionGroup> |
||||
|
</div> |
||||
|
</div> |
||||
|
</ScrollView> |
||||
|
</template> |
||||
|
|
||||
|
<script setup> |
||||
|
import ShopItem from '@/base/ShopItem/ShopItem.vue' |
||||
|
import ScrollView from '@/base/ScrollView/ScrollView.vue' |
||||
|
|
||||
|
defineProps({ |
||||
|
list: Array, |
||||
|
config: Object |
||||
|
}) |
||||
|
|
||||
|
const emits = defineEmits(['click']) |
||||
|
function handleShop(item) { |
||||
|
emits('click', item) |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.brand-scroll { |
||||
|
overflow: hidden; |
||||
|
height: 1255px; |
||||
|
margin-left: 170px; |
||||
|
} |
||||
|
.brand-content { |
||||
|
padding-top: 20px; |
||||
|
padding-bottom: 180px; |
||||
|
} |
||||
|
.info { |
||||
|
font-weight: 700; |
||||
|
font-size: 24px; |
||||
|
font-family: 'font_bold'; |
||||
|
color: rgba(0, 0, 0, 0.8); |
||||
|
padding-bottom: 20px; |
||||
|
} |
||||
|
.group { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(3, 212px); |
||||
|
gap: 24px 8px; |
||||
|
margin-bottom: 24px; |
||||
|
} |
||||
|
</style> |
||||
Loading…
Reference in new issue