|
|
.brand-top-box {
|
|
|
width: 100%;
|
|
|
height: 468px;
|
|
|
color: $white;
|
|
|
background-color: $black;
|
|
|
position: relative;
|
|
|
|
|
|
.brand-bottom {
|
|
|
<template>
|
|
|
<div class="brand-top-box" v-bind:style="{ 'background-image': `url(${brandIntro.brandBg})` }">
|
|
|
<div class="brand-bottom">
|
|
|
<img v-if="brandIntro.showBrandLogo" v-lazy="brandIntro.brandLogo" alt="{{ brandIntro.brandName }}">
|
|
|
<div v-else class="brand-title">{{ brandIntro.brandName }}</div>
|
|
|
<hr>
|
|
|
<div class="brand-intro line-clamp">{{ brandIntro.brandIntro }}</div>
|
|
|
</div>
|
|
|
<div class="expand"></div>
|
|
|
<div class="collapse"></div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<style>
|
|
|
.brand-top-box {
|
|
|
width: 100%;
|
|
|
position: absolute;
|
|
|
bottom: 20px;
|
|
|
height: 468px;
|
|
|
color: #fff;
|
|
|
background-color: #000;
|
|
|
position: relative;
|
|
|
|
|
|
.brand-title {
|
|
|
margin-left: 5%;
|
|
|
font-size: 32px;
|
|
|
}
|
|
|
.brand-bottom {
|
|
|
width: 100%;
|
|
|
position: absolute;
|
|
|
bottom: 20px;
|
|
|
|
|
|
.brand-title {
|
|
|
margin-left: 5%;
|
|
|
font-size: 32px;
|
|
|
}
|
|
|
|
|
|
hr {
|
|
|
width: 90%;
|
|
|
border: #fff solid 1px;
|
|
|
border-top: none;
|
|
|
}
|
|
|
|
|
|
hr {
|
|
|
width: 90%;
|
|
|
border: $white solid 1px;
|
|
|
border-top: none;
|
|
|
.brand-intro {
|
|
|
margin-left: 5%;
|
|
|
width: 90%;
|
|
|
height: 60px;
|
|
|
font-size: 16px;
|
|
|
line-height: 32px;
|
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
|
}
|
|
|
|
|
|
.line-clamp {
|
|
|
width: 82%;
|
|
|
display: -webkit-box;
|
|
|
-webkit-line-clamp: 2;
|
|
|
-webkit-box-orient: vertical;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.brand-intro {
|
|
|
margin-left: 5%;
|
|
|
width: 90%;
|
|
|
.expand {
|
|
|
width: 60px;
|
|
|
height: 60px;
|
|
|
font-size: 16px;
|
|
|
line-height: 32px;
|
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
|
background: url("/channel/expand.png") no-repeat;
|
|
|
position: absolute;
|
|
|
bottom: 20px;
|
|
|
right: 5%;
|
|
|
}
|
|
|
|
|
|
.line-clamp {
|
|
|
width: 82%;
|
|
|
display: -webkit-box;
|
|
|
-webkit-line-clamp: 2;
|
|
|
-webkit-box-orient: vertical;
|
|
|
.collapse {
|
|
|
width: 60px;
|
|
|
height: 60px;
|
|
|
background: url("/channel/collapse.png") no-repeat;
|
|
|
position: absolute;
|
|
|
bottom: 20px;
|
|
|
right: 5%;
|
|
|
display: none;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.expand {
|
|
|
width: 60px;
|
|
|
height: 60px;
|
|
|
background: url("/channel/expand.png") no-repeat;
|
|
|
position: absolute;
|
|
|
bottom: 20px;
|
|
|
right: 5%;
|
|
|
}
|
|
|
</style>
|
|
|
<script>
|
|
|
const $ = require('yoho-jquery');
|
|
|
const tip = require('common/tip');
|
|
|
|
|
|
.collapse {
|
|
|
width: 60px;
|
|
|
height: 60px;
|
|
|
background: url("/channel/collapse.png") no-repeat;
|
|
|
position: absolute;
|
|
|
bottom: 20px;
|
|
|
right: 5%;
|
|
|
display: none;
|
|
|
}
|
|
|
} |
|
|
module.exports = {
|
|
|
props: ['domain'],
|
|
|
data() {
|
|
|
return {
|
|
|
brandIntro: {}
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
domain() {
|
|
|
this.getShopIntro();
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
getShopIntro() {
|
|
|
let data = {
|
|
|
domain: this.domain
|
|
|
};
|
|
|
|
|
|
$.ajax({
|
|
|
url: '/get-brand-intro',
|
|
|
data: data
|
|
|
}).then(result => {
|
|
|
this.brandIntro = result;
|
|
|
}).fail(() => {
|
|
|
tip('网络错误');
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
this.getShopIntro();
|
|
|
}
|
|
|
};
|
|
|
</script> |
...
|
...
|
|