baiqiu-cms-decoration-dg 0.1.0 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/baiqiu-cms-decoration-dg.common.js +90075 -0
- package/lib/baiqiu-cms-decoration-dg.css +7 -0
- package/lib/baiqiu-cms-decoration-dg.umd.js +90085 -0
- package/lib/baiqiu-cms-decoration-dg.umd.min.js +48 -0
- package/lib/demo.html +10 -0
- package/{dist/img/iconfont.654cc65b.svg → lib/img/iconfont.210a3a86.svg} +89 -89
- package/package.json +5 -10
- package/babel.config.js +0 -5
- package/dist/css/app.d43615c0.css +0 -1
- package/dist/css/chunk-vendors.ef1800aa.css +0 -7
- package/dist/favicon.ico +0 -0
- package/dist/index.html +0 -1
- package/dist/js/app.453dd14c.js +0 -2
- package/dist/js/app.453dd14c.js.map +0 -1
- package/dist/js/chunk-vendors.cfd53f93.js +0 -37
- package/dist/js/chunk-vendors.cfd53f93.js.map +0 -1
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -17
- package/src/App.vue +0 -594
- package/src/api/com-service.js +0 -26
- package/src/assets/iconfont/demo.css +0 -539
- package/src/assets/iconfont/iconfont.css +0 -158
- package/src/assets/iconfont/iconfont.eot +0 -0
- package/src/assets/iconfont/iconfont.json +0 -254
- package/src/assets/iconfont/iconfont.svg +0 -89
- package/src/assets/iconfont/iconfont.ttf +0 -0
- package/src/assets/iconfont/iconfont.woff +0 -0
- package/src/assets/iconfont/iconfont.woff2 +0 -0
- package/src/assets/img/pc-cms-v2/creation.png +0 -0
- package/src/assets/img/pc-cms-v2/icon.png +0 -0
- package/src/assets/img/pc-cms-v2/mobileNav.png +0 -0
- package/src/assets/img/pc-cms-v2/next1.png +0 -0
- package/src/assets/img/pc-cms-v2/next2.png +0 -0
- package/src/assets/img/pc-cms-v2/prev1.png +0 -0
- package/src/assets/img/pc-cms-v2/prev2.png +0 -0
- package/src/assets/img/pc-cms-v2/text.png +0 -0
- package/src/components/cms/animate.scss +0 -19
- package/src/components/cms/buttonItem/buttonItem.js +0 -135
- package/src/components/cms/buttonItem/buttonItem.scss +0 -95
- package/src/components/cms/buttonItem/buttonItem.vue +0 -47
- package/src/components/cms/buttonItem/index.js +0 -2
- package/src/components/cms/cms.js +0 -104
- package/src/components/cms/cms.scss +0 -46
- package/src/components/cms/cms.vue +0 -51
- package/src/components/cms/customLayout/customLayout.js +0 -46
- package/src/components/cms/customLayout/customLayout.scss +0 -8
- package/src/components/cms/customLayout/customLayout.vue +0 -15
- package/src/components/cms/customLayout/index.js +0 -2
- package/src/components/cms/hotspot/hotspot.js +0 -200
- package/src/components/cms/hotspot/hotspot.scss +0 -20
- package/src/components/cms/hotspot/hotspot.vue +0 -35
- package/src/components/cms/hotspot/index.js +0 -2
- package/src/components/cms/imgNav/imgNav.js +0 -176
- package/src/components/cms/imgNav/imgNav.scss +0 -113
- package/src/components/cms/imgNav/imgNav.vue +0 -123
- package/src/components/cms/imgNav/index.js +0 -2
- package/src/components/cms/index.js +0 -2
- package/src/components/cms/mixin.js +0 -239
- package/src/components/cms/multipleLayout/index.js +0 -2
- package/src/components/cms/multipleLayout/multipleLayout.js +0 -54
- package/src/components/cms/multipleLayout/multipleLayout.scss +0 -21
- package/src/components/cms/multipleLayout/multipleLayout.vue +0 -25
- package/src/components/cms/productItem/index.js +0 -2
- package/src/components/cms/productItem/productItem.js +0 -290
- package/src/components/cms/productItem/productItem.scss +0 -180
- package/src/components/cms/productItem/productItem.vue +0 -117
- package/src/components/cms/singleLayout/index.js +0 -2
- package/src/components/cms/singleLayout/singleLayout.js +0 -63
- package/src/components/cms/singleLayout/singleLayout.scss +0 -21
- package/src/components/cms/singleLayout/singleLayout.vue +0 -42
- package/src/components/cms/slideLayout/index.js +0 -2
- package/src/components/cms/slideLayout/slideLayout.js +0 -248
- package/src/components/cms/slideLayout/slideLayout.scss +0 -18
- package/src/components/cms/slideLayout/slideLayout.vue +0 -44
- package/src/components/cms/swiperItem/index.js +0 -2
- package/src/components/cms/swiperItem/swiperItem.js +0 -228
- package/src/components/cms/swiperItem/swiperItem.scss +0 -204
- package/src/components/cms/swiperItem/swiperItem.vue +0 -123
- package/src/components/cms/tabLayout/index.js +0 -2
- package/src/components/cms/tabLayout/navItem/index.js +0 -2
- package/src/components/cms/tabLayout/navItem/navItem.js +0 -47
- package/src/components/cms/tabLayout/navItem/navItem.scss +0 -23
- package/src/components/cms/tabLayout/navItem/navItem.vue +0 -13
- package/src/components/cms/tabLayout/tabLayout.js +0 -158
- package/src/components/cms/tabLayout/tabLayout.scss +0 -26
- package/src/components/cms/tabLayout/tabLayout.vue +0 -43
- package/src/components/cms/textItem/index.js +0 -2
- package/src/components/cms/textItem/textItem.js +0 -65
- package/src/components/cms/textItem/textItem.scss +0 -41
- package/src/components/cms/textItem/textItem.vue +0 -26
- package/src/components/cms/utils.js +0 -101
- package/src/components/cms/videoItem/index.js +0 -2
- package/src/components/cms/videoItem/videoItem.js +0 -96
- package/src/components/cms/videoItem/videoItem.scss +0 -27
- package/src/components/cms/videoItem/videoItem.vue +0 -56
- package/src/components/cms/videoPlayer/index.js +0 -2
- package/src/components/cms/videoPlayer/videoPlayer.js +0 -68
- package/src/components/cms/videoPlayer/videoPlayer.scss +0 -37
- package/src/components/cms/videoPlayer/videoPlayer.vue +0 -34
- package/src/index.js +0 -23
- package/src/index.scss +0 -221
- package/src/main.js +0 -8
- package/src/utils/common.js +0 -23
- package/src/utils/http-client.js +0 -101
- package/src/utils/utils.js +0 -63
- package/webpack.config.js +0 -109
- /package/{dist → lib}/fonts/iconfont.529b3ed0.ttf +0 -0
- /package/{dist → lib}/fonts/iconfont.580c918e.eot +0 -0
- /package/{dist → lib}/fonts/iconfont.ea5b1aa2.woff +0 -0
@@ -1,54 +0,0 @@
|
|
1
|
-
// import vueDraggableResizable from "vue-draggable-resizable-gorkys";
|
2
|
-
// import 'vue-draggable-resizable-gorkys/dist/VueDraggableResizable.css'
|
3
|
-
import singleLayout from "../singleLayout/";
|
4
|
-
export default {
|
5
|
-
name: "multipleLayout",
|
6
|
-
components: {
|
7
|
-
// vueDraggableResizable,
|
8
|
-
singleLayout
|
9
|
-
},
|
10
|
-
props: {
|
11
|
-
layOutData: {
|
12
|
-
type: Object,
|
13
|
-
default: () => {}
|
14
|
-
},
|
15
|
-
ratio: {
|
16
|
-
type: Number,
|
17
|
-
default: 1
|
18
|
-
},
|
19
|
-
mode: {
|
20
|
-
type: String,
|
21
|
-
default: "pc"
|
22
|
-
},
|
23
|
-
recordId: {
|
24
|
-
type: Number,
|
25
|
-
default: 0
|
26
|
-
}
|
27
|
-
},
|
28
|
-
inheritAttrs: false,
|
29
|
-
data() {
|
30
|
-
return {
|
31
|
-
w: 200,
|
32
|
-
currentItem: null,
|
33
|
-
currentIndex: ""
|
34
|
-
};
|
35
|
-
},
|
36
|
-
watch: {
|
37
|
-
// 'layOutData.layoutStyle.widthStyle.width': {
|
38
|
-
// handler:function () {
|
39
|
-
// this.w = this.ratio * (this.mode == 'pc' ? 1920 : 750)*this.layOutData.layoutStyle.widthStyle.width/100
|
40
|
-
// },
|
41
|
-
// deep:true,
|
42
|
-
// immediate:true
|
43
|
-
// }
|
44
|
-
},
|
45
|
-
mounted() {},
|
46
|
-
methods: {
|
47
|
-
reportData(h) {
|
48
|
-
let refs = this.$refs.multipleSingle
|
49
|
-
refs.forEach(item=>{
|
50
|
-
item.reportData(h)
|
51
|
-
})
|
52
|
-
}
|
53
|
-
}
|
54
|
-
};
|
@@ -1,21 +0,0 @@
|
|
1
|
-
.multiple-layout {
|
2
|
-
width: 100%;
|
3
|
-
height: 100%;
|
4
|
-
display: flex;
|
5
|
-
justify-content: space-between;
|
6
|
-
align-items: center;
|
7
|
-
overflow: hidden;
|
8
|
-
position: relative;
|
9
|
-
display: flex;
|
10
|
-
.multiple-layout-bg{
|
11
|
-
position: absolute;
|
12
|
-
width: 100%;
|
13
|
-
height: 100%;
|
14
|
-
left: 0;
|
15
|
-
top: 0;
|
16
|
-
}
|
17
|
-
|
18
|
-
.multiple-item{
|
19
|
-
flex-shrink: 0;
|
20
|
-
}
|
21
|
-
}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="multiple-layout" :key="layOutData.layoutStyle.height" :style="{height: Math.round(layOutData.layoutStyle.height * ratio) + 'px'}">
|
3
|
-
<template v-for="(item,index) in layOutData.list">
|
4
|
-
<div
|
5
|
-
class="multiple-item"
|
6
|
-
:key="index"
|
7
|
-
:style="{
|
8
|
-
width: Math.round(item.baseStyle.w * ratio) + 'px',
|
9
|
-
height: Math.round(layOutData.layoutStyle.height * ratio) + 'px',
|
10
|
-
zIndex: currentIndex == index?1:'auto'
|
11
|
-
}">
|
12
|
-
<singleLayout ref="multipleSingle" v-bind="$attrs" v-on="$listeners" :layOutData="item" :componentList="item.componentList" :parent-l="item.baseStyle.l" :ratio="ratio" :recordId="recordId" :mode="mode"></singleLayout>
|
13
|
-
</div>
|
14
|
-
</template>
|
15
|
-
</div>
|
16
|
-
</template>
|
17
|
-
|
18
|
-
<script>
|
19
|
-
import multipleLayoutJs from "./multipleLayout.js";
|
20
|
-
export default multipleLayoutJs;
|
21
|
-
</script>
|
22
|
-
|
23
|
-
<style lang="scss" scoped>
|
24
|
-
@import "multipleLayout";
|
25
|
-
</style>
|
@@ -1,290 +0,0 @@
|
|
1
|
-
import Swiper from 'swiper/js/swiper.js'
|
2
|
-
import 'swiper/css/swiper.css'
|
3
|
-
import { cmsMixin } from '../mixin'
|
4
|
-
import { ComService } from '../../../api/com-service'
|
5
|
-
import { dataSaveDecorationPageComponentEventFn } from '../../../utils/utils'
|
6
|
-
|
7
|
-
export default {
|
8
|
-
name: 'productItem',
|
9
|
-
mixins: [cmsMixin],
|
10
|
-
components: {},
|
11
|
-
props: {
|
12
|
-
sortId: {
|
13
|
-
type: Number
|
14
|
-
}
|
15
|
-
},
|
16
|
-
data() {
|
17
|
-
return {
|
18
|
-
productList: [], // 商品列表
|
19
|
-
swiper: '',
|
20
|
-
productStyle: {}, // 商品组件样式
|
21
|
-
service: new ComService(),
|
22
|
-
productIndex: '',
|
23
|
-
windowHeight: 0
|
24
|
-
}
|
25
|
-
},
|
26
|
-
watch: {
|
27
|
-
addProduct: {
|
28
|
-
handler(val) {
|
29
|
-
if (val.type == 1 && val.itemCodeList.length == 0) return
|
30
|
-
if (val.type == 2 && !val.categoryGroupCode) return
|
31
|
-
if (val.type == 3 && !val.cmsSortCode) return
|
32
|
-
this.getProductList()
|
33
|
-
},
|
34
|
-
immediate: true,
|
35
|
-
deep: true
|
36
|
-
},
|
37
|
-
ratio: {
|
38
|
-
handler() {
|
39
|
-
if (!this.isSwiper && this.productStyle.width) {
|
40
|
-
this.productStyle.width = (this.attributeJson.baseStyle.w * this.ratio - this.attributeJson.goodsPaddingSpacing * 2 + this.goodsSpacing) / this.showNum + 'px'
|
41
|
-
}
|
42
|
-
}
|
43
|
-
}
|
44
|
-
},
|
45
|
-
computed: {
|
46
|
-
addProduct() {
|
47
|
-
return this.attributeJson.addProduct
|
48
|
-
},
|
49
|
-
goodsPaddingSpacing() {
|
50
|
-
return this.attributeJson.goodsPaddingSpacing
|
51
|
-
},
|
52
|
-
goodsSpacing() {
|
53
|
-
return this.attributeJson.goodsSpacing
|
54
|
-
},
|
55
|
-
itemsPerLine() {
|
56
|
-
return this.attributeJson.itemsPerLine
|
57
|
-
},
|
58
|
-
indicatorType() {
|
59
|
-
return this.attributeJson.indicatorType
|
60
|
-
},
|
61
|
-
// 是否为轮播图
|
62
|
-
isSwiper() {
|
63
|
-
return (this.mode == 'pc' && this.styleType == 1) || (this.mode == 'mobile' && this.styleType == 2 && (this.indicatorType == 2 || this.indicatorType == 3))
|
64
|
-
},
|
65
|
-
// 是否有左右指示器
|
66
|
-
hasSwiperButton() {
|
67
|
-
return (this.mode == 'pc' && this.styleType == 1 && this.indicatorType == 2) || (this.mode == 'mobile' && this.styleType == 2 && this.indicatorType == 2)
|
68
|
-
},
|
69
|
-
// 是否有底部滚动条
|
70
|
-
hasScrollBar() {
|
71
|
-
return this.mode == 'mobile' && this.styleType == 2 && this.indicatorType == 3
|
72
|
-
},
|
73
|
-
// 指示器样式
|
74
|
-
paginationStyle() {
|
75
|
-
return this.attributeJson.paginationStyle
|
76
|
-
},
|
77
|
-
pageStyle() {
|
78
|
-
return {
|
79
|
-
color: this.paginationStyle.color
|
80
|
-
}
|
81
|
-
},
|
82
|
-
showNum() {
|
83
|
-
let num = 1
|
84
|
-
if (this.mode == 'pc') {
|
85
|
-
num = this.attributeJson.itemsPerLine
|
86
|
-
} else {
|
87
|
-
if (this.attributeJson.styleType == 1) {
|
88
|
-
num = 2.5
|
89
|
-
} else if (this.attributeJson.styleType == 2) {
|
90
|
-
num = this.attributeJson.itemsPerLine
|
91
|
-
}
|
92
|
-
}
|
93
|
-
return num
|
94
|
-
}
|
95
|
-
},
|
96
|
-
mounted() {},
|
97
|
-
methods: {
|
98
|
-
// 获取商品列表
|
99
|
-
getProductList: function() {
|
100
|
-
let params = {}
|
101
|
-
switch (this.addProduct.type) {
|
102
|
-
case 1:
|
103
|
-
params = {
|
104
|
-
itemCodeList: this.addProduct.itemCodeList,
|
105
|
-
pageNum: 1,
|
106
|
-
pageSize: this.addProduct.itemCodeList.length
|
107
|
-
}
|
108
|
-
break
|
109
|
-
case 2:
|
110
|
-
params = {
|
111
|
-
categoryParam: {
|
112
|
-
categoryCodeList: this.addProduct.categoryCodeList,
|
113
|
-
categoryGroupCode: this.addProduct.categoryGroupCode
|
114
|
-
},
|
115
|
-
pageNum: 1,
|
116
|
-
pageSize: this.addProduct.max,
|
117
|
-
sortRuleId: this.addProduct.sortId
|
118
|
-
}
|
119
|
-
break
|
120
|
-
case 3:
|
121
|
-
params = {
|
122
|
-
pageNum: 1,
|
123
|
-
pageSize: this.addProduct.max,
|
124
|
-
sortField: this.addProduct.cmsSortCode
|
125
|
-
}
|
126
|
-
break
|
127
|
-
}
|
128
|
-
|
129
|
-
if (this.addProduct.type == 3) {
|
130
|
-
this.service.getSortProductInfo(this.envUrl, params, this.language).then(res => {
|
131
|
-
if (res && res.list) {
|
132
|
-
// 判断入场动画,是否需要展示
|
133
|
-
let productEntrance = document.querySelector(`.entrance-con${this.sortId}`)
|
134
|
-
let entrance = productEntrance && productEntrance.classList.contains('entrance-demonstrate')
|
135
|
-
if (entrance && productEntrance.firstChild.style) {
|
136
|
-
productEntrance.firstChild.style.display = 'block'
|
137
|
-
}
|
138
|
-
this.productList = res.list
|
139
|
-
this.initProduct()
|
140
|
-
} else {
|
141
|
-
this.productList = []
|
142
|
-
}
|
143
|
-
})
|
144
|
-
} else {
|
145
|
-
this.service.getProductInfo(this.envUrl, params, this.language).then(res => {
|
146
|
-
if (res && res.list) {
|
147
|
-
// 判断入场动画,是否需要展示
|
148
|
-
let productEntrance = document.querySelector(`.entrance-con${this.sortId}`)
|
149
|
-
let entrance = productEntrance && productEntrance.classList.contains('entrance-demonstrate')
|
150
|
-
if (entrance && productEntrance.firstChild.style) {
|
151
|
-
productEntrance.firstChild.style.display = 'block'
|
152
|
-
}
|
153
|
-
this.productList = res.list
|
154
|
-
this.initProduct()
|
155
|
-
} else {
|
156
|
-
this.productList = []
|
157
|
-
}
|
158
|
-
})
|
159
|
-
}
|
160
|
-
},
|
161
|
-
initProduct: function() {
|
162
|
-
let { attributeJson, addProduct } = this
|
163
|
-
if (attributeJson.goodsImgType == 2 && addProduct.customImageList.length != 0) {
|
164
|
-
this.productList.forEach((item, index) => {
|
165
|
-
if (addProduct.customImageList[index].picList.length != 0) {
|
166
|
-
this.$set(item, 'customImage', addProduct.customImageList[index].picList[0].resourcePath)
|
167
|
-
}
|
168
|
-
})
|
169
|
-
}
|
170
|
-
if (this.productList && this.productList.length > 0) {
|
171
|
-
if (this.isSwiper) {
|
172
|
-
this.initSwiper()
|
173
|
-
} else {
|
174
|
-
this.initSlide()
|
175
|
-
}
|
176
|
-
}
|
177
|
-
},
|
178
|
-
// 初始化轮播图
|
179
|
-
initSwiper: function() {
|
180
|
-
let { attributeJson, indicatorType, styleType } = this
|
181
|
-
this.$nextTick(() => {
|
182
|
-
if (this.swiper) {
|
183
|
-
this.swiper.destroy(true, true)
|
184
|
-
this.swiper = null
|
185
|
-
}
|
186
|
-
this.options = {
|
187
|
-
effect: 'slide',
|
188
|
-
autoplay: false,
|
189
|
-
slidesPerView: this.showNum,
|
190
|
-
spaceBetween: attributeJson.goodsSpacing
|
191
|
-
}
|
192
|
-
if (styleType == 2 && indicatorType == 2) {
|
193
|
-
this.options.pagination = { el: `.swiper-pagination-${this.sortId}`, clickable: true }
|
194
|
-
}
|
195
|
-
if (this.hasSwiperButton) {
|
196
|
-
this.options.navigation = {
|
197
|
-
nextEl: `.swiper-button-next-${this.sortId}`,
|
198
|
-
prevEl: `.swiper-button-prev-${this.sortId}`
|
199
|
-
}
|
200
|
-
}
|
201
|
-
if (this.hasScrollBar) {
|
202
|
-
this.options.scrollbar = {
|
203
|
-
el: `.swiper-scrollbar-${this.sortId}`,
|
204
|
-
draggable: true
|
205
|
-
}
|
206
|
-
this.options.freeMode = true
|
207
|
-
}
|
208
|
-
this.swiper = new Swiper(`.swiper-container-${this.sortId}`, this.options)
|
209
|
-
this.$nextTick(()=>{
|
210
|
-
this.reportData(this.windowHeight)
|
211
|
-
})
|
212
|
-
})
|
213
|
-
},
|
214
|
-
initSlide() {
|
215
|
-
this.productStyle = {
|
216
|
-
padding: `0 ${this.goodsSpacing / 2}px`,
|
217
|
-
width: (this.attributeJson.baseStyle.w * this.ratio - this.attributeJson.goodsPaddingSpacing * 2 + this.goodsSpacing) / this.showNum + 'px',
|
218
|
-
marginBottom: this.goodsSpacing + 'px'
|
219
|
-
}
|
220
|
-
this.$nextTick(()=>{
|
221
|
-
this.reportData(this.windowHeight)
|
222
|
-
})
|
223
|
-
},
|
224
|
-
gotoPDP(code, colorCode, name, index) {
|
225
|
-
try {
|
226
|
-
dataSaveDecorationPageComponentEventFn(
|
227
|
-
{
|
228
|
-
uniqueId: this.recordId + '_' + this.sortId, // 组件_id
|
229
|
-
uniqueName: this.attributeJson.uniqueName, // 组件_名称
|
230
|
-
componentType: 4,
|
231
|
-
popData: {
|
232
|
-
productCode: code,
|
233
|
-
selectDataShow: name
|
234
|
-
},
|
235
|
-
materialId: this.recordId + '_' + this.sortId, //素材id
|
236
|
-
materialName: this.attributeJson.uniqueName, //素材名称
|
237
|
-
refererPagePath: this.refererPagePath,
|
238
|
-
brand: this.brand,
|
239
|
-
path: this.path,
|
240
|
-
position: index + 1,
|
241
|
-
event: 'bannerClick'
|
242
|
-
},
|
243
|
-
this.envUrl
|
244
|
-
)
|
245
|
-
} catch (err) {
|
246
|
-
console.log(err)
|
247
|
-
}
|
248
|
-
this.$emit('gotoPDP', { code, colorCode })
|
249
|
-
},
|
250
|
-
// 上报数据
|
251
|
-
reportData(h) {
|
252
|
-
this.windowHeight = h
|
253
|
-
if (this.productList.length == 0) return
|
254
|
-
let ref = this.$refs[`entrance${this.attributeJson.sort}`]
|
255
|
-
if (!ref || ref.style.display == 'none') return
|
256
|
-
// 当有入场的动画时,需要在入场时重新init一遍,否则轮播图有问题,原本用指令,只要监听entranceShow,但为兼容服务器渲染,指令不使用了
|
257
|
-
if (this.isSwiper && !this.hasInitSwiper && this.enterClass) {
|
258
|
-
this.hasInitSwiper = true
|
259
|
-
this.initSwiper()
|
260
|
-
}
|
261
|
-
this.productList.forEach((item, index) => {
|
262
|
-
if (item.isReport) return
|
263
|
-
if (!this.$refs[`product${item.code}${index}`]) return
|
264
|
-
let el = this.$refs[`product${item.code}${index}`][0].getBoundingClientRect()
|
265
|
-
if (el.top <= h) {
|
266
|
-
item.isReport = true
|
267
|
-
dataSaveDecorationPageComponentEventFn(
|
268
|
-
{
|
269
|
-
uniqueId: this.recordId + '_' + this.sortId, // 组件_id
|
270
|
-
uniqueName: this.attributeJson.uniqueName, // 组件_名称
|
271
|
-
componentType: 4,
|
272
|
-
popData: {
|
273
|
-
productCode: item.code,
|
274
|
-
selectDataShow: item.name
|
275
|
-
},
|
276
|
-
materialId: this.recordId + '_' + this.sortId, //素材id
|
277
|
-
materialName: this.attributeJson.uniqueName, //素材名称
|
278
|
-
refererPagePath: this.refererPagePath,
|
279
|
-
brand: this.brand,
|
280
|
-
path: this.path,
|
281
|
-
position: index + 1,
|
282
|
-
event: 'bannerShow'
|
283
|
-
},
|
284
|
-
this.envUrl
|
285
|
-
)
|
286
|
-
}
|
287
|
-
})
|
288
|
-
}
|
289
|
-
}
|
290
|
-
}
|
@@ -1,180 +0,0 @@
|
|
1
|
-
.product-wrap {
|
2
|
-
border: none;
|
3
|
-
position: absolute;
|
4
|
-
touch-action: auto;
|
5
|
-
|
6
|
-
.entrance-con {
|
7
|
-
position: relative;
|
8
|
-
width: 100%;
|
9
|
-
height: 100%;
|
10
|
-
}
|
11
|
-
|
12
|
-
.product-con {
|
13
|
-
overflow: hidden;
|
14
|
-
position: relative;
|
15
|
-
|
16
|
-
.slide-con {
|
17
|
-
position: relative;
|
18
|
-
width: 100%;
|
19
|
-
display: flex;
|
20
|
-
overflow-x: auto;
|
21
|
-
|
22
|
-
&::-webkit-scrollbar {
|
23
|
-
display: none;
|
24
|
-
}
|
25
|
-
|
26
|
-
.product-item {
|
27
|
-
flex-shrink: 0;
|
28
|
-
font-size: 14px;
|
29
|
-
width: 40%;
|
30
|
-
overflow: hidden;
|
31
|
-
position: relative;
|
32
|
-
.hover-con {
|
33
|
-
position: absolute;
|
34
|
-
width: stretch;
|
35
|
-
width: -webkit-stretch;
|
36
|
-
}
|
37
|
-
}
|
38
|
-
}
|
39
|
-
|
40
|
-
.product-name {
|
41
|
-
font-size: 14px;
|
42
|
-
}
|
43
|
-
|
44
|
-
.slide-con-2-pc {
|
45
|
-
flex-wrap: wrap;
|
46
|
-
|
47
|
-
.product-item {
|
48
|
-
width: 33.3%;
|
49
|
-
}
|
50
|
-
}
|
51
|
-
|
52
|
-
.slide-con-2-mobile {
|
53
|
-
flex-wrap: wrap;
|
54
|
-
|
55
|
-
.product-item {
|
56
|
-
width: 50%;
|
57
|
-
}
|
58
|
-
}
|
59
|
-
|
60
|
-
.price-con {
|
61
|
-
display: flex;
|
62
|
-
align-items: baseline;
|
63
|
-
width: 100%;
|
64
|
-
padding: 10px 0;
|
65
|
-
font-size: 14px;
|
66
|
-
|
67
|
-
.standardPrice {
|
68
|
-
margin-left: 10px;
|
69
|
-
text-decoration: line-through;
|
70
|
-
}
|
71
|
-
}
|
72
|
-
|
73
|
-
.product-info {
|
74
|
-
transition: opacity 0.4s;
|
75
|
-
padding: 10px 2px 0;
|
76
|
-
|
77
|
-
&.position1 {
|
78
|
-
text-align: left;
|
79
|
-
}
|
80
|
-
|
81
|
-
&.position2 {
|
82
|
-
text-align: center;
|
83
|
-
|
84
|
-
.price-con {
|
85
|
-
display: flex;
|
86
|
-
justify-content: center;
|
87
|
-
}
|
88
|
-
}
|
89
|
-
|
90
|
-
&.position3 {
|
91
|
-
text-align: right;
|
92
|
-
|
93
|
-
.price-con {
|
94
|
-
display: flex;
|
95
|
-
justify-content: flex-end;
|
96
|
-
}
|
97
|
-
}
|
98
|
-
}
|
99
|
-
|
100
|
-
.transparent {
|
101
|
-
opacity: 0;
|
102
|
-
}
|
103
|
-
|
104
|
-
.product-image {
|
105
|
-
width: 100%;
|
106
|
-
height: auto;
|
107
|
-
overflow: hidden;
|
108
|
-
font-size: 0;
|
109
|
-
img {
|
110
|
-
position: relative;
|
111
|
-
width: 100%;
|
112
|
-
transition: 0.3s all;
|
113
|
-
}
|
114
|
-
}
|
115
|
-
|
116
|
-
.productInfo {
|
117
|
-
padding: 0 10px;
|
118
|
-
}
|
119
|
-
|
120
|
-
.swiper-container {
|
121
|
-
.swiper-wrapper {
|
122
|
-
.swiper-slide {
|
123
|
-
position: relative;
|
124
|
-
}
|
125
|
-
}
|
126
|
-
}
|
127
|
-
|
128
|
-
|
129
|
-
.swiper-scrollbar {
|
130
|
-
height: 3px;
|
131
|
-
width: 70%;
|
132
|
-
left: 50%;
|
133
|
-
bottom: 10px;
|
134
|
-
// background-color: var(--color);
|
135
|
-
transform: translateX(-50%);
|
136
|
-
// ::v-deep .swiper-scrollbar-drag {
|
137
|
-
// background-color: var(--activeColor);
|
138
|
-
// }
|
139
|
-
}
|
140
|
-
|
141
|
-
.swiper-button-prev {
|
142
|
-
background-image: none;
|
143
|
-
left: 20px;
|
144
|
-
|
145
|
-
&::after {
|
146
|
-
display: none;
|
147
|
-
}
|
148
|
-
|
149
|
-
&:hover {
|
150
|
-
.cms2iconfont {
|
151
|
-
color: var(--hoverColor) !important;
|
152
|
-
}
|
153
|
-
}
|
154
|
-
|
155
|
-
.cms2iconfont {
|
156
|
-
font-size: 28px;
|
157
|
-
}
|
158
|
-
}
|
159
|
-
|
160
|
-
.swiper-button-next {
|
161
|
-
background-image: none;
|
162
|
-
right: 20px;
|
163
|
-
|
164
|
-
&:hover {
|
165
|
-
.cms2iconfont {
|
166
|
-
color: var(--hoverColor) !important;
|
167
|
-
}
|
168
|
-
}
|
169
|
-
|
170
|
-
&::after {
|
171
|
-
display: none;
|
172
|
-
}
|
173
|
-
|
174
|
-
.cms2iconfont {
|
175
|
-
font-size: 28px;
|
176
|
-
}
|
177
|
-
}
|
178
|
-
}
|
179
|
-
|
180
|
-
}
|
@@ -1,117 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div
|
3
|
-
:style="{
|
4
|
-
width: Math.round(attributeJson.baseStyle.w * ratio) + 'px',
|
5
|
-
height: Math.round(attributeJson.baseStyle.h * ratio) + 'px',
|
6
|
-
left: Math.round(attributeJson.baseStyle.l * ratio) + 'px',
|
7
|
-
top: Math.round(attributeJson.baseStyle.t * ratio) + 'px'
|
8
|
-
}"
|
9
|
-
class="product-wrap"
|
10
|
-
>
|
11
|
-
<div :class="['product-list','entrance-con',`entrance-con${sortId}`]" :style="{'--hoverColor': paginationStyle.hoverColor || paginationStyle.color, '--activeColor': paginationStyle.activeColor, '--color': paginationStyle.color}">
|
12
|
-
<div
|
13
|
-
:ref="`entrance${attributeJson.sort}`"
|
14
|
-
:class="['product-con', animationInObj.type ? enterClass : '']"
|
15
|
-
v-show="entranceShow"
|
16
|
-
:style="[{
|
17
|
-
width: `${baseStyle.w * ratio}px`,
|
18
|
-
height: `${baseStyle.h * ratio}px`,
|
19
|
-
padding: `0 ${attributeJson.goodsPaddingSpacing}px`,
|
20
|
-
animationDuration: `${animationInObj.duration}s`
|
21
|
-
}]">
|
22
|
-
<!-- 非swiper展示样式 -->
|
23
|
-
<div :class="`slide-con slide-con-${styleType}-${mode}`"
|
24
|
-
:style="{width: attributeJson.baseStyle.w * ratio + attributeJson.goodsSpacing +'px',
|
25
|
-
margin:('0px -'+ attributeJson.goodsSpacing/2 + 'px')}"
|
26
|
-
:ref="`slide${sortId}`"
|
27
|
-
v-if="!isSwiper">
|
28
|
-
<div
|
29
|
-
:ref="`product${item.code}${index}`"
|
30
|
-
:class="['product-item',`product${item.code}${index}`]"
|
31
|
-
v-hoverAnimate="{key: 'productIndex', value: index}"
|
32
|
-
v-for="(item, index) in productList"
|
33
|
-
@click="gotoPDP(item.code, item.colorCode, item.name, index)"
|
34
|
-
:style="[productStyle]"
|
35
|
-
:key="item.id">
|
36
|
-
<div class="product-image">
|
37
|
-
<img :src="(attributeJson.goodsImgType == 2 && item.customImage) ? item.customImage : item.mainPicUrl" :style="[(animationHoverObj.type === 3 && productIndex == index) ? hoverStyle : '']" :alt="item.name" />
|
38
|
-
</div>
|
39
|
-
<div v-if="attributeJson.showInfo.length!=0" :class="['product-info',`position${attributeJson.infoPoisition}`, {'transparent': attributeJson.isHover == 2 && productIndex!=index}]">
|
40
|
-
<slot name="productInfo">
|
41
|
-
<div class="product-name" v-if="attributeJson.showInfo.indexOf(1) > -1">{{ item.name }}</div>
|
42
|
-
<div class="price-con">
|
43
|
-
<div v-if="attributeJson.showInfo.indexOf(2) > -1">¥{{ item.salesPrice || 0 }}</div>
|
44
|
-
<div v-if="item.salesPrice!=item.standardPrice && attributeJson.showInfo.indexOf(3) > -1" class="standardPrice">¥{{ item.standardPrice || 0 }}</div>
|
45
|
-
</div>
|
46
|
-
</slot>
|
47
|
-
</div>
|
48
|
-
|
49
|
-
<!-- 边框 -->
|
50
|
-
<div class="hover-con" v-if="animationHoverObj.type === 2" :style="[hoverStyle, {opacity: productIndex === index? 1 : 0, margin: `0 ${goodsSpacing / 2}px`}]"></div>
|
51
|
-
</div>
|
52
|
-
</div>
|
53
|
-
|
54
|
-
<!-- 轮播图 -->
|
55
|
-
<div v-if="isSwiper" :class="`swiper-container swiper-container-${sortId}`" :id="`mySwiper-${sortId}`" :ref="`slide${sortId}`" :key="styleType+indicatorType">
|
56
|
-
<div
|
57
|
-
class="swiper-wrapper"
|
58
|
-
:style="[{
|
59
|
-
width: `${baseStyle.w * ratio}px`
|
60
|
-
}]">
|
61
|
-
<div
|
62
|
-
:class="`swiper-slide swiper-slide-${styleType}-${mode}`"
|
63
|
-
v-hoverAnimate="{key: 'productIndex', value: index}"
|
64
|
-
v-for="(item, index) in productList"
|
65
|
-
:style="[productStyle]"
|
66
|
-
:key="item.id">
|
67
|
-
<div :ref="`product${item.code}${index}`" @click="gotoPDP(item.code, item.colorCode, item.name, index)" :style="{height: `${attributeJson.baseStyle.h * ratio}px`}">
|
68
|
-
<!-- 商品图片 -->
|
69
|
-
<div class="product-image">
|
70
|
-
<img :src="(attributeJson.goodsImgType==2 && item.customImage) ? item.customImage : item.mainPicUrl" :style="[(animationHoverObj.type === 3 && productIndex == index) ? hoverStyle : '']" alt="" />
|
71
|
-
</div>
|
72
|
-
<div v-if="attributeJson.showInfo.length!=0" :class="['product-info',`position${attributeJson.infoPoisition}`, {'transparent': attributeJson.isHover == 2 && productIndex!=index }]">
|
73
|
-
<slot name="productInfo">
|
74
|
-
<div class="product-name" v-if="attributeJson.showInfo.indexOf(1) > -1">{{ item.name }}</div>
|
75
|
-
<div class="price-con">
|
76
|
-
<div v-if="attributeJson.showInfo.indexOf(2) > -1">¥{{ item.salesPrice || 0 }}</div>
|
77
|
-
<div v-if="item.salesPrice!=item.standardPrice && attributeJson.showInfo.indexOf(3) > -1" class="standardPrice">¥{{ item.standardPrice || 0 }}</div>
|
78
|
-
</div>
|
79
|
-
</slot>
|
80
|
-
</div>
|
81
|
-
|
82
|
-
<!-- 边框 -->
|
83
|
-
<div class="hover-con" v-if="animationHoverObj.type === 2" :style="[hoverStyle, {opacity: productIndex === index? 1 : 0}]"></div>
|
84
|
-
</div>
|
85
|
-
</div>
|
86
|
-
</div>
|
87
|
-
|
88
|
-
<!-- 滑动条 -->
|
89
|
-
<div v-if="hasScrollBar" :class="`swiper-scrollbar swiper-scrollbar-${sortId}`"></div>
|
90
|
-
|
91
|
-
<div :class="`swiper-button-prev swiper-button-prev-${sortId}`" v-if="hasSwiperButton">
|
92
|
-
<slot name="swiper-button-prev">
|
93
|
-
<div v-if="indicatorType == 2"><span :style="pageStyle" class="cms2iconfont iconleft"></span></div>
|
94
|
-
</slot>
|
95
|
-
</div>
|
96
|
-
<div :class="`swiper-button-next swiper-button-next-${sortId}`" v-if="hasSwiperButton">
|
97
|
-
<slot name="swiper-button-next">
|
98
|
-
<div v-if="indicatorType == 2"><span :style="pageStyle" class="cms2iconfont iconright" ></span></div>
|
99
|
-
</slot>
|
100
|
-
</div>
|
101
|
-
|
102
|
-
</div>
|
103
|
-
|
104
|
-
</div>
|
105
|
-
</div>
|
106
|
-
</div>
|
107
|
-
</template>
|
108
|
-
|
109
|
-
<script>
|
110
|
-
import productItemJs from './productItem.js'
|
111
|
-
export default productItemJs
|
112
|
-
</script>
|
113
|
-
|
114
|
-
<style lang="scss" scoped>
|
115
|
-
@import 'productItem';
|
116
|
-
@import "../animate.scss";
|
117
|
-
</style>
|