初始上传

This commit is contained in:
2026-04-04 17:27:12 +08:00
parent 4d80d28eb4
commit b7e11774ee
11191 changed files with 1588469 additions and 0 deletions

View File

@@ -0,0 +1,178 @@
<template>
<div class="floor-style-1">
<div class="head-wrap" v-if="data.value.title.value.text">
<h2 @click="$util.pushToTab(data.value.title.value.link.url)" :style="{ color: data.value.title.value.color }">{{ data.value.title.value.text }}</h2>
</div>
<div class="body-wrap">
<div class="left-wrap" v-if="data.value.leftImg.value.url">
<img :src="$img(data.value.leftImg.value.url)" @click="$util.pushToTab(data.value.leftImg.value.link.url)" />
</div>
<ul class="goods-list">
<li v-for="(item, index) in data.value.goodsList.value.list" :key="index" :title="item.goods_name" @click="goSku(item.sku_id)">
<div class="img-wrap">
<img alt="商品图片" :src="$img(item.goods_image.split(',')[0], {size: 'mid'})" @error="imageError(index)" />
</div>
<h3>{{ item.goods_name }}</h3>
<p class="desc">{{ item.introduction }}</p>
<p class="price">
<span class="num">{{ item.discount_price }}</span>
<del v-show="Number.parseInt(item.market_price)">{{ item.market_price }}</del>
</p>
</li>
</ul>
</div>
<div class="bottom-wrap" v-if="data.value.bottomImg.value.url">
<img :src="$img(data.value.bottomImg.value.url)" @click="$util.pushToTab(data.value.bottomImg.value.link.url)" />
</div>
</div>
</template>
<script>
import {mapGetters} from 'vuex';
export default {
name: 'floor-style-1',
props: {
data: {
type: Object
}
},
data() {
return {};
},
created() {
},
computed: {
...mapGetters(['defaultGoodsImage'])
},
methods: {
goSku(skuId) {
this.$util.pushToTab('/sku/' + skuId);
},
imageError(index) {
this.data.value.goodsList.value.list[index].goods_image = this.defaultGoodsImage;
}
}
};
</script>
<style lang="scss" scoped>
.floor-style-1 {
.head-wrap h2 {
line-height: 30px;
color: #333;
padding: 10px;
font-size: 18px;
cursor: pointer;
width: 95%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.body-wrap {
display: flex;
.left-wrap {
width: 234px;
height: 614px;
cursor: pointer;
transition: all 0.2s linear;
&:hover {
z-index: 2;
-webkit-box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
-webkit-transform: translate3d(0, -2px, 0);
transform: translate3d(0, -2px, 0);
}
img {
max-width: 100%;
cursor: pointer;
}
}
.goods-list {
flex: 1;
display: flex;
flex-wrap: wrap;
li {
width: 23%;
margin-left: 19px;
margin-bottom: 20px;
background: #fff;
cursor: pointer;
padding: 10px 0;
transition: all 0.2s linear;
&:hover {
z-index: 2;
-webkit-box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
-webkit-transform: translate3d(0, -2px, 0);
transform: translate3d(0, -2px, 0);
}
.img-wrap {
width: 160px;
height: 160px;
margin: 0 auto 18px;
text-align: center;
line-height: 160px;
img {
max-width: 100%;
max-height: 100%;
}
}
h3 {
font-size: 14px;
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin: 5px 15px;
font-weight: normal;
}
.desc {
margin: 0 30px 10px;
height: 20px;
font-size: 12px;
color: #b0b0b0;
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.price {
margin: 0 10px 14px;
text-align: center;
color: $base-color;
del {
margin-left: 0.5em;
color: #b0b0b0;
}
}
}
}
}
.bottom-wrap {
margin-top: 10px;
width: $width;
height: 118px;
cursor: pointer;
overflow: hidden;
img {
max-width: 100%;
}
}
}
</style>

View File

@@ -0,0 +1,171 @@
<template>
<div class="floor-style-2">
<div class="head-wrap" v-if="data.value.title.value.text">
<h2 @click="$util.pushToTab(data.value.title.value.link.url)" :style="{textAlign: data.value.title.value.textAlign, color: data.value.title.value.color }">{{ data.value.title.value.text }}</h2>
<p @click="$util.pushToTab(data.value.subTitle.value.link.url)" :style="{ color: data.value.subTitle.value.color }" v-if="data.value.subTitle.value.text">{{ data.value.subTitle.value.text }}</p>
</div>
<div class="body-wrap">
<ul class="goods-list">
<li v-for="(item, index) in data.value.goodsList.value.list" :key="index" :title="item.goods_name" @click="goSku(item.sku_id)">
<div class="img-wrap">
<img alt="商品图片" :src="item.goods_image ? $img(item.goods_image.split(',')[0], {size: 'mid'}) : defaultGoodsImage" @error="imageError(index)" />
</div>
<h3>{{ item.goods_name }}</h3>
<p class="desc">{{ item.introduction }}</p>
<p class="price">
<span class="num">{{ item.discount_price }}</span>
<del v-show="Number.parseInt(item.market_price)">{{ item.market_price }}</del>
</p>
</li>
</ul>
</div>
<div class="bottom-wrap" v-if="data.value.bottomImg.value.url">
<img :src="$img(data.value.bottomImg.value.url)" @click="$util.pushToTab(data.value.bottomImg.value.link.url)" />
</div>
</div>
</template>
<script>
import {mapGetters} from 'vuex';
export default {
name: 'floor-style-2',
props: {
data: {
type: Object
}
},
data() {
return {};
},
created() {
},
computed: {
...mapGetters(['defaultGoodsImage'])
},
methods: {
goSku(skuId) {
this.$router.push('/sku/' + skuId);
},
imageError(index) {
this.data.value.goodsList.value.list[index].goods_image = this.defaultGoodsImage;
}
}
};
</script>
<style lang="scss" scoped>
.floor-style-2 {
.head-wrap {
text-align: center;
h2 {
line-height: 30px;
color: #333;
padding: 10px;
font-size: 22px;
cursor: pointer;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
p {
color: #b0b0b0;
padding: 0 10px;
font-size: 14px;
cursor: pointer;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-bottom: 20px;
}
}
.body-wrap {
.goods-list {
display: flex;
flex-wrap: wrap;
li {
width: 19%;
margin-left: 15px;
margin-bottom: 15px;
background: #fff;
cursor: pointer;
padding: 10px 0;
transition: all 0.2s linear;
&:nth-child(5n + 1) {
margin-left: 0;
}
&:hover {
z-index: 2;
-webkit-box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
-webkit-transform: translate3d(0, -2px, 0);
transform: translate3d(0, -2px, 0);
}
.img-wrap {
width: 160px;
height: 160px;
margin: 0 auto 18px;
text-align: center;
line-height: 160px;
img {
max-width: 100%;
max-height: 100%;
}
}
h3 {
font-size: 14px;
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin: 5px 15px;
font-weight: normal;
}
.desc {
margin: 0 30px 10px;
height: 20px;
font-size: 12px;
color: #b0b0b0;
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.price {
margin: 0 10px 14px;
text-align: center;
color: $base-color;
del {
margin-left: 0.5em;
color: #b0b0b0;
}
}
}
}
}
.bottom-wrap {
margin-top: 10px;
width: $width;
height: 118px;
cursor: pointer;
overflow: hidden;
img {
max-width: 100%;
}
}
}
</style>

View File

@@ -0,0 +1,256 @@
<template>
<div class="floor-style-3">
<div class="item-wrap">
<div class="head-wrap">
<div class="title-name" v-if="data.value.title.value.text">
<span :style="{ backgroundColor: data.value.title.value.color }"></span>
<h2 @click="$util.pushToTab(data.value.title.value.link.url)" :style="{ color: data.value.title.value.color }">{{ data.value.title.value.text }}</h2>
</div>
<div class="category-wrap">
<li v-for="(item, index) in data.value.categoryList.value.list" :key="index">
<router-link target="_blank" :to="{ path: '/goods/list', query: { category_id: item.category_id, level: item.level } }">{{ item.category_name }}</router-link>
</li>
</div>
</div>
<div class="body-wrap">
<div class="left-img-wrap">
<img v-if="data.value.leftImg.value.url" :src="$img(data.value.leftImg.value.url)" @click="$util.pushToTab(data.value.leftImg.value.link.url)" />
</div>
<ul class="right-goods-wrap">
<li v-for="(item, index) in data.value.rightGoodsList.value.list" :key="index" @click="goSku(item.sku_id)">
<h4>{{ item.goods_name }}</h4>
<p class="ns-text-color">{{ item.introduction }}</p>
<div class="img-wrap">
<img alt="商品图片" :src="$img(item.goods_image.split(',')[0], {size: 'mid'})" @error="imageErrorRight(index)" />
</div>
</li>
</ul>
<ul class="bottom-goods-wrap">
<li v-for="(item, index) in data.value.bottomGoodsList.value.list" :key="index" @click="goSku(item.sku_id)">
<div class="info-wrap">
<h4>{{ item.goods_name }}</h4>
<p class="ns-text-color">{{ item.introduction }}</p>
</div>
<div class="img-wrap">
<img alt="商品图片" :src="$img(item.goods_image.split(',')[0], {size: 'mid'})" @error="imageErrorBottom(index)" />
</div>
</li>
</ul>
<!-- <ul class="brand-wrap">
<li v-for="(item, index) in data.value.brandList.value.list" :key="index" @click="$util.pushToTab({ path: '/list', query: { brand_id: item.brand_id } })">
<img alt="品牌图片" :src="$img(item.image_url)" />
</li>
</ul> -->
</div>
</div>
</div>
</template>
<script>
import {mapGetters} from 'vuex';
export default {
name: 'floor-style-3',
props: {
data: {
type: Object
}
},
data() {
return {};
},
created() {
},
computed: {
...mapGetters(['defaultGoodsImage'])
},
methods: {
goSku(skuId) {
this.$util.pushToTab('/sku/' + skuId);
},
imageErrorRight(index) {
this.data.value.rightGoodsList.value.list[index].goods_image = this.defaultGoodsImage;
},
imageErrorBottom(index) {
this.data.value.bottomGoodsList.value.list[index].goods_image = this.defaultGoodsImage;
}
}
};
</script>
<style lang="scss" scoped>
.floor-style-3 {
overflow: hidden;
.item-wrap .head-wrap {
height: 50px;
line-height: 50px;
.title-name {
display: inline-block;
span {
float: left;
width: 5px;
height: 21px;
margin-top: 15px;
}
h2 {
float: left;
margin-left: 10px;
font-weight: bold;
font-size: 20px;
}
}
.category-wrap {
float: right;
display: flex;
li {
margin-right: 10px;
}
}
}
.body-wrap {
.left-img-wrap {
width: 190px;
height: 360px;
float: left;
cursor: pointer;
img {
max-width: 100%;
max-height: 100%;
}
}
.right-goods-wrap {
margin-left: 190px;
text-align: center;
overflow: hidden;
li {
float: left;
width: 19.9%;
background: #ffff;
border-width: 0 0 1px 1px;
border-color: #f9f9f9;
border-style: solid;
cursor: pointer;
h4 {
font-size: 14px;
margin: 10px 20px 5px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-weight: normal;
}
p {
font-size: 12px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin: 4px 30px;
height: 20px;
}
}
.img-wrap {
width: 105px;
height: 105px;
line-height: 105px;
display: inline-block;
margin-bottom: 10px;
img {
max-width: 100%;
max-height: 100%;
}
}
}
}
.bottom-goods-wrap {
overflow: hidden;
display: flex;
li {
flex: 1;
background: #fff;
border-width: 0 0 1px 1px;
border-color: #f9f9f9;
border-style: solid;
cursor: pointer;
&:first-child {
border-left: 0;
}
.info-wrap {
display: inline-block;
vertical-align: middle;
text-align: center;
h4 {
font-size: 14px;
margin: 0 10px 5px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: 90px;
font-weight: normal;
}
p {
font-size: 12px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin: 0 20px;
width: 70px;
}
}
.img-wrap {
width: 70px;
height: 70px;
line-height: 70px;
display: inline-block;
vertical-align: middle;
text-align: center;
padding: 10px;
img {
max-width: 100%;
max-height: 100%;
}
}
}
}
.brand-wrap {
display: flex;
background: #fff;
li {
flex: 1;
height: 50px;
cursor: pointer;
line-height: 50px;
text-align: center;
background: #fff;
img {
max-width: 100%;
max-height: 100%;
}
}
}
}
</style>

View File

@@ -0,0 +1,226 @@
<template>
<div class="floor-style-4">
<div class="head-wrap" v-if="data.value.title.value.text">
<h2 @click="$util.pushToTab(data.value.title.value.link.url)" :style="{ color: data.value.title.value.color }">{{ data.value.title.value.text }}</h2>
<div class="more" @click="$util.pushToTab(data.value.more.value.link.url)" :style="{color: data.value.more.value.color}">
<span>{{data.value.more.value.text}}</span>
<i class="el-icon-arrow-right"></i>
</div>
</div>
<div class="body-wrap">
<div class="left-wrap" v-if="data.value.leftImg.value.url">
<img :src="$img(data.value.leftImg.value.url)" @click="$util.pushToTab(data.value.leftImg.value.link.url)" />
</div>
<el-carousel trigger="click" height="324px" indicator-position="none" arrow="never">
<el-carousel-item v-for="num in itemNum" :key="num">
<ul class="goods-list">
<li v-for="(item, index) in itemList(num)" :key="index" :title="item.goods_name" @click="goSku(item.sku_id)">
<div class="img-wrap">
<img alt="商品图片" :src="$img(item.goods_image.split(',')[0], { size: 'mid' })" @error="imageError(index)" />
</div>
<div class="price">
<span class="num">{{ item.discount_price }}</span>
<del v-show="Number.parseInt(item.market_price)">{{ item.market_price }}</del>
</div>
<h3 class="name">{{ item.goods_name }}</h3>
<div class="other-info" v-if="item.sale_num">
<span>已售{{ item.sale_num }}</span>
</div>
</li>
</ul>
</el-carousel-item>
</el-carousel>
</div>
<div class="bottom-wrap" v-if="data.value.bottomImg.value.url">
<img :src="$img(data.value.bottomImg.value.url)" @click="$util.pushToTab(data.value.bottomImg.value.link.url)" />
</div>
</div>
</template>
<script>
import {mapGetters} from 'vuex';
export default {
name: 'floor-style-4',
props: {
data: {
type: Object
}
},
data() {
return {};
},
created() {
},
computed: {
...mapGetters(['defaultGoodsImage']),
goodsList() {
let arr = [];
try {
arr = this.data.value.goodsList.value.list;
} catch (e) {
arr = [];
}
return arr;
},
itemNum() {
let [num, listLen] = [0, this.goodsList.length];
num = parseInt(listLen / 3);
if (parseInt(listLen % 3) > 0) num += 1;
return num;
}
},
methods: {
goSku(skuId) {
this.$util.pushToTab('/sku/' + skuId);
},
imageError(index) {
this.data.value.goodsList.value.list[index].goods_image = this.defaultGoodsImage;
},
itemList(index) {
index -= 1;
if (!this.goodsList.length) return [];
let [start, end, arr] = [index * 3, index * 3 + 3, []];
arr = this.goodsList.slice(start, end);
return arr;
}
}
};
</script>
<style lang="scss" scoped>
.floor-style-4 {
.head-wrap {
display: flex;
align-items: center;
justify-content: space-between;
}
.head-wrap h2 {
line-height: 30px;
color: #333;
padding: 10px;
font-size: 18px;
cursor: pointer;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.body-wrap {
display: flex;
.left-wrap {
margin-right: 15px;
width: 478px;
height: 324px;
cursor: pointer;
transition: all 0.2s linear;
&:hover {
z-index: 2;
-webkit-box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
-webkit-transform: translate3d(0, -2px, 0);
transform: translate3d(0, -2px, 0);
}
img {
max-width: 100%;
cursor: pointer;
}
}
.el-carousel {
flex: 1;
}
.goods-list {
display: flex;
li {
position: relative;
width: 228px;
height: 324px;
margin-right: 15px;
background-color: #fff;
cursor: pointer;
padding: 10px 18px;
transition: all 0.2s linear;
box-sizing: border-box;
&:last-of-type {
margin-right: 0;
}
&:hover {
z-index: 2;
-webkit-box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
-webkit-transform: translate3d(0, -2px, 0);
transform: translate3d(0, -2px, 0);
}
.img-wrap {
width: 168px;
height: 168px;
line-height: 168px;
margin: 0 auto 18px;
img {
max-width: 100%;
max-height: 100%;
}
}
.name {
margin-top: 5px;
font-size: 14px;
color: #444;
line-height: 1.5;
font-weight: normal;
@extend .multi-hidden;
}
.other-info {
position: absolute;
bottom: 15px;
display: flex;
align-items: center;
justify-content: space-between;
span {
font-size: 14px;
color: #aaa;
}
}
.price {
.num {
color: $base-color;
font-size: 20px;
font-weight: bold;
}
del {
font-size: 14px;
margin-left: 15px;
color: #aaa;
}
}
}
}
}
.bottom-wrap {
margin-top: 35px;
width: $width;
cursor: pointer;
overflow: hidden;
img {
max-width: 100%;
}
}
}
</style>