<template>
|
|
<view class="flex card" @click="jumpToList(data.id, data.title)">
|
|
<image class="card-icon" :src="data.icon" mode="aspectFit"></image>
|
|
<view class="flex card-title">
|
|
<view>{{ data.title }}</view>
|
|
<image class="card-title-icon" src="@/static/image/serve-second-icon.png" mode="widthFix"></image>
|
|
</view>
|
|
|
|
<image class="card-bg" src="@/static/image/card-bg-icon.png" mode="widthFix"></image>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
data: {
|
|
type: Object,
|
|
default() {
|
|
return {}
|
|
}
|
|
}
|
|
},
|
|
methods: {
|
|
jumpToList(categoryId, title) {
|
|
uni.navigateTo({
|
|
url: `/pages_order/serve/search?categoryId=${categoryId}&title=${title}`
|
|
})
|
|
},
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.card {
|
|
justify-content: flex-start;
|
|
column-gap: 78rpx;
|
|
position: relative;
|
|
width: 100%;
|
|
height: 200rpx;
|
|
padding: 0 28rpx;
|
|
box-sizing: border-box;
|
|
background: linear-gradient(to right, rgba($color: #C8C3FD, $alpha: 0.22), #FFFFFF);
|
|
border-radius: 10rpx;
|
|
box-shadow: 4rpx 4rpx 6rpx 0rpx rgba(0,0,0,0.15);
|
|
|
|
&-icon {
|
|
width: 180rpx;
|
|
height: 230rpx;
|
|
}
|
|
|
|
&-title {
|
|
column-gap: 14rpx;
|
|
font-size: 32rpx;
|
|
font-weight: 600;
|
|
color: #9082D8;
|
|
|
|
&-icon {
|
|
width: 24rpx;
|
|
height: auto;
|
|
}
|
|
}
|
|
|
|
&-bg {
|
|
width: 142rpx;
|
|
height: auto;
|
|
position: absolute;
|
|
bottom: 0;
|
|
right: 8rpx;
|
|
}
|
|
}
|
|
</style>
|