cyy-vue-material 7.0.19 → 7.0.21
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/dist/index.js +1 -1
- package/package.json +34 -34
- package/src/App.vue +149 -149
- package/src/api/http.js +16 -16
- package/src/api/index.js +21 -21
- package/src/api/urlQuery.js +20 -20
- package/src/common/js/constant.js +5 -5
- package/src/common/js/index.js +1 -1
- package/src/components/vop-label.vue +29 -29
- package/src/index.dev.js +4 -4
- package/src/package/cyy-ArsenalActivity/components/u-cont-down.vue +316 -316
- package/src/package/cyy-ArsenalActivity/components/u-line-progress.vue +150 -150
- package/src/package/cyy-ArsenalActivity/cyy-ArsenalActivity.vue +820 -820
- package/src/package/cyy-ArsenalCarousel/cyy-ArsenalCarousel.vue +137 -137
- package/src/package/cyy-ArsenalClass/cyy-ArsenalClass.vue +564 -564
- package/src/package/cyy-ArsenalMyNavigation/cyy-ArsenalMyNavigation.vue +128 -125
- package/src/package/cyy-ArsenalMyTop/cyy-ArsenalMyTop.vue +211 -211
- package/src/package/cyy-ArsenalNavigation/cyy-ArsenalNavigation.vue +236 -236
- package/src/package/cyy-ArsenalPicture/cyy-ArsenalPicture.vue +228 -228
- package/src/package/cyy-ArsenalPromotion/cyy-ArsenalPromotion.vue +913 -899
- package/src/package/cyy-ArsenalRecommend/cyy-ArsenalRecommend.vue +56 -56
- package/src/package/cyy-ArsenalTop/cyy-ArsenalTop.vue +328 -328
- package/src/package/cyy-collocation/cyy-collocation.vue +639 -639
- package/src/package/cyy-goods/cyy-goods.vue +317 -317
- package/src/package/cyy-goodsOne/consult.vue +267 -267
- package/src/package/cyy-goodsOne/cyy-goodsOne.vue +217 -217
- package/src/package/cyy-image/cyy-image.vue +64 -64
- package/src/package/cyy-live/cyy-live.vue +196 -196
- package/src/package/cyy-new-product/cyy-new-product.vue +834 -834
- package/src/package/cyy-notice/cyy-notice.vue +137 -137
- package/src/package/cyy-search/cyy-search.vue +57 -57
- package/src/package/cyy-slider/cyy-slider.vue +117 -117
- package/src/package/cyy-title/cyy-title.vue +38 -38
- package/src/package/cyy-video/cyy-video.vue +49 -49
- package/src/package/index.js +21 -21
- package/src/utils/checkEnv.js +16 -16
- package/src/utils/fetchFactory.js +100 -100
- package/src/utils/index.js +2 -2
|
@@ -1,564 +1,564 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div>
|
|
4
|
-
<div class="classTitle" :style="{ backgroundColor: props.bgColor }" v-if="scrollTop > 20 || isLc">
|
|
5
|
-
<span class="classTitleItem" v-for="(ele, index) in classDomainList" :key="ele.goodsClassId" :style="{
|
|
6
|
-
height: props.navigationHeight + 'px',
|
|
7
|
-
lineHeight: props.navigationHeight + 'px',
|
|
8
|
-
fontSize: props.navigationFontSize + 'px',
|
|
9
|
-
}">
|
|
10
|
-
<span
|
|
11
|
-
class="classSpan"
|
|
12
|
-
@click="checkClass(index)"
|
|
13
|
-
:style="{
|
|
14
|
-
background: checkClassIndex === index ? props.getBgColor : props.bgColor,
|
|
15
|
-
color: checkClassIndex === index ? props.getfontColor : props.fontColor,
|
|
16
|
-
}"
|
|
17
|
-
>{{ ele.goodsChangeClassName }}</span
|
|
18
|
-
>
|
|
19
|
-
</span>
|
|
20
|
-
</div>
|
|
21
|
-
<scroll-view scroll-y="true" scroll-with-animation="true" @scroll="handleScroll" :scroll-into-view="targetId" style="height: 100vh">
|
|
22
|
-
<template v-if="props.headImg">
|
|
23
|
-
<img v-if="isLc"
|
|
24
|
-
class="headerImg"
|
|
25
|
-
:src="props.headImg"
|
|
26
|
-
/>
|
|
27
|
-
<image v-else class="headerImg" :src="props.headImg" mode="widthFix"></image>
|
|
28
|
-
</template>
|
|
29
|
-
<div class="classContent">
|
|
30
|
-
<div
|
|
31
|
-
class="classContentItem"
|
|
32
|
-
v-for="(ele, index) in classDomainList"
|
|
33
|
-
:key="ele.goodsClassId"
|
|
34
|
-
:id="'item-' + index"
|
|
35
|
-
>
|
|
36
|
-
<div
|
|
37
|
-
v-if="!ele.classfooterImg"
|
|
38
|
-
class="classContentSpan"
|
|
39
|
-
:style="{
|
|
40
|
-
paddingTop: ele.titleMt + 'px',
|
|
41
|
-
paddingBottom: ele.titleBt + 'px',
|
|
42
|
-
backgroundColor: ele.bgColor,
|
|
43
|
-
}"
|
|
44
|
-
>
|
|
45
|
-
<img
|
|
46
|
-
style="display: inline-block; width: 15px; height: 15px; margin-right: 2px; margin-top: 3px"
|
|
47
|
-
v-if="ele.iconFlag"
|
|
48
|
-
:src="ele.goodsClassLogo ? (ele.goodsClassLogo.indexOf('http') === -1 ? domainNameUrl + ele.goodsClassLogo : ele.goodsClassLogo) : ''"
|
|
49
|
-
/>
|
|
50
|
-
<span
|
|
51
|
-
v-if="ele.goodsClassNameFlag"
|
|
52
|
-
:style="{
|
|
53
|
-
color: ele.titleColor,
|
|
54
|
-
fontSize: ele.titleFontSize + 'px',
|
|
55
|
-
}"
|
|
56
|
-
>
|
|
57
|
-
{{ ele.goodsChangeClassName }}
|
|
58
|
-
</span>
|
|
59
|
-
</div>
|
|
60
|
-
<div v-else
|
|
61
|
-
class="classContentImgBox"
|
|
62
|
-
:style="{
|
|
63
|
-
paddingTop: ele.titleMt + 'px',
|
|
64
|
-
paddingBottom: ele.titleBt + 'px',
|
|
65
|
-
backgroundColor: ele.bgColor,
|
|
66
|
-
}">
|
|
67
|
-
<img
|
|
68
|
-
v-if="isLc"
|
|
69
|
-
class="classContentImg"
|
|
70
|
-
:src="ele.classfooterImg"
|
|
71
|
-
/>
|
|
72
|
-
<image v-else class="classContentImg" :src="ele.classfooterImg" mode="widthFix"></image>
|
|
73
|
-
<div class="text-overlay">
|
|
74
|
-
<img
|
|
75
|
-
style="display: inline-block; width: 15px; height: 15px; margin-right: 2px; margin-top: 3px"
|
|
76
|
-
v-if="ele.iconFlag"
|
|
77
|
-
:src="ele.goodsClassLogo ? (ele.goodsClassLogo.indexOf('http') === -1 ? domainNameUrl + ele.goodsClassLogo : ele.goodsClassLogo) : ''"
|
|
78
|
-
/>
|
|
79
|
-
<span
|
|
80
|
-
v-if="ele.goodsClassNameFlag"
|
|
81
|
-
:style="{
|
|
82
|
-
color: ele.titleColor,
|
|
83
|
-
fontSize: ele.titleFontSize + 'px',
|
|
84
|
-
}"
|
|
85
|
-
>
|
|
86
|
-
{{ ele.goodsChangeClassName }}
|
|
87
|
-
</span>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
<!-- 商品 -->
|
|
93
|
-
<div
|
|
94
|
-
:class="['cube-container', `arrange-${ele.showTitle}`, { isLc: isLc }]"
|
|
95
|
-
:style="{
|
|
96
|
-
backgroundColor: ele.goodsBgColor,
|
|
97
|
-
}"
|
|
98
|
-
>
|
|
99
|
-
<div v-for="(item, index) in ele.goodsList" class="cube-item" :style="{
|
|
100
|
-
marginTop: `${ele.goodsMt}px`,
|
|
101
|
-
marginBottom: `${ele.goodsBt}px`,
|
|
102
|
-
}" :key="item.skuCode" @click="goGoodsDetail(item)">
|
|
103
|
-
<div class="imgWrapper">
|
|
104
|
-
<div
|
|
105
|
-
v-if="isLc === false && (item.goodsSupplynum <= 0 || item.goodsProperty5 === '1')"
|
|
106
|
-
class="imgMarked"
|
|
107
|
-
:style="{
|
|
108
|
-
borderRadius: `${ele.borderRaduils}px`,
|
|
109
|
-
}"
|
|
110
|
-
>
|
|
111
|
-
<div class="maskState">
|
|
112
|
-
{{ getMaskState(item.goodsProperty5) }}
|
|
113
|
-
</div>
|
|
114
|
-
</div>
|
|
115
|
-
<img
|
|
116
|
-
class="goodsImg"
|
|
117
|
-
:src="item.dataPic ? (item.dataPic.indexOf('http') === -1 ? domainNameUrl + item.dataPic : item.dataPic) : ''"
|
|
118
|
-
alt=""
|
|
119
|
-
:style="{
|
|
120
|
-
borderRadius: `${ele.borderRaduils}px`,
|
|
121
|
-
}"
|
|
122
|
-
/>
|
|
123
|
-
</div>
|
|
124
|
-
<div class="goodsDescription">
|
|
125
|
-
<div
|
|
126
|
-
v-if="isLc === true && ele.showTitle === 2"
|
|
127
|
-
class="specialGoodsName"
|
|
128
|
-
:style="{ marginTop: ele.goodsSpacingFlag ? '5px' : '0', marginBottom: ele.goodsSpacingFlag ? '5px' : '0' }"
|
|
129
|
-
>
|
|
130
|
-
{{ item.goodsName }}
|
|
131
|
-
</div>
|
|
132
|
-
<div v-else class="goodsName" :style="{ marginTop: ele.goodsSpacingFlag ? '5px' : '0', marginBottom: ele.goodsSpacingFlag ? '5px' : '0' }">
|
|
133
|
-
{{ item.goodsName }}
|
|
134
|
-
</div>
|
|
135
|
-
<section class="footerContent" :style="{ marginTop: ele.goodsSpacingFlag ? '5px' : '0', marginBottom: ele.goodsSpacingFlag ? '5px' : '0' }">
|
|
136
|
-
<div class="goodsPrice">
|
|
137
|
-
¥{{ item.pricesetNprice }}
|
|
138
|
-
<div class="scribing" v-if="ele.underLineFlag === 1">¥{{ item.pricesetMakeprice }}</div>
|
|
139
|
-
</div>
|
|
140
|
-
<div class="goodsBuy">
|
|
141
|
-
<img
|
|
142
|
-
src="https://rcyx-platform-test.yoxuan.vip/paas/shop/2021011200000001/2025-05-14/car.png"
|
|
143
|
-
@click.stop="addShoppingShow(item)"
|
|
144
|
-
style="height: 25px; width: 25px"
|
|
145
|
-
/>
|
|
146
|
-
</div>
|
|
147
|
-
</section>
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
</div>
|
|
151
|
-
</div>
|
|
152
|
-
</div>
|
|
153
|
-
</scroll-view>
|
|
154
|
-
<!-- -->
|
|
155
|
-
</div>
|
|
156
|
-
</div>
|
|
157
|
-
</template>
|
|
158
|
-
|
|
159
|
-
<script>
|
|
160
|
-
import { isLc, getUrl, fetchGoodImpl } from "../../utils/index.js";
|
|
161
|
-
import { find, querySkuFromJm } from "../../api/index.js";
|
|
162
|
-
import { fetchPost } from "../../api/http.js";
|
|
163
|
-
import { query } from "../../api/urlQuery.js";
|
|
164
|
-
export default {
|
|
165
|
-
name: "cyy-ArsenalClass",
|
|
166
|
-
// bgColor: "#08fc29", //标题背景颜色
|
|
167
|
-
// goodsBgColor // 商品背景颜色
|
|
168
|
-
// goodsClassNameFlag: 0, //分类名称显示隐藏
|
|
169
|
-
// titleColor: "#08fc29", //分类标题颜色
|
|
170
|
-
// titleFontSize: 20, //分类标题字号
|
|
171
|
-
// titleMt: 20, //分类标题上边距
|
|
172
|
-
// titleBt: 20, //分类标题下边距
|
|
173
|
-
// iconFlag: 1, //分类Icon显示隐藏
|
|
174
|
-
// iconSize: 20, //分类标题大小
|
|
175
|
-
// classfooterImg: "", //分类底图
|
|
176
|
-
// showTitle: 1, //展示风格
|
|
177
|
-
// underLineFlag: 1, //划线价显示隐藏
|
|
178
|
-
// borderRaduils: 1, //边角样式
|
|
179
|
-
// goodsSpacingFlag: 1, //商品间距(有/无)
|
|
180
|
-
// goodsMt: 20, //商品上边距
|
|
181
|
-
// goodsBt: 20, //商品下边距
|
|
182
|
-
// synchronousOther: false, //同步其他
|
|
183
|
-
// changeGoodsType: 1, // 选择商品或分类商品 1分类2商品
|
|
184
|
-
// changeGoodsStr: '', // 选择的商品数据
|
|
185
|
-
props: {
|
|
186
|
-
props: {
|
|
187
|
-
headImg: String, //头部展示图
|
|
188
|
-
classList: Array, //选择分类
|
|
189
|
-
carIcon: Number, //购物车图标
|
|
190
|
-
bgColor: String, //导航栏背景颜色
|
|
191
|
-
getBgColor: String, //已选导航背景颜色
|
|
192
|
-
fontColor: String, //导航字体颜色
|
|
193
|
-
getfontColor: String, //已选导航字体颜色
|
|
194
|
-
navigationHeight: Number, //导航栏高度
|
|
195
|
-
navigationFontSize: Number, //导航栏字号
|
|
196
|
-
classDomainList: Array, //分类项配置集合
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
|
-
data() {
|
|
200
|
-
return {
|
|
201
|
-
classTitleStyle: {
|
|
202
|
-
height: this.props.navigationHeight + "px",
|
|
203
|
-
lineHeight: this.props.navigationHeight + "px",
|
|
204
|
-
fontSize: this.props.navigationFontSize + "px",
|
|
205
|
-
},
|
|
206
|
-
classDomainList: [],
|
|
207
|
-
domainNameUrl: "",
|
|
208
|
-
isLc: isLc,
|
|
209
|
-
checkClassIndex: -1,
|
|
210
|
-
targetId: "",
|
|
211
|
-
scrollTop: 0,
|
|
212
|
-
};
|
|
213
|
-
},
|
|
214
|
-
mounted() {
|
|
215
|
-
this.domainNameUrl = getUrl(this);
|
|
216
|
-
this.classDomainList = JSON.parse(JSON.stringify(this.props.classDomainList));
|
|
217
|
-
this.initgoods();
|
|
218
|
-
},
|
|
219
|
-
computed: {},
|
|
220
|
-
methods: {
|
|
221
|
-
initgoods() {
|
|
222
|
-
let that = this;
|
|
223
|
-
if (isLc) {
|
|
224
|
-
return this.LcGetGoodsList(that);
|
|
225
|
-
}
|
|
226
|
-
return this.getGoodsList(that);
|
|
227
|
-
},
|
|
228
|
-
async LcGetGoodsList(that) {
|
|
229
|
-
// 遍历classDomainList
|
|
230
|
-
let tempList = that.classDomainList;
|
|
231
|
-
for (let item of tempList) {
|
|
232
|
-
//分类
|
|
233
|
-
if (item.changeGoodsType == 1) {
|
|
234
|
-
if (isLc) {
|
|
235
|
-
const url = `${querySkuFromJm}&rows=20&page=1&classtreeCode=${item.classtreeCode}&channelCode=${query.channelCode}`;
|
|
236
|
-
const res = await fetchPost(url);
|
|
237
|
-
// 将返回的res.list设置给当前元素的goodsList属性
|
|
238
|
-
item.goodsList = res.list;
|
|
239
|
-
} else {
|
|
240
|
-
const url = `${find}?vendibilityFlag=true&childFlag=true&bizType=goods&hjFlag=true&area=北京朝阳区八里庄街道&page=1&rows=20&searchType=match_phrase&goodsType=00,40,41,60,61,62,32&classtreeCode=${item.classtreeCode}&channelCode=${query.channelCode}`;
|
|
241
|
-
const res = await fetchPost(url);
|
|
242
|
-
item.goodsList = res.list;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
//商品
|
|
246
|
-
if (item.changeGoodsType == 2) {
|
|
247
|
-
// 从 URL 中获取 channelCode
|
|
248
|
-
const urlParams = new URLSearchParams(window.location.hash.split('?')[1] || window.location.search);
|
|
249
|
-
const channelCode = urlParams.get('channelCode') || '';
|
|
250
|
-
const url = `${querySkuFromJm}&rows=200&page=1&goodsCode=${item.changeGoodsStr.replace('arsenalGoodsClass,','')}&channelCode=${channelCode}`;
|
|
251
|
-
const res = await fetchPost(url);
|
|
252
|
-
// 将返回的res.list设置给当前元素的goodsList属性
|
|
253
|
-
item.goodsList = res.list;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
}
|
|
257
|
-
that.classDomainList = tempList;
|
|
258
|
-
},
|
|
259
|
-
async getGoodsList(that) {
|
|
260
|
-
// 遍历classDomainList
|
|
261
|
-
for (let item of that.classDomainList) {
|
|
262
|
-
// 调用getNotice方法,传入classtreeCode
|
|
263
|
-
let params = {
|
|
264
|
-
vendibilityFlag: true,
|
|
265
|
-
childFlag: true,
|
|
266
|
-
bizType: "goods",
|
|
267
|
-
hjFlag: true,
|
|
268
|
-
area: that.$storage.get("addressValue") ? that.$storage.get("addressValue") : "北京朝阳区八里庄街道",
|
|
269
|
-
page: 1,
|
|
270
|
-
rows: 20,
|
|
271
|
-
searchType: "match_phrase",
|
|
272
|
-
goodsType: "00,40,41,60,61,62,32",
|
|
273
|
-
classtreeCode: item.classtreeCode
|
|
274
|
-
};
|
|
275
|
-
//分类
|
|
276
|
-
if (item.changeGoodsType == 1) {
|
|
277
|
-
const res = await that.http.get(`${find}`, params);
|
|
278
|
-
// 将返回的res.list设置给当前元素的goodsList属性
|
|
279
|
-
that.$set(item, "goodsList", res.list);
|
|
280
|
-
}
|
|
281
|
-
let paramObj = {
|
|
282
|
-
goodsCode: item.changeGoodsStr.replace('arsenalGoodsClass,','')
|
|
283
|
-
}
|
|
284
|
-
//商品
|
|
285
|
-
if (item.changeGoodsType == 2) {
|
|
286
|
-
const res = await fetchGoodImpl(that, paramObj);
|
|
287
|
-
// 将返回的res.list设置给当前元素的goodsList属性
|
|
288
|
-
that.$set(item, "goodsList", res.list);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
},
|
|
292
|
-
checkClass(index) {
|
|
293
|
-
this.checkClassIndex = index;
|
|
294
|
-
this.targetId = `item-${index}`;
|
|
295
|
-
},
|
|
296
|
-
addShoppingShow(el) {
|
|
297
|
-
if (isLc) {
|
|
298
|
-
return;
|
|
299
|
-
}
|
|
300
|
-
this.$emit("addShoppingShow", el);
|
|
301
|
-
},
|
|
302
|
-
getMaskState(state) {
|
|
303
|
-
if (state === "1") {
|
|
304
|
-
return "预售中";
|
|
305
|
-
} else {
|
|
306
|
-
return "补货中";
|
|
307
|
-
}
|
|
308
|
-
},
|
|
309
|
-
getTextStyle(item) {
|
|
310
|
-
return {
|
|
311
|
-
color: item.titleColor || "#000000",
|
|
312
|
-
fontSize: item.titleFontSize || "16px",
|
|
313
|
-
};
|
|
314
|
-
},
|
|
315
|
-
goGoodsDetail(item) {
|
|
316
|
-
if (isLc) {
|
|
317
|
-
return;
|
|
318
|
-
}
|
|
319
|
-
const { skuCode } = item;
|
|
320
|
-
let params = {
|
|
321
|
-
skuNo: skuCode,
|
|
322
|
-
};
|
|
323
|
-
this.$routers.push("detail", params);
|
|
324
|
-
},
|
|
325
|
-
handleScroll(e) {
|
|
326
|
-
this.scrollTop = e.detail.scrollTop
|
|
327
|
-
}
|
|
328
|
-
},
|
|
329
|
-
};
|
|
330
|
-
</script>
|
|
331
|
-
<style lang="less" scoped>
|
|
332
|
-
.headerImg {
|
|
333
|
-
width: 100%;
|
|
334
|
-
}
|
|
335
|
-
.classTitle {
|
|
336
|
-
overflow-x: scroll;
|
|
337
|
-
white-space: nowrap;
|
|
338
|
-
padding: 0 12px;
|
|
339
|
-
.classTitleItem {
|
|
340
|
-
margin-right: 10px;
|
|
341
|
-
.classSpan {
|
|
342
|
-
border-radius: 20px;
|
|
343
|
-
padding: 4px 12px;
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
.classContent {
|
|
348
|
-
.classContentItem {
|
|
349
|
-
.classContentSpan {
|
|
350
|
-
display: flex;
|
|
351
|
-
justify-content: center;
|
|
352
|
-
padding: 30px 0;
|
|
353
|
-
}
|
|
354
|
-
.classContentImg {
|
|
355
|
-
width: 100%;
|
|
356
|
-
}
|
|
357
|
-
.classContentImgBox {
|
|
358
|
-
position: relative;
|
|
359
|
-
width: 100%;
|
|
360
|
-
.classContentImg {
|
|
361
|
-
width: 100%;
|
|
362
|
-
height: auto;
|
|
363
|
-
display: block;
|
|
364
|
-
}
|
|
365
|
-
.text-overlay{
|
|
366
|
-
position: absolute;
|
|
367
|
-
top: 0;
|
|
368
|
-
left: 0;
|
|
369
|
-
width: 100%;
|
|
370
|
-
height: 100%;
|
|
371
|
-
display: flex;
|
|
372
|
-
justify-content: center;
|
|
373
|
-
align-items: center;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
.cube-container {
|
|
380
|
-
display: grid;
|
|
381
|
-
&.arrange-4 {
|
|
382
|
-
display: flex;
|
|
383
|
-
justify-content: space-between;
|
|
384
|
-
flex-wrap: wrap;
|
|
385
|
-
.cube-item {
|
|
386
|
-
flex: 0 0 auto;
|
|
387
|
-
width: 30%;
|
|
388
|
-
max-width: 30%;
|
|
389
|
-
.goodsImg {
|
|
390
|
-
width: 100%;
|
|
391
|
-
height: 100%;
|
|
392
|
-
aspect-ratio: 1;
|
|
393
|
-
}
|
|
394
|
-
.goodsDescription {
|
|
395
|
-
.goodsPrice {
|
|
396
|
-
font-size: 18px;
|
|
397
|
-
.scribing {
|
|
398
|
-
font-size: 14px;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
.goodsName {
|
|
402
|
-
font-size: 20px;
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
.cube-item:not(:last-child) {
|
|
407
|
-
margin-right: 10px;
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
&.arrange-3 {
|
|
411
|
-
display: flex;
|
|
412
|
-
overflow-x: scroll;
|
|
413
|
-
.cube-item {
|
|
414
|
-
flex: 0 0 auto;
|
|
415
|
-
width: 32%;
|
|
416
|
-
max-width: 32%;
|
|
417
|
-
.goodsImg {
|
|
418
|
-
width: 100%;
|
|
419
|
-
height: 100%;
|
|
420
|
-
aspect-ratio: 1;
|
|
421
|
-
}
|
|
422
|
-
.goodsDescription {
|
|
423
|
-
.goodsPrice {
|
|
424
|
-
font-size: 18px;
|
|
425
|
-
.scribing {
|
|
426
|
-
font-size: 14px;
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
.goodsName {
|
|
430
|
-
font-size: 20px;
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
.cube-item:not(:last-child) {
|
|
435
|
-
margin-right: 10px;
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
&.arrange-2 {
|
|
439
|
-
grid-template-columns: repeat(2, 1fr);
|
|
440
|
-
.cube-item {
|
|
441
|
-
margin: 0 5px;
|
|
442
|
-
.goodsImg {
|
|
443
|
-
width: 100%;
|
|
444
|
-
height: 100%;
|
|
445
|
-
aspect-ratio: 1;
|
|
446
|
-
}
|
|
447
|
-
.goodsDescription {
|
|
448
|
-
position: relative;
|
|
449
|
-
.goodsName {
|
|
450
|
-
font-size: 16px;
|
|
451
|
-
height: 42px;
|
|
452
|
-
width: 41vw;
|
|
453
|
-
}
|
|
454
|
-
.specialGoodsName {
|
|
455
|
-
font-size: 12px;
|
|
456
|
-
height: 42px;
|
|
457
|
-
}
|
|
458
|
-
.footerContent {
|
|
459
|
-
.goodsPrice {
|
|
460
|
-
font-size: 14px;
|
|
461
|
-
.scribing {
|
|
462
|
-
font-size: 12px;
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
&.arrange-1 {
|
|
470
|
-
.cube-item {
|
|
471
|
-
display: flex;
|
|
472
|
-
justify-content: space-around;
|
|
473
|
-
height: 100px;
|
|
474
|
-
|
|
475
|
-
.imgWrapper {
|
|
476
|
-
.goodsImg {
|
|
477
|
-
width: 100px;
|
|
478
|
-
height: 100px;
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
.goodsDescription {
|
|
483
|
-
position: relative;
|
|
484
|
-
width: 100%;
|
|
485
|
-
margin-left: 20px;
|
|
486
|
-
.goodsName {
|
|
487
|
-
height: auto;
|
|
488
|
-
font-size: 16px;
|
|
489
|
-
}
|
|
490
|
-
.footerContent {
|
|
491
|
-
.goodsPrice {
|
|
492
|
-
font-size: 16px;
|
|
493
|
-
.scribing {
|
|
494
|
-
font-size: 12px;
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
.goodsBuyWrapper {
|
|
499
|
-
position: relative;
|
|
500
|
-
.goodsBuy {
|
|
501
|
-
position: absolute;
|
|
502
|
-
top: 0;
|
|
503
|
-
right: 0;
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
.cube-item {
|
|
511
|
-
.imgWrapper {
|
|
512
|
-
position: relative;
|
|
513
|
-
text-align: center;
|
|
514
|
-
}
|
|
515
|
-
.imgMarked {
|
|
516
|
-
position: absolute;
|
|
517
|
-
top: 0;
|
|
518
|
-
left: 0;
|
|
519
|
-
width: 100%;
|
|
520
|
-
height: 100%;
|
|
521
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
522
|
-
display: flex;
|
|
523
|
-
justify-content: center;
|
|
524
|
-
align-items: center;
|
|
525
|
-
z-index: 100;
|
|
526
|
-
.maskState {
|
|
527
|
-
font-size: 23px;
|
|
528
|
-
color: white;
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
.goodsDescription {
|
|
532
|
-
display: flex;
|
|
533
|
-
flex-direction: column;
|
|
534
|
-
justify-content: space-between;
|
|
535
|
-
.goodsName {
|
|
536
|
-
display: -webkit-box;
|
|
537
|
-
-webkit-line-clamp: 2;
|
|
538
|
-
-webkit-box-orient: vertical;
|
|
539
|
-
overflow: hidden;
|
|
540
|
-
text-overflow: ellipsis;
|
|
541
|
-
}
|
|
542
|
-
.footerContent {
|
|
543
|
-
display: flex;
|
|
544
|
-
justify-content: space-between;
|
|
545
|
-
align-items: flex-end;
|
|
546
|
-
.goodsPrice {
|
|
547
|
-
color: #f53a50;
|
|
548
|
-
font-weight: 600;
|
|
549
|
-
.scribing {
|
|
550
|
-
display: inline-block;
|
|
551
|
-
color: #ccc;
|
|
552
|
-
text-decoration: line-through;
|
|
553
|
-
font-weight: normal;
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
.goodsBuy {
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div>
|
|
4
|
+
<div class="classTitle" :style="{ backgroundColor: props.bgColor }" v-if="scrollTop > 20 || isLc">
|
|
5
|
+
<span class="classTitleItem" v-for="(ele, index) in classDomainList" :key="ele.goodsClassId" :style="{
|
|
6
|
+
height: props.navigationHeight + 'px',
|
|
7
|
+
lineHeight: props.navigationHeight + 'px',
|
|
8
|
+
fontSize: props.navigationFontSize + 'px',
|
|
9
|
+
}">
|
|
10
|
+
<span
|
|
11
|
+
class="classSpan"
|
|
12
|
+
@click="checkClass(index)"
|
|
13
|
+
:style="{
|
|
14
|
+
background: checkClassIndex === index ? props.getBgColor : props.bgColor,
|
|
15
|
+
color: checkClassIndex === index ? props.getfontColor : props.fontColor,
|
|
16
|
+
}"
|
|
17
|
+
>{{ ele.goodsChangeClassName }}</span
|
|
18
|
+
>
|
|
19
|
+
</span>
|
|
20
|
+
</div>
|
|
21
|
+
<scroll-view scroll-y="true" scroll-with-animation="true" @scroll="handleScroll" :scroll-into-view="targetId" style="height: 100vh">
|
|
22
|
+
<template v-if="props.headImg">
|
|
23
|
+
<img v-if="isLc"
|
|
24
|
+
class="headerImg"
|
|
25
|
+
:src="props.headImg"
|
|
26
|
+
/>
|
|
27
|
+
<image v-else class="headerImg" :src="props.headImg" mode="widthFix"></image>
|
|
28
|
+
</template>
|
|
29
|
+
<div class="classContent">
|
|
30
|
+
<div
|
|
31
|
+
class="classContentItem"
|
|
32
|
+
v-for="(ele, index) in classDomainList"
|
|
33
|
+
:key="ele.goodsClassId"
|
|
34
|
+
:id="'item-' + index"
|
|
35
|
+
>
|
|
36
|
+
<div
|
|
37
|
+
v-if="!ele.classfooterImg"
|
|
38
|
+
class="classContentSpan"
|
|
39
|
+
:style="{
|
|
40
|
+
paddingTop: ele.titleMt + 'px',
|
|
41
|
+
paddingBottom: ele.titleBt + 'px',
|
|
42
|
+
backgroundColor: ele.bgColor,
|
|
43
|
+
}"
|
|
44
|
+
>
|
|
45
|
+
<img
|
|
46
|
+
style="display: inline-block; width: 15px; height: 15px; margin-right: 2px; margin-top: 3px"
|
|
47
|
+
v-if="ele.iconFlag"
|
|
48
|
+
:src="ele.goodsClassLogo ? (ele.goodsClassLogo.indexOf('http') === -1 ? domainNameUrl + ele.goodsClassLogo : ele.goodsClassLogo) : ''"
|
|
49
|
+
/>
|
|
50
|
+
<span
|
|
51
|
+
v-if="ele.goodsClassNameFlag"
|
|
52
|
+
:style="{
|
|
53
|
+
color: ele.titleColor,
|
|
54
|
+
fontSize: ele.titleFontSize + 'px',
|
|
55
|
+
}"
|
|
56
|
+
>
|
|
57
|
+
{{ ele.goodsChangeClassName }}
|
|
58
|
+
</span>
|
|
59
|
+
</div>
|
|
60
|
+
<div v-else
|
|
61
|
+
class="classContentImgBox"
|
|
62
|
+
:style="{
|
|
63
|
+
paddingTop: ele.titleMt + 'px',
|
|
64
|
+
paddingBottom: ele.titleBt + 'px',
|
|
65
|
+
backgroundColor: ele.bgColor,
|
|
66
|
+
}">
|
|
67
|
+
<img
|
|
68
|
+
v-if="isLc"
|
|
69
|
+
class="classContentImg"
|
|
70
|
+
:src="ele.classfooterImg"
|
|
71
|
+
/>
|
|
72
|
+
<image v-else class="classContentImg" :src="ele.classfooterImg" mode="widthFix"></image>
|
|
73
|
+
<div class="text-overlay">
|
|
74
|
+
<img
|
|
75
|
+
style="display: inline-block; width: 15px; height: 15px; margin-right: 2px; margin-top: 3px"
|
|
76
|
+
v-if="ele.iconFlag"
|
|
77
|
+
:src="ele.goodsClassLogo ? (ele.goodsClassLogo.indexOf('http') === -1 ? domainNameUrl + ele.goodsClassLogo : ele.goodsClassLogo) : ''"
|
|
78
|
+
/>
|
|
79
|
+
<span
|
|
80
|
+
v-if="ele.goodsClassNameFlag"
|
|
81
|
+
:style="{
|
|
82
|
+
color: ele.titleColor,
|
|
83
|
+
fontSize: ele.titleFontSize + 'px',
|
|
84
|
+
}"
|
|
85
|
+
>
|
|
86
|
+
{{ ele.goodsChangeClassName }}
|
|
87
|
+
</span>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
<!-- 商品 -->
|
|
93
|
+
<div
|
|
94
|
+
:class="['cube-container', `arrange-${ele.showTitle}`, { isLc: isLc }]"
|
|
95
|
+
:style="{
|
|
96
|
+
backgroundColor: ele.goodsBgColor,
|
|
97
|
+
}"
|
|
98
|
+
>
|
|
99
|
+
<div v-for="(item, index) in ele.goodsList" class="cube-item" :style="{
|
|
100
|
+
marginTop: `${ele.goodsMt}px`,
|
|
101
|
+
marginBottom: `${ele.goodsBt}px`,
|
|
102
|
+
}" :key="item.skuCode" @click="goGoodsDetail(item)">
|
|
103
|
+
<div class="imgWrapper">
|
|
104
|
+
<div
|
|
105
|
+
v-if="isLc === false && (item.goodsSupplynum <= 0 || item.goodsProperty5 === '1')"
|
|
106
|
+
class="imgMarked"
|
|
107
|
+
:style="{
|
|
108
|
+
borderRadius: `${ele.borderRaduils}px`,
|
|
109
|
+
}"
|
|
110
|
+
>
|
|
111
|
+
<div class="maskState">
|
|
112
|
+
{{ getMaskState(item.goodsProperty5) }}
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
<img
|
|
116
|
+
class="goodsImg"
|
|
117
|
+
:src="item.dataPic ? (item.dataPic.indexOf('http') === -1 ? domainNameUrl + item.dataPic : item.dataPic) : ''"
|
|
118
|
+
alt=""
|
|
119
|
+
:style="{
|
|
120
|
+
borderRadius: `${ele.borderRaduils}px`,
|
|
121
|
+
}"
|
|
122
|
+
/>
|
|
123
|
+
</div>
|
|
124
|
+
<div class="goodsDescription">
|
|
125
|
+
<div
|
|
126
|
+
v-if="isLc === true && ele.showTitle === 2"
|
|
127
|
+
class="specialGoodsName"
|
|
128
|
+
:style="{ marginTop: ele.goodsSpacingFlag ? '5px' : '0', marginBottom: ele.goodsSpacingFlag ? '5px' : '0' }"
|
|
129
|
+
>
|
|
130
|
+
{{ item.goodsName }}
|
|
131
|
+
</div>
|
|
132
|
+
<div v-else class="goodsName" :style="{ marginTop: ele.goodsSpacingFlag ? '5px' : '0', marginBottom: ele.goodsSpacingFlag ? '5px' : '0' }">
|
|
133
|
+
{{ item.goodsName }}
|
|
134
|
+
</div>
|
|
135
|
+
<section class="footerContent" :style="{ marginTop: ele.goodsSpacingFlag ? '5px' : '0', marginBottom: ele.goodsSpacingFlag ? '5px' : '0' }">
|
|
136
|
+
<div class="goodsPrice">
|
|
137
|
+
¥{{ item.pricesetNprice }}
|
|
138
|
+
<div class="scribing" v-if="ele.underLineFlag === 1">¥{{ item.pricesetMakeprice }}</div>
|
|
139
|
+
</div>
|
|
140
|
+
<div class="goodsBuy">
|
|
141
|
+
<img
|
|
142
|
+
src="https://rcyx-platform-test.yoxuan.vip/paas/shop/2021011200000001/2025-05-14/car.png"
|
|
143
|
+
@click.stop="addShoppingShow(item)"
|
|
144
|
+
style="height: 25px; width: 25px"
|
|
145
|
+
/>
|
|
146
|
+
</div>
|
|
147
|
+
</section>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
</scroll-view>
|
|
154
|
+
<!-- -->
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
157
|
+
</template>
|
|
158
|
+
|
|
159
|
+
<script>
|
|
160
|
+
import { isLc, getUrl, fetchGoodImpl } from "../../utils/index.js";
|
|
161
|
+
import { find, querySkuFromJm } from "../../api/index.js";
|
|
162
|
+
import { fetchPost } from "../../api/http.js";
|
|
163
|
+
import { query } from "../../api/urlQuery.js";
|
|
164
|
+
export default {
|
|
165
|
+
name: "cyy-ArsenalClass",
|
|
166
|
+
// bgColor: "#08fc29", //标题背景颜色
|
|
167
|
+
// goodsBgColor // 商品背景颜色
|
|
168
|
+
// goodsClassNameFlag: 0, //分类名称显示隐藏
|
|
169
|
+
// titleColor: "#08fc29", //分类标题颜色
|
|
170
|
+
// titleFontSize: 20, //分类标题字号
|
|
171
|
+
// titleMt: 20, //分类标题上边距
|
|
172
|
+
// titleBt: 20, //分类标题下边距
|
|
173
|
+
// iconFlag: 1, //分类Icon显示隐藏
|
|
174
|
+
// iconSize: 20, //分类标题大小
|
|
175
|
+
// classfooterImg: "", //分类底图
|
|
176
|
+
// showTitle: 1, //展示风格
|
|
177
|
+
// underLineFlag: 1, //划线价显示隐藏
|
|
178
|
+
// borderRaduils: 1, //边角样式
|
|
179
|
+
// goodsSpacingFlag: 1, //商品间距(有/无)
|
|
180
|
+
// goodsMt: 20, //商品上边距
|
|
181
|
+
// goodsBt: 20, //商品下边距
|
|
182
|
+
// synchronousOther: false, //同步其他
|
|
183
|
+
// changeGoodsType: 1, // 选择商品或分类商品 1分类2商品
|
|
184
|
+
// changeGoodsStr: '', // 选择的商品数据
|
|
185
|
+
props: {
|
|
186
|
+
props: {
|
|
187
|
+
headImg: String, //头部展示图
|
|
188
|
+
classList: Array, //选择分类
|
|
189
|
+
carIcon: Number, //购物车图标
|
|
190
|
+
bgColor: String, //导航栏背景颜色
|
|
191
|
+
getBgColor: String, //已选导航背景颜色
|
|
192
|
+
fontColor: String, //导航字体颜色
|
|
193
|
+
getfontColor: String, //已选导航字体颜色
|
|
194
|
+
navigationHeight: Number, //导航栏高度
|
|
195
|
+
navigationFontSize: Number, //导航栏字号
|
|
196
|
+
classDomainList: Array, //分类项配置集合
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
data() {
|
|
200
|
+
return {
|
|
201
|
+
classTitleStyle: {
|
|
202
|
+
height: this.props.navigationHeight + "px",
|
|
203
|
+
lineHeight: this.props.navigationHeight + "px",
|
|
204
|
+
fontSize: this.props.navigationFontSize + "px",
|
|
205
|
+
},
|
|
206
|
+
classDomainList: [],
|
|
207
|
+
domainNameUrl: "",
|
|
208
|
+
isLc: isLc,
|
|
209
|
+
checkClassIndex: -1,
|
|
210
|
+
targetId: "",
|
|
211
|
+
scrollTop: 0,
|
|
212
|
+
};
|
|
213
|
+
},
|
|
214
|
+
mounted() {
|
|
215
|
+
this.domainNameUrl = getUrl(this);
|
|
216
|
+
this.classDomainList = JSON.parse(JSON.stringify(this.props.classDomainList));
|
|
217
|
+
this.initgoods();
|
|
218
|
+
},
|
|
219
|
+
computed: {},
|
|
220
|
+
methods: {
|
|
221
|
+
initgoods() {
|
|
222
|
+
let that = this;
|
|
223
|
+
if (isLc) {
|
|
224
|
+
return this.LcGetGoodsList(that);
|
|
225
|
+
}
|
|
226
|
+
return this.getGoodsList(that);
|
|
227
|
+
},
|
|
228
|
+
async LcGetGoodsList(that) {
|
|
229
|
+
// 遍历classDomainList
|
|
230
|
+
let tempList = that.classDomainList;
|
|
231
|
+
for (let item of tempList) {
|
|
232
|
+
//分类
|
|
233
|
+
if (item.changeGoodsType == 1) {
|
|
234
|
+
if (isLc) {
|
|
235
|
+
const url = `${querySkuFromJm}&rows=20&page=1&classtreeCode=${item.classtreeCode}&channelCode=${query.channelCode}`;
|
|
236
|
+
const res = await fetchPost(url);
|
|
237
|
+
// 将返回的res.list设置给当前元素的goodsList属性
|
|
238
|
+
item.goodsList = res.list;
|
|
239
|
+
} else {
|
|
240
|
+
const url = `${find}?vendibilityFlag=true&childFlag=true&bizType=goods&hjFlag=true&area=北京朝阳区八里庄街道&page=1&rows=20&searchType=match_phrase&goodsType=00,40,41,60,61,62,32&classtreeCode=${item.classtreeCode}&channelCode=${query.channelCode}`;
|
|
241
|
+
const res = await fetchPost(url);
|
|
242
|
+
item.goodsList = res.list;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
//商品
|
|
246
|
+
if (item.changeGoodsType == 2) {
|
|
247
|
+
// 从 URL 中获取 channelCode
|
|
248
|
+
const urlParams = new URLSearchParams(window.location.hash.split('?')[1] || window.location.search);
|
|
249
|
+
const channelCode = urlParams.get('channelCode') || '';
|
|
250
|
+
const url = `${querySkuFromJm}&rows=200&page=1&goodsCode=${item.changeGoodsStr.replace('arsenalGoodsClass,','')}&channelCode=${channelCode}`;
|
|
251
|
+
const res = await fetchPost(url);
|
|
252
|
+
// 将返回的res.list设置给当前元素的goodsList属性
|
|
253
|
+
item.goodsList = res.list;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
}
|
|
257
|
+
that.classDomainList = tempList;
|
|
258
|
+
},
|
|
259
|
+
async getGoodsList(that) {
|
|
260
|
+
// 遍历classDomainList
|
|
261
|
+
for (let item of that.classDomainList) {
|
|
262
|
+
// 调用getNotice方法,传入classtreeCode
|
|
263
|
+
let params = {
|
|
264
|
+
vendibilityFlag: true,
|
|
265
|
+
childFlag: true,
|
|
266
|
+
bizType: "goods",
|
|
267
|
+
hjFlag: true,
|
|
268
|
+
area: that.$storage.get("addressValue") ? that.$storage.get("addressValue") : "北京朝阳区八里庄街道",
|
|
269
|
+
page: 1,
|
|
270
|
+
rows: 20,
|
|
271
|
+
searchType: "match_phrase",
|
|
272
|
+
goodsType: "00,40,41,60,61,62,32",
|
|
273
|
+
classtreeCode: item.classtreeCode
|
|
274
|
+
};
|
|
275
|
+
//分类
|
|
276
|
+
if (item.changeGoodsType == 1) {
|
|
277
|
+
const res = await that.http.get(`${find}`, params);
|
|
278
|
+
// 将返回的res.list设置给当前元素的goodsList属性
|
|
279
|
+
that.$set(item, "goodsList", res.list);
|
|
280
|
+
}
|
|
281
|
+
let paramObj = {
|
|
282
|
+
goodsCode: item.changeGoodsStr.replace('arsenalGoodsClass,','')
|
|
283
|
+
}
|
|
284
|
+
//商品
|
|
285
|
+
if (item.changeGoodsType == 2) {
|
|
286
|
+
const res = await fetchGoodImpl(that, paramObj);
|
|
287
|
+
// 将返回的res.list设置给当前元素的goodsList属性
|
|
288
|
+
that.$set(item, "goodsList", res.list);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
checkClass(index) {
|
|
293
|
+
this.checkClassIndex = index;
|
|
294
|
+
this.targetId = `item-${index}`;
|
|
295
|
+
},
|
|
296
|
+
addShoppingShow(el) {
|
|
297
|
+
if (isLc) {
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
this.$emit("addShoppingShow", el);
|
|
301
|
+
},
|
|
302
|
+
getMaskState(state) {
|
|
303
|
+
if (state === "1") {
|
|
304
|
+
return "预售中";
|
|
305
|
+
} else {
|
|
306
|
+
return "补货中";
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
getTextStyle(item) {
|
|
310
|
+
return {
|
|
311
|
+
color: item.titleColor || "#000000",
|
|
312
|
+
fontSize: item.titleFontSize || "16px",
|
|
313
|
+
};
|
|
314
|
+
},
|
|
315
|
+
goGoodsDetail(item) {
|
|
316
|
+
if (isLc) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
const { skuCode } = item;
|
|
320
|
+
let params = {
|
|
321
|
+
skuNo: skuCode,
|
|
322
|
+
};
|
|
323
|
+
this.$routers.push("detail", params);
|
|
324
|
+
},
|
|
325
|
+
handleScroll(e) {
|
|
326
|
+
this.scrollTop = e.detail.scrollTop
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
};
|
|
330
|
+
</script>
|
|
331
|
+
<style lang="less" scoped>
|
|
332
|
+
.headerImg {
|
|
333
|
+
width: 100%;
|
|
334
|
+
}
|
|
335
|
+
.classTitle {
|
|
336
|
+
overflow-x: scroll;
|
|
337
|
+
white-space: nowrap;
|
|
338
|
+
padding: 0 12px;
|
|
339
|
+
.classTitleItem {
|
|
340
|
+
margin-right: 10px;
|
|
341
|
+
.classSpan {
|
|
342
|
+
border-radius: 20px;
|
|
343
|
+
padding: 4px 12px;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
.classContent {
|
|
348
|
+
.classContentItem {
|
|
349
|
+
.classContentSpan {
|
|
350
|
+
display: flex;
|
|
351
|
+
justify-content: center;
|
|
352
|
+
padding: 30px 0;
|
|
353
|
+
}
|
|
354
|
+
.classContentImg {
|
|
355
|
+
width: 100%;
|
|
356
|
+
}
|
|
357
|
+
.classContentImgBox {
|
|
358
|
+
position: relative;
|
|
359
|
+
width: 100%;
|
|
360
|
+
.classContentImg {
|
|
361
|
+
width: 100%;
|
|
362
|
+
height: auto;
|
|
363
|
+
display: block;
|
|
364
|
+
}
|
|
365
|
+
.text-overlay{
|
|
366
|
+
position: absolute;
|
|
367
|
+
top: 0;
|
|
368
|
+
left: 0;
|
|
369
|
+
width: 100%;
|
|
370
|
+
height: 100%;
|
|
371
|
+
display: flex;
|
|
372
|
+
justify-content: center;
|
|
373
|
+
align-items: center;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
.cube-container {
|
|
380
|
+
display: grid;
|
|
381
|
+
&.arrange-4 {
|
|
382
|
+
display: flex;
|
|
383
|
+
justify-content: space-between;
|
|
384
|
+
flex-wrap: wrap;
|
|
385
|
+
.cube-item {
|
|
386
|
+
flex: 0 0 auto;
|
|
387
|
+
width: 30%;
|
|
388
|
+
max-width: 30%;
|
|
389
|
+
.goodsImg {
|
|
390
|
+
width: 100%;
|
|
391
|
+
height: 100%;
|
|
392
|
+
aspect-ratio: 1;
|
|
393
|
+
}
|
|
394
|
+
.goodsDescription {
|
|
395
|
+
.goodsPrice {
|
|
396
|
+
font-size: 18px;
|
|
397
|
+
.scribing {
|
|
398
|
+
font-size: 14px;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
.goodsName {
|
|
402
|
+
font-size: 20px;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
.cube-item:not(:last-child) {
|
|
407
|
+
margin-right: 10px;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
&.arrange-3 {
|
|
411
|
+
display: flex;
|
|
412
|
+
overflow-x: scroll;
|
|
413
|
+
.cube-item {
|
|
414
|
+
flex: 0 0 auto;
|
|
415
|
+
width: 32%;
|
|
416
|
+
max-width: 32%;
|
|
417
|
+
.goodsImg {
|
|
418
|
+
width: 100%;
|
|
419
|
+
height: 100%;
|
|
420
|
+
aspect-ratio: 1;
|
|
421
|
+
}
|
|
422
|
+
.goodsDescription {
|
|
423
|
+
.goodsPrice {
|
|
424
|
+
font-size: 18px;
|
|
425
|
+
.scribing {
|
|
426
|
+
font-size: 14px;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
.goodsName {
|
|
430
|
+
font-size: 20px;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
.cube-item:not(:last-child) {
|
|
435
|
+
margin-right: 10px;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
&.arrange-2 {
|
|
439
|
+
grid-template-columns: repeat(2, 1fr);
|
|
440
|
+
.cube-item {
|
|
441
|
+
margin: 0 5px;
|
|
442
|
+
.goodsImg {
|
|
443
|
+
width: 100%;
|
|
444
|
+
height: 100%;
|
|
445
|
+
aspect-ratio: 1;
|
|
446
|
+
}
|
|
447
|
+
.goodsDescription {
|
|
448
|
+
position: relative;
|
|
449
|
+
.goodsName {
|
|
450
|
+
font-size: 16px;
|
|
451
|
+
height: 42px;
|
|
452
|
+
width: 41vw;
|
|
453
|
+
}
|
|
454
|
+
.specialGoodsName {
|
|
455
|
+
font-size: 12px;
|
|
456
|
+
height: 42px;
|
|
457
|
+
}
|
|
458
|
+
.footerContent {
|
|
459
|
+
.goodsPrice {
|
|
460
|
+
font-size: 14px;
|
|
461
|
+
.scribing {
|
|
462
|
+
font-size: 12px;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
&.arrange-1 {
|
|
470
|
+
.cube-item {
|
|
471
|
+
display: flex;
|
|
472
|
+
justify-content: space-around;
|
|
473
|
+
height: 100px;
|
|
474
|
+
|
|
475
|
+
.imgWrapper {
|
|
476
|
+
.goodsImg {
|
|
477
|
+
width: 100px;
|
|
478
|
+
height: 100px;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.goodsDescription {
|
|
483
|
+
position: relative;
|
|
484
|
+
width: 100%;
|
|
485
|
+
margin-left: 20px;
|
|
486
|
+
.goodsName {
|
|
487
|
+
height: auto;
|
|
488
|
+
font-size: 16px;
|
|
489
|
+
}
|
|
490
|
+
.footerContent {
|
|
491
|
+
.goodsPrice {
|
|
492
|
+
font-size: 16px;
|
|
493
|
+
.scribing {
|
|
494
|
+
font-size: 12px;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
.goodsBuyWrapper {
|
|
499
|
+
position: relative;
|
|
500
|
+
.goodsBuy {
|
|
501
|
+
position: absolute;
|
|
502
|
+
top: 0;
|
|
503
|
+
right: 0;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.cube-item {
|
|
511
|
+
.imgWrapper {
|
|
512
|
+
position: relative;
|
|
513
|
+
text-align: center;
|
|
514
|
+
}
|
|
515
|
+
.imgMarked {
|
|
516
|
+
position: absolute;
|
|
517
|
+
top: 0;
|
|
518
|
+
left: 0;
|
|
519
|
+
width: 100%;
|
|
520
|
+
height: 100%;
|
|
521
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
522
|
+
display: flex;
|
|
523
|
+
justify-content: center;
|
|
524
|
+
align-items: center;
|
|
525
|
+
z-index: 100;
|
|
526
|
+
.maskState {
|
|
527
|
+
font-size: 23px;
|
|
528
|
+
color: white;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
.goodsDescription {
|
|
532
|
+
display: flex;
|
|
533
|
+
flex-direction: column;
|
|
534
|
+
justify-content: space-between;
|
|
535
|
+
.goodsName {
|
|
536
|
+
display: -webkit-box;
|
|
537
|
+
-webkit-line-clamp: 2;
|
|
538
|
+
-webkit-box-orient: vertical;
|
|
539
|
+
overflow: hidden;
|
|
540
|
+
text-overflow: ellipsis;
|
|
541
|
+
}
|
|
542
|
+
.footerContent {
|
|
543
|
+
display: flex;
|
|
544
|
+
justify-content: space-between;
|
|
545
|
+
align-items: flex-end;
|
|
546
|
+
.goodsPrice {
|
|
547
|
+
color: #f53a50;
|
|
548
|
+
font-weight: 600;
|
|
549
|
+
.scribing {
|
|
550
|
+
display: inline-block;
|
|
551
|
+
color: #ccc;
|
|
552
|
+
text-decoration: line-through;
|
|
553
|
+
font-weight: normal;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.goodsBuy {
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
</style>
|