|
|
@ -14,7 +14,11 @@
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<img src="~/assets/img/layout/icon-shop.png" />
|
|
|
|
<img src="~/assets/img/layout/icon-shop.png" />
|
|
|
|
<span>购物车</span>
|
|
|
|
<span>购物车</span>
|
|
|
|
<div v-if="cartCount > 0" class="wrap-right-cart__tip">
|
|
|
|
<div
|
|
|
|
|
|
|
|
v-if="cartCount > 0"
|
|
|
|
|
|
|
|
class="wrap-right-cart__tip flex flex-middle flex-center"
|
|
|
|
|
|
|
|
:class="{ 'wrap-right-cart__tip--more': cartCount > 10 }"
|
|
|
|
|
|
|
|
>
|
|
|
|
{{ cartCount }}
|
|
|
|
{{ cartCount }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -23,27 +27,27 @@
|
|
|
|
v-for="item in products"
|
|
|
|
v-for="item in products"
|
|
|
|
:key="item.id"
|
|
|
|
:key="item.id"
|
|
|
|
@click="onJumpGoodsDetail(item.product.id)"
|
|
|
|
@click="onJumpGoodsDetail(item.product.id)"
|
|
|
|
class="header-cart-products__wrap flex flex-middle flex-between"
|
|
|
|
class="header-cart-products__wrap flex flex-middle"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<div class="cart-products-wrap__left flex felx-middle">
|
|
|
|
<div class="cart_products-wrap_cover">
|
|
|
|
<div class="products-wrap-left__cover">
|
|
|
|
<img :src="item.productMainPicture" />
|
|
|
|
<img :src="item.productMainPicture" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="cart-products-wrap_info">
|
|
|
|
|
|
|
|
<div class="products-wrap-info__top flex flex-between">
|
|
|
|
|
|
|
|
<p class="wrap-info-top__title">{{ item.productName }}</p>
|
|
|
|
|
|
|
|
<UiMoney
|
|
|
|
|
|
|
|
class="wrap-info-top__price"
|
|
|
|
|
|
|
|
:float="true"
|
|
|
|
|
|
|
|
:money="item.product.startingPrice"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="products-wrap-left__info">
|
|
|
|
<div class="products-wrap-info__bottom flex flex-between">
|
|
|
|
<p class="wrap-left-info__title">{{ item.productName }}</p>
|
|
|
|
<span class="wrap-info-bottom__skuname">{{
|
|
|
|
<div class="wrap-left-info__detail flex">
|
|
|
|
item.productSku.name
|
|
|
|
<span class="left-info-detail__skuname">{{
|
|
|
|
}}</span>
|
|
|
|
item.productSku.name
|
|
|
|
<span class="wrap-info-bottom__count">{{ item.number }}</span>
|
|
|
|
}}</span>
|
|
|
|
|
|
|
|
<span class="left-info-detail__count">{{ item.number }}</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<UiMoney
|
|
|
|
|
|
|
|
class="cart-products-wrap__right"
|
|
|
|
|
|
|
|
:float="true"
|
|
|
|
|
|
|
|
:money="item.product.startingPrice"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- 失效商品 -->
|
|
|
|
<!-- 失效商品 -->
|
|
|
|
<template v-if="failureProducts.length > 0">
|
|
|
|
<template v-if="failureProducts.length > 0">
|
|
|
@ -52,31 +56,31 @@
|
|
|
|
v-for="item in failureProducts"
|
|
|
|
v-for="item in failureProducts"
|
|
|
|
:key="item.id"
|
|
|
|
:key="item.id"
|
|
|
|
@click="onJumpGoodsDetail(item.product.id)"
|
|
|
|
@click="onJumpGoodsDetail(item.product.id)"
|
|
|
|
class="header-cart-products__wrap flex flex-middle flex-between"
|
|
|
|
class="header-cart-products__wrap flex flex-middle"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<div class="cart-products-wrap__left flex felx-middle">
|
|
|
|
<div class="cart_products-wrap_cover">
|
|
|
|
<div class="products-wrap-left__cover">
|
|
|
|
<img :src="item.productMainPicture" />
|
|
|
|
<img :src="item.productMainPicture" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="cart-products-wrap_info">
|
|
|
|
<div class="products-wrap-left__info">
|
|
|
|
<div class="products-wrap-info__top flex flex-between">
|
|
|
|
<p
|
|
|
|
<p
|
|
|
|
class="wrap-left-info__title header-cart-products--failure-color"
|
|
|
|
class="wrap-info-top__title header-cart-products--failure-color"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
{{ item.productName }}
|
|
|
|
{{ item.productName }}
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<div class="wrap-left-info__detail flex">
|
|
|
|
<UiMoney
|
|
|
|
<span class="left-info-detail__skuname">{{
|
|
|
|
class="header-cart-products--failure-color"
|
|
|
|
item.productSku && item.productSku.name
|
|
|
|
:float="true"
|
|
|
|
}}</span>
|
|
|
|
:money="item.product.startingPrice"
|
|
|
|
<span class="left-info-detail__count">{{ item.number }}</span>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="products-wrap-info__bottom flex flex-between">
|
|
|
|
|
|
|
|
<span class="wrap-info-bottom__skuname">{{
|
|
|
|
|
|
|
|
item.productSku.name
|
|
|
|
|
|
|
|
}}</span>
|
|
|
|
|
|
|
|
<span class="wrap-info-bottom__count">{{ item.number }}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<UiMoney
|
|
|
|
|
|
|
|
class="header-cart-products--failure-color"
|
|
|
|
|
|
|
|
:float="true"
|
|
|
|
|
|
|
|
:money="item.product.startingPrice"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -157,7 +161,7 @@ export default {
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
|
|
<style lang="scss">
|
|
|
|
.header-cart-popover {
|
|
|
|
.header-cart-popover {
|
|
|
|
padding: 16px 20px;
|
|
|
|
padding: 16px 20px !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
<style lang="scss" scoped>
|
|
|
@ -170,15 +174,18 @@ export default {
|
|
|
|
border: 1px solid #eeeeee;
|
|
|
|
border: 1px solid #eeeeee;
|
|
|
|
cursor: pointer;
|
|
|
|
cursor: pointer;
|
|
|
|
.wrap-right-cart__tip {
|
|
|
|
.wrap-right-cart__tip {
|
|
|
|
min-width: 14px;
|
|
|
|
width: 16px;
|
|
|
|
height: 14px;
|
|
|
|
height: 16px;
|
|
|
|
padding: 0 3px;
|
|
|
|
|
|
|
|
font-size: 10px;
|
|
|
|
font-size: 10px;
|
|
|
|
line-height: 14px;
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
background: #ff512b;
|
|
|
|
background: #ff512b;
|
|
|
|
border-radius: 50%;
|
|
|
|
border-radius: 50%;
|
|
|
|
color: #ffffff;
|
|
|
|
color: #ffffff;
|
|
|
|
|
|
|
|
margin-left: 4px;
|
|
|
|
|
|
|
|
&--more {
|
|
|
|
|
|
|
|
width: unset;
|
|
|
|
|
|
|
|
padding: 0 4px;
|
|
|
|
|
|
|
|
border-radius: 7px;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
img {
|
|
|
|
img {
|
|
|
|
width: 16px;
|
|
|
|
width: 16px;
|
|
|
@ -189,7 +196,7 @@ export default {
|
|
|
|
.header-cart-popover {
|
|
|
|
.header-cart-popover {
|
|
|
|
padding: 20px 16px;
|
|
|
|
padding: 20px 16px;
|
|
|
|
.header-cart-products {
|
|
|
|
.header-cart-products {
|
|
|
|
padding: 0 10px 50px 0;
|
|
|
|
padding: 0 10px 20px 0;
|
|
|
|
max-height: 360px;
|
|
|
|
max-height: 360px;
|
|
|
|
overflow: auto;
|
|
|
|
overflow: auto;
|
|
|
|
&--failure-color {
|
|
|
|
&--failure-color {
|
|
|
@ -198,23 +205,24 @@ export default {
|
|
|
|
.header-cart-products__wrap {
|
|
|
|
.header-cart-products__wrap {
|
|
|
|
margin-bottom: 20px;
|
|
|
|
margin-bottom: 20px;
|
|
|
|
cursor: pointer;
|
|
|
|
cursor: pointer;
|
|
|
|
.cart-products-wrap__left {
|
|
|
|
.cart_products-wrap_cover {
|
|
|
|
.products-wrap-left__cover {
|
|
|
|
width: 60px;
|
|
|
|
|
|
|
|
height: 60px;
|
|
|
|
|
|
|
|
padding: 3px;
|
|
|
|
|
|
|
|
border: 1px solid #eeeeee;
|
|
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
|
|
margin-right: 11px;
|
|
|
|
|
|
|
|
img {
|
|
|
|
width: 54px;
|
|
|
|
width: 54px;
|
|
|
|
height: 54px;
|
|
|
|
height: 54px;
|
|
|
|
padding: 3px;
|
|
|
|
|
|
|
|
border: 1px solid #eeeeee;
|
|
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
|
|
margin-right: 11px;
|
|
|
|
|
|
|
|
img {
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.products-wrap-left__info {
|
|
|
|
}
|
|
|
|
font-size: 12px;
|
|
|
|
.cart-products-wrap_info {
|
|
|
|
color: #999999;
|
|
|
|
font-size: 12px;
|
|
|
|
.wrap-left-info__title {
|
|
|
|
color: #999999;
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
.products-wrap-info__top {
|
|
|
|
|
|
|
|
.wrap-info-top__title {
|
|
|
|
display: block;
|
|
|
|
display: block;
|
|
|
|
width: 120px;
|
|
|
|
width: 120px;
|
|
|
|
@include ellipsis;
|
|
|
|
@include ellipsis;
|
|
|
@ -222,24 +230,24 @@ export default {
|
|
|
|
color: #333333;
|
|
|
|
color: #333333;
|
|
|
|
margin-bottom: 10px;
|
|
|
|
margin-bottom: 10px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.wrap-left-info__detail {
|
|
|
|
.wrap-info-top__price {
|
|
|
|
.left-info-detail__skuname {
|
|
|
|
color: #ff512b;
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
width: 70px;
|
|
|
|
}
|
|
|
|
@include ellipsis;
|
|
|
|
.products-wrap-info__bottom {
|
|
|
|
}
|
|
|
|
.wrap-info-bottom__skuname {
|
|
|
|
.left-info-detail__count {
|
|
|
|
display: block;
|
|
|
|
&::before {
|
|
|
|
width: 145px;
|
|
|
|
content: "X";
|
|
|
|
@include ellipsis;
|
|
|
|
font-size: 8px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.wrap-info-bottom__count {
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
|
|
|
|
content: "X";
|
|
|
|
|
|
|
|
font-size: 8px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.cart-products-wrap__right {
|
|
|
|
|
|
|
|
color: #ff512b;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.header-cart-products__bar {
|
|
|
|
.header-cart-products__bar {
|
|
|
|
font-size: 14px;
|
|
|
|
font-size: 14px;
|
|
|
|