cyy-vue-material 1.0.38 → 1.0.40
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/package.json +2 -1
- package/src/components/vop-label.vue +29 -35
- package/src/package/cyy-ArsenalCarousel/cyy-ArsenalCarousel.vue +3 -3
- package/src/package/cyy-ArsenalTop/cyy-ArsenalTop.vue +231 -0
- package/src/package/cyy-collocation/cyy-collocation.vue +263 -62
- package/src/package/cyy-goods/cyy-goods.vue +63 -32
- package/src/package/index.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cyy-vue-material",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.40",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"author": "",
|
|
12
12
|
"license": "ISC",
|
|
13
13
|
"devDependencies": {
|
|
14
|
+
"@rollup/plugin-image": "^3.0.2",
|
|
14
15
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
15
16
|
"@rollup/plugin-replace": "^5.0.2",
|
|
16
17
|
"@rollup/plugin-terser": "^0.4.0",
|
|
@@ -1,35 +1,29 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<text
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
font-size: 22rpx;
|
|
31
|
-
border-radius: 20rpx;
|
|
32
|
-
padding: 3rpx 20rpx;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<text v-if="goodsType === '40'" class="label">京东优选</text>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
export default {
|
|
7
|
+
name: "vop-label",
|
|
8
|
+
data() {
|
|
9
|
+
return {};
|
|
10
|
+
},
|
|
11
|
+
props: {
|
|
12
|
+
goodsType: {
|
|
13
|
+
type: [String, Number],
|
|
14
|
+
default: "",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<style lang="less" scoped>
|
|
21
|
+
.label {
|
|
22
|
+
margin-right: 4px;
|
|
23
|
+
background-color: #c82a29;
|
|
24
|
+
color: #ffffff;
|
|
25
|
+
font-size: 12px;
|
|
26
|
+
border-radius: 4px;
|
|
27
|
+
padding: 2px 4px;
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
>
|
|
22
22
|
<block v-for="(item, index) in resultArr" :key="index">
|
|
23
23
|
<swiper-item class="img-item">
|
|
24
|
-
<img :style="{ bordeRadius: classifyPhotoCorner(
|
|
24
|
+
<img :style="{ bordeRadius: classifyPhotoCorner(props.photoCorner) + 'px' }" :lazy-load="true" :src="item['imgUrl']" @click="linkClick(item)" />
|
|
25
25
|
</swiper-item>
|
|
26
26
|
</block>
|
|
27
27
|
</swiper>
|
|
@@ -104,12 +104,12 @@ export default {
|
|
|
104
104
|
background-color: rgb(888, 431, 73);
|
|
105
105
|
}
|
|
106
106
|
.swiperBox {
|
|
107
|
-
width:
|
|
107
|
+
width: 100%;
|
|
108
108
|
height: 150px;
|
|
109
109
|
border-radius: 10px;
|
|
110
110
|
|
|
111
111
|
.swiper {
|
|
112
|
-
width:
|
|
112
|
+
width: 100%;
|
|
113
113
|
height: 150px;
|
|
114
114
|
|
|
115
115
|
.swiper-content {
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div v-if="lowCode">
|
|
4
|
+
<div class="lowCode-warp" :style="{ paddingTop: props.paddingTop + 'px', paddingBottom: props.paddingBottom + 'px' }">
|
|
5
|
+
<img :src="resultArr[0]['imgUrl']" alt="" style="width: 100%" />
|
|
6
|
+
<ul>
|
|
7
|
+
<li v-for="(item, index) in resultArr" :key="index"></li>
|
|
8
|
+
</ul>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
<template v-else>
|
|
12
|
+
<div class="Box">
|
|
13
|
+
<div class="boxBg">
|
|
14
|
+
<div class="one" :style="{ 'background-color': color }"></div>
|
|
15
|
+
<div class="two" :style="{ 'background-color': color }"></div>
|
|
16
|
+
</div>
|
|
17
|
+
<!-- 搜索栏 -->
|
|
18
|
+
<div class="search">
|
|
19
|
+
<div class="search--input" @click="ToSearch">
|
|
20
|
+
<div class="search--input--box">搜索您喜欢的商品</div>
|
|
21
|
+
<div class="search--input--icon" :style="{ 'background-color': color }"><text class="iconfont icon-sousuo"></text></div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<!-- 标签 -->
|
|
25
|
+
<div class="tag">
|
|
26
|
+
<div class="tag--item">
|
|
27
|
+
<div class="header-box" style="width: 32rpx; height: 32rpx; margin-right: 8rpx">
|
|
28
|
+
<img :lazy-load="true" :src="props.iconImg" mode="" style="width: 100%; height: 100%" />
|
|
29
|
+
</div>
|
|
30
|
+
<div class="" style="color: #fff; font-size: 24rpx">{{ props.mallSlogan }}</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
<canvas id="canvasID" canvas-id="mycanvas" style="position: fixed; left: -500px"></canvas>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div class="swiperBox" :style="{ paddingTop: props.paddingTop + 'px', paddingBottom: props.paddingBottom + 'px' }">
|
|
37
|
+
<div class="swiper">
|
|
38
|
+
<swiper
|
|
39
|
+
interval="4000"
|
|
40
|
+
class="swiper-content"
|
|
41
|
+
circular="true"
|
|
42
|
+
:vertical="directionResult"
|
|
43
|
+
:autoplay="autoplayResult"
|
|
44
|
+
:duration="props.autoplayInterval"
|
|
45
|
+
>
|
|
46
|
+
<block v-for="(item, index) in resultArr" :key="index">
|
|
47
|
+
<swiper-item class="img-item">
|
|
48
|
+
<img :style="{ bordeRadius: classifyPhotoCorner(props.photoCorner) + 'px' }" :lazy-load="true" :src="item['imgUrl']" @click="linkClick(item)" />
|
|
49
|
+
</swiper-item>
|
|
50
|
+
</block>
|
|
51
|
+
</swiper>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
<script>
|
|
59
|
+
import { isLc } from "../../utils/index.js";
|
|
60
|
+
import { isEmpty, isUndefined } from "lodash-es";
|
|
61
|
+
export default {
|
|
62
|
+
name: "cyy-ArsenalTop",
|
|
63
|
+
data() {
|
|
64
|
+
return {
|
|
65
|
+
lowCode: isLc,
|
|
66
|
+
color: "#FD1738",
|
|
67
|
+
};
|
|
68
|
+
},
|
|
69
|
+
props: {
|
|
70
|
+
props: {
|
|
71
|
+
autoPlay: Number, //自动播放
|
|
72
|
+
autoplayInterval: Number, //轮播间隔
|
|
73
|
+
direction: Number, //方向
|
|
74
|
+
siteName: String, //站点名称
|
|
75
|
+
mallSlogan: String, //商城标语
|
|
76
|
+
iconImg: String, //ICON
|
|
77
|
+
paddingTop: Number, //上边距
|
|
78
|
+
paddingBottom: Number, //下边距
|
|
79
|
+
selectImg: Array, //添加图片
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
mounted() {
|
|
83
|
+
console.log(this.props, 2023);
|
|
84
|
+
},
|
|
85
|
+
computed: {
|
|
86
|
+
autoplayResult() {
|
|
87
|
+
if (this.props.autoPlay === 0) {
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
false;
|
|
91
|
+
},
|
|
92
|
+
directionResult() {
|
|
93
|
+
if (this.props.direction === 0) {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
return true;
|
|
97
|
+
},
|
|
98
|
+
resultArr() {
|
|
99
|
+
const { selectImg, defaultValue } = this.props;
|
|
100
|
+
const computedArr = selectImg.filter((item) => !isUndefined(item)).filter((item) => !Object.values(item).every((citem) => isUndefined(citem)));
|
|
101
|
+
let arr = defaultValue;
|
|
102
|
+
if (!isEmpty(computedArr)) {
|
|
103
|
+
arr = computedArr;
|
|
104
|
+
}
|
|
105
|
+
console.log(52, arr);
|
|
106
|
+
return arr;
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
methods: {
|
|
110
|
+
classifyPhotoCorner(item) {
|
|
111
|
+
if (item === 20) {
|
|
112
|
+
return 10;
|
|
113
|
+
}
|
|
114
|
+
if (item === 50) {
|
|
115
|
+
return 20;
|
|
116
|
+
}
|
|
117
|
+
return item;
|
|
118
|
+
},
|
|
119
|
+
linkClick(item) {
|
|
120
|
+
this.$emit("linkClick", item);
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
</script>
|
|
125
|
+
<style lang="less" scoped>
|
|
126
|
+
.holder {
|
|
127
|
+
width: 100%;
|
|
128
|
+
padding: 10px 0;
|
|
129
|
+
height: 60px;
|
|
130
|
+
background-color: rgb(888, 431, 73);
|
|
131
|
+
}
|
|
132
|
+
.swiperBox {
|
|
133
|
+
width: 100%;
|
|
134
|
+
height: 150px;
|
|
135
|
+
border-radius: 10px;
|
|
136
|
+
|
|
137
|
+
.swiper {
|
|
138
|
+
width: 100%;
|
|
139
|
+
height: 150px;
|
|
140
|
+
|
|
141
|
+
.swiper-content {
|
|
142
|
+
height: 150px;
|
|
143
|
+
width: 100%;
|
|
144
|
+
|
|
145
|
+
.img-item {
|
|
146
|
+
padding: 0 12.5px;
|
|
147
|
+
box-sizing: border-box;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
img {
|
|
152
|
+
width: 100%;
|
|
153
|
+
height: 100%;
|
|
154
|
+
border-radius: 10px;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
.Box {
|
|
159
|
+
width: 100%;
|
|
160
|
+
position: relative;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.boxBg {
|
|
164
|
+
width: 100%;
|
|
165
|
+
height: 201px;
|
|
166
|
+
position: absolute;
|
|
167
|
+
top: 0;
|
|
168
|
+
left: 0;
|
|
169
|
+
z-index: -1;
|
|
170
|
+
|
|
171
|
+
.one {
|
|
172
|
+
width: 100%;
|
|
173
|
+
height: 150px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.two {
|
|
177
|
+
width: 100%;
|
|
178
|
+
height: 102px;
|
|
179
|
+
border-radius: 50%;
|
|
180
|
+
position: relative;
|
|
181
|
+
top: -51px;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.search {
|
|
186
|
+
&--input {
|
|
187
|
+
margin: 0 auto;
|
|
188
|
+
width: 90%;
|
|
189
|
+
height: 32px;
|
|
190
|
+
background: rgba(255, 255, 255, 0.3);
|
|
191
|
+
box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.1);
|
|
192
|
+
border-radius: 17.5px;
|
|
193
|
+
text-align: center;
|
|
194
|
+
position: relative;
|
|
195
|
+
|
|
196
|
+
&--box {
|
|
197
|
+
font-size: 12px;
|
|
198
|
+
color: #fff;
|
|
199
|
+
line-height: 32px;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
&--icon {
|
|
203
|
+
position: absolute;
|
|
204
|
+
top: 5px;
|
|
205
|
+
right: 5px;
|
|
206
|
+
width: 27.5px;
|
|
207
|
+
height: 22px;
|
|
208
|
+
border-radius: 17.5px;
|
|
209
|
+
display: flex;
|
|
210
|
+
align-items: center;
|
|
211
|
+
justify-content: center;
|
|
212
|
+
|
|
213
|
+
.icon-sousuo {
|
|
214
|
+
color: #fff;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.tag {
|
|
221
|
+
display: flex;
|
|
222
|
+
padding: 7px 0;
|
|
223
|
+
|
|
224
|
+
&--item {
|
|
225
|
+
flex: 1;
|
|
226
|
+
display: flex;
|
|
227
|
+
justify-content: center;
|
|
228
|
+
align-items: center;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
</style>
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<div v-if="!props.
|
|
3
|
+
<div v-if="!props.goods" :style="noDataStyle">请选择商品</div>
|
|
4
4
|
<div
|
|
5
5
|
v-else
|
|
6
6
|
:style="{
|
|
7
7
|
margin: `${props.marginTop}px 0 ${props.marginBottom}px 0`,
|
|
8
8
|
backgroundColor: `${props.backgroundColor}`,
|
|
9
|
+
borderRadius: `${props.cornerStyle}px`,
|
|
9
10
|
}"
|
|
10
11
|
>
|
|
11
12
|
<div
|
|
@@ -14,10 +15,17 @@
|
|
|
14
15
|
v-if="props.arrange !== 4"
|
|
15
16
|
>
|
|
16
17
|
<div class="title">
|
|
17
|
-
<span class="mainTitle">{{
|
|
18
|
+
<span class="mainTitle" :class="mainTitleColor">{{
|
|
19
|
+
props.activityTitle
|
|
20
|
+
}}</span
|
|
18
21
|
><span class="subtitle">{{ props.activitySubtitle }}</span>
|
|
19
22
|
</div>
|
|
20
|
-
<div
|
|
23
|
+
<div
|
|
24
|
+
class="more"
|
|
25
|
+
v-if="props.more === 1 && [1, 2, 3].includes(props.arrange)"
|
|
26
|
+
>
|
|
27
|
+
更多<img src="../../static/arrow.png" />
|
|
28
|
+
</div>
|
|
21
29
|
</div>
|
|
22
30
|
<div
|
|
23
31
|
class="top"
|
|
@@ -30,43 +38,62 @@
|
|
|
30
38
|
<div class="line"></div>
|
|
31
39
|
</div>
|
|
32
40
|
</div>
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
<div class="mainImage">
|
|
42
|
+
<img
|
|
43
|
+
:style="{
|
|
44
|
+
borderTopLeftRadius: `${props.cornerStyle}px`,
|
|
45
|
+
borderTopRightRadius: `${props.cornerStyle}px`,
|
|
46
|
+
}"
|
|
47
|
+
:src="imgUrl + props.selectImg[0]"
|
|
48
|
+
alt="主图"
|
|
49
|
+
/>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
42
52
|
<div
|
|
43
53
|
class="goodsList"
|
|
44
|
-
:class="`arrange-${props.arrange} spacingStyle-${
|
|
45
|
-
:style="{
|
|
46
|
-
margin: props.margin,
|
|
47
|
-
}"
|
|
48
|
-
v-for="(item, index) in goodsList"
|
|
49
|
-
:key="item.skuCode"
|
|
54
|
+
:class="`arrange-${props.arrange} spacingStyle-${props.spacingStyle}`"
|
|
50
55
|
>
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
<div
|
|
57
|
+
class="goodsBox"
|
|
58
|
+
:style="{
|
|
59
|
+
borderRadius: `${props.cornerStyle}px`,
|
|
60
|
+
}"
|
|
61
|
+
v-for="(item, index) in goodsList"
|
|
62
|
+
:key="item.skuCode"
|
|
63
|
+
@click="goGoodsDetail(item)"
|
|
64
|
+
>
|
|
65
|
+
<img
|
|
66
|
+
class="goodsImage"
|
|
67
|
+
:style="{ borderRadius: `${props.cornerStyle}px` }"
|
|
68
|
+
:src="imgUrl + item.dataPic"
|
|
69
|
+
alt="商品图片"
|
|
70
|
+
/>
|
|
71
|
+
<div class="goodsDescription">
|
|
72
|
+
<div class="goodsName"><vopLabel />{{ item.goodsName }}</div>
|
|
73
|
+
<section class="footerContent">
|
|
74
|
+
<div
|
|
75
|
+
class="goodsTagList"
|
|
76
|
+
v-if="
|
|
77
|
+
props.goodsTag.length > 0 && [2, 4].includes(props.arrange)
|
|
78
|
+
"
|
|
79
|
+
>
|
|
80
|
+
<template v-for="tag in props.goodsTag" :key="tag.id">
|
|
81
|
+
<span class="tag">
|
|
82
|
+
{{ tag.value }}
|
|
83
|
+
</span>
|
|
84
|
+
</template>
|
|
85
|
+
</div>
|
|
86
|
+
<div class="goodsPrice">
|
|
87
|
+
<span class="priceUnit">¥</span>{{ item.pricesetNprice }}
|
|
88
|
+
<div class="scribing" v-if="props.markedPrice === 1">
|
|
89
|
+
¥{{ item.pricesetMakeprice }}
|
|
90
|
+
</div>
|
|
60
91
|
</div>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
>
|
|
67
|
-
立即购买
|
|
68
|
-
</button>
|
|
69
|
-
</section>
|
|
92
|
+
<div class="goodsBuy" v-if="props.purchaseIcon === 1">
|
|
93
|
+
<button @click="handleBuyGoods(item.skuNo)">立即购买</button>
|
|
94
|
+
</div>
|
|
95
|
+
</section>
|
|
96
|
+
</div>
|
|
70
97
|
</div>
|
|
71
98
|
</div>
|
|
72
99
|
</div>
|
|
@@ -76,6 +103,7 @@
|
|
|
76
103
|
<script>
|
|
77
104
|
import { fetchGoodImpl, isLc, getUrl } from "../../utils/index.js";
|
|
78
105
|
import { get } from "lodash-es";
|
|
106
|
+
import vopLabel from "../../components/vop-label.vue";
|
|
79
107
|
|
|
80
108
|
export default {
|
|
81
109
|
name: "cyy-collocation",
|
|
@@ -110,23 +138,39 @@ export default {
|
|
|
110
138
|
textAlign: "center",
|
|
111
139
|
},
|
|
112
140
|
goodsList: [],
|
|
113
|
-
imgUrl:
|
|
141
|
+
imgUrl: "",
|
|
114
142
|
};
|
|
115
143
|
},
|
|
144
|
+
computed: {
|
|
145
|
+
mainTitleColor() {
|
|
146
|
+
return {
|
|
147
|
+
mainTitleColor: this.props.arrange === 5,
|
|
148
|
+
};
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
components: {
|
|
152
|
+
vopLabel,
|
|
153
|
+
},
|
|
116
154
|
mounted() {
|
|
117
155
|
this.init();
|
|
118
156
|
},
|
|
119
157
|
methods: {
|
|
120
158
|
async init() {
|
|
121
|
-
|
|
122
|
-
const
|
|
123
|
-
const
|
|
159
|
+
this.imgUrl = getUrl(this);
|
|
160
|
+
const { goods = [] } = this.props;
|
|
161
|
+
const skuCode = goods.toString();
|
|
162
|
+
const paramObj = { skuCode };
|
|
124
163
|
const res = await fetchGoodImpl(this, paramObj);
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
164
|
+
let list = get(res, "list", []);
|
|
165
|
+
|
|
166
|
+
// 有更多按钮的样式在首页只展示部分商品
|
|
167
|
+
if ([1, 3].includes(this.props.arrange)) {
|
|
168
|
+
this.goodsList = list.slice(0, 3);
|
|
169
|
+
} else if (this.props.arrange === 2) {
|
|
170
|
+
this.goodsList = list.slice(0, 2);
|
|
171
|
+
} else {
|
|
172
|
+
this.goodsList = list;
|
|
173
|
+
}
|
|
130
174
|
},
|
|
131
175
|
|
|
132
176
|
goGoodsDetail(item) {
|
|
@@ -140,23 +184,19 @@ export default {
|
|
|
140
184
|
};
|
|
141
185
|
this.$routers.push("detail", params);
|
|
142
186
|
},
|
|
143
|
-
|
|
144
|
-
handleBuyGoods(skuNo) {
|
|
145
|
-
if (isLc) {
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
this.$routers.push("detail", { skuNo });
|
|
149
|
-
},
|
|
150
187
|
},
|
|
151
188
|
};
|
|
152
189
|
</script>
|
|
153
190
|
|
|
154
191
|
<style lang="less" scoped>
|
|
192
|
+
.mainTitleColor {
|
|
193
|
+
color: #f52b43;
|
|
194
|
+
}
|
|
155
195
|
.top {
|
|
156
|
-
|
|
196
|
+
width: 350px;
|
|
197
|
+
margin: 0 auto;
|
|
198
|
+
padding: 12px 0;
|
|
157
199
|
.mainTitle {
|
|
158
|
-
height: 22px;
|
|
159
|
-
line-height: 22px;
|
|
160
200
|
font-size: 16px;
|
|
161
201
|
font-weight: 600;
|
|
162
202
|
}
|
|
@@ -182,7 +222,7 @@ export default {
|
|
|
182
222
|
}
|
|
183
223
|
}
|
|
184
224
|
&.center {
|
|
185
|
-
|
|
225
|
+
padding: 18px 0;
|
|
186
226
|
.title {
|
|
187
227
|
display: flex;
|
|
188
228
|
justify-content: center;
|
|
@@ -200,22 +240,183 @@ export default {
|
|
|
200
240
|
}
|
|
201
241
|
}
|
|
202
242
|
.mainImage {
|
|
203
|
-
|
|
243
|
+
text-align: center;
|
|
244
|
+
height: 180px;
|
|
245
|
+
img {
|
|
246
|
+
width: 350px;
|
|
247
|
+
height: 180px;
|
|
248
|
+
}
|
|
204
249
|
}
|
|
205
250
|
.goodsList {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
251
|
+
margin-top: 8px;
|
|
252
|
+
width: 350px;
|
|
253
|
+
margin-left: auto;
|
|
254
|
+
margin-right: auto;
|
|
255
|
+
.goodsBox {
|
|
256
|
+
background-color: white;
|
|
209
257
|
.goodsImage {
|
|
210
258
|
width: 100px;
|
|
211
259
|
height: 100px;
|
|
212
260
|
}
|
|
213
261
|
.goodsDescription {
|
|
214
|
-
margin-top: 7px;
|
|
215
|
-
|
|
216
262
|
.goodsName {
|
|
263
|
+
display: -webkit-box;
|
|
264
|
+
-webkit-line-clamp: 2;
|
|
265
|
+
-webkit-box-orient: vertical;
|
|
266
|
+
overflow: hidden;
|
|
267
|
+
text-overflow: ellipsis;
|
|
217
268
|
font-size: 12px;
|
|
218
269
|
}
|
|
270
|
+
.footerContent {
|
|
271
|
+
.goodsTagList {
|
|
272
|
+
display: flex;
|
|
273
|
+
margin-top: 6px;
|
|
274
|
+
font-size: 12px;
|
|
275
|
+
.tag {
|
|
276
|
+
background-color: #fee9ec;
|
|
277
|
+
border-radius: 10px;
|
|
278
|
+
padding: 0.25em 0.5em;
|
|
279
|
+
color: #f52b43;
|
|
280
|
+
}
|
|
281
|
+
.tag:not(:last-child) {
|
|
282
|
+
margin-right: 8px;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
.goodsPrice {
|
|
286
|
+
color: #f53a50;
|
|
287
|
+
font-weight: 600;
|
|
288
|
+
font-size: 14px;
|
|
289
|
+
.priceUnit {
|
|
290
|
+
font-size: 10px;
|
|
291
|
+
}
|
|
292
|
+
.scribing {
|
|
293
|
+
display: inline-block;
|
|
294
|
+
color: #ccc;
|
|
295
|
+
text-decoration: line-through;
|
|
296
|
+
font-weight: normal;
|
|
297
|
+
font-size: 12px;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
.goodsBuy {
|
|
301
|
+
button {
|
|
302
|
+
border: 0;
|
|
303
|
+
border-radius: 15px;
|
|
304
|
+
background-color: red;
|
|
305
|
+
color: white;
|
|
306
|
+
padding: 0.25em 0.5em;
|
|
307
|
+
font-size: 12px;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
.goodsList {
|
|
315
|
+
&.arrange-1 {
|
|
316
|
+
display: flex;
|
|
317
|
+
justify-content: space-around;
|
|
318
|
+
.goodsBox {
|
|
319
|
+
width: 100px;
|
|
320
|
+
}
|
|
321
|
+
.goodsBuy {
|
|
322
|
+
margin-bottom: 10px;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
&.arrange-2,
|
|
326
|
+
&.arrange-4 {
|
|
327
|
+
display: flex;
|
|
328
|
+
flex-direction: column;
|
|
329
|
+
margin: 8px auto;
|
|
330
|
+
.goodsBox {
|
|
331
|
+
display: flex;
|
|
332
|
+
margin-bottom: 10px;
|
|
333
|
+
padding: 10px;
|
|
334
|
+
.goodsDescription {
|
|
335
|
+
position: relative;
|
|
336
|
+
margin-left: 10px;
|
|
337
|
+
width: 100%;
|
|
338
|
+
.goodsName {
|
|
339
|
+
font-size: 14px;
|
|
340
|
+
}
|
|
341
|
+
.footerContent {
|
|
342
|
+
.goodsPrice {
|
|
343
|
+
display: inline;
|
|
344
|
+
position: absolute;
|
|
345
|
+
bottom: 0;
|
|
346
|
+
left: 0;
|
|
347
|
+
font-size: 16px;
|
|
348
|
+
}
|
|
349
|
+
.goodsBuy {
|
|
350
|
+
display: inline;
|
|
351
|
+
position: absolute;
|
|
352
|
+
bottom: 0;
|
|
353
|
+
right: 0;
|
|
354
|
+
margin-bottom: 0;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
&.arrange-3 {
|
|
361
|
+
display: flex;
|
|
362
|
+
justify-content: space-between;
|
|
363
|
+
flex-wrap: wrap;
|
|
364
|
+
.goodsBox {
|
|
365
|
+
width: 170px;
|
|
366
|
+
height: 250px;
|
|
367
|
+
background: white;
|
|
368
|
+
.goodsImage {
|
|
369
|
+
width: 170px;
|
|
370
|
+
height: 170px;
|
|
371
|
+
}
|
|
372
|
+
.goodsDescription {
|
|
373
|
+
.goodsName{
|
|
374
|
+
margin-top: 10px;
|
|
375
|
+
height: 2.5em;
|
|
376
|
+
}
|
|
377
|
+
.footerContent {
|
|
378
|
+
margin-top: 5px;
|
|
379
|
+
display: flex;
|
|
380
|
+
justify-content: space-between;
|
|
381
|
+
align-items: flex-end;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
.goodsBox:nth-child(1) {
|
|
386
|
+
width: 100%;
|
|
387
|
+
height: 220px;
|
|
388
|
+
padding: 10px;
|
|
389
|
+
.goodsImage {
|
|
390
|
+
width: 100%;
|
|
391
|
+
height: 130px;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
&.arrange-5 {
|
|
396
|
+
display: flex;
|
|
397
|
+
justify-content: space-around;
|
|
398
|
+
flex-wrap: wrap;
|
|
399
|
+
.goodsImage {
|
|
400
|
+
margin-top: 6px;
|
|
401
|
+
}
|
|
402
|
+
.goodsBox {
|
|
403
|
+
width: 100px;
|
|
404
|
+
background: white;
|
|
405
|
+
.goodsImage {
|
|
406
|
+
width: 100px;
|
|
407
|
+
height: 100px;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
.goodsDescription {
|
|
411
|
+
.footerContent {
|
|
412
|
+
.goodsPrice {
|
|
413
|
+
text-align: center;
|
|
414
|
+
}
|
|
415
|
+
.goodsBuy {
|
|
416
|
+
text-align: center;
|
|
417
|
+
margin-bottom: 10px;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
219
420
|
}
|
|
220
421
|
}
|
|
221
422
|
}
|
|
@@ -33,10 +33,21 @@
|
|
|
33
33
|
¥{{ item.pricesetMakeprice }}
|
|
34
34
|
</div>
|
|
35
35
|
</div>
|
|
36
|
-
<button
|
|
36
|
+
<button
|
|
37
|
+
v-if="props.arrange !== 4"
|
|
38
|
+
class="goodsBuy"
|
|
39
|
+
>
|
|
37
40
|
立即购买
|
|
38
41
|
</button>
|
|
39
42
|
</section>
|
|
43
|
+
<div class="goodsBuyWrapper">
|
|
44
|
+
<button
|
|
45
|
+
v-if="props.arrange === 4"
|
|
46
|
+
class="goodsBuy"
|
|
47
|
+
>
|
|
48
|
+
立即购买
|
|
49
|
+
</button>
|
|
50
|
+
</div>
|
|
40
51
|
</div>
|
|
41
52
|
</div>
|
|
42
53
|
</div>
|
|
@@ -101,13 +112,6 @@ export default {
|
|
|
101
112
|
};
|
|
102
113
|
this.$routers.push("detail", params);
|
|
103
114
|
},
|
|
104
|
-
|
|
105
|
-
handleBuyGoods(skuNo) {
|
|
106
|
-
if (isLc) {
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
this.$routers.push("detail", { skuNo });
|
|
110
|
-
},
|
|
111
115
|
},
|
|
112
116
|
};
|
|
113
117
|
</script>
|
|
@@ -120,14 +124,21 @@ button {
|
|
|
120
124
|
display: grid;
|
|
121
125
|
&.arrange-1 {
|
|
122
126
|
grid-template-columns: repeat(1, 1fr);
|
|
123
|
-
.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
.
|
|
130
|
-
|
|
127
|
+
.cube-item {
|
|
128
|
+
img {
|
|
129
|
+
max-height: 340px;
|
|
130
|
+
margin-left: auto;
|
|
131
|
+
margin-right: auto;
|
|
132
|
+
}
|
|
133
|
+
.goodsName {
|
|
134
|
+
padding: 20px 0 5px;
|
|
135
|
+
font-size: 20px;
|
|
136
|
+
}
|
|
137
|
+
.goodsPrice {
|
|
138
|
+
font-size: 18px;
|
|
139
|
+
.scribing {
|
|
140
|
+
font-size: 14px;
|
|
141
|
+
}
|
|
131
142
|
}
|
|
132
143
|
}
|
|
133
144
|
}
|
|
@@ -136,11 +147,10 @@ button {
|
|
|
136
147
|
|
|
137
148
|
.cube-item {
|
|
138
149
|
margin: 0 5px;
|
|
139
|
-
width: 170px;
|
|
140
|
-
height: 170px;
|
|
150
|
+
max-width: 170px;
|
|
141
151
|
img {
|
|
142
|
-
width: 170px;
|
|
143
|
-
height: 170px;
|
|
152
|
+
max-width: 170px;
|
|
153
|
+
max-height: 170px;
|
|
144
154
|
}
|
|
145
155
|
.goodsDescription {
|
|
146
156
|
position: relative;
|
|
@@ -172,21 +182,41 @@ button {
|
|
|
172
182
|
.cube-item {
|
|
173
183
|
display: flex;
|
|
174
184
|
justify-content: space-around;
|
|
185
|
+
max-height: 100px;
|
|
175
186
|
|
|
176
187
|
img {
|
|
177
|
-
width:
|
|
188
|
+
max-width: 100px;
|
|
189
|
+
max-height: 100px;
|
|
178
190
|
}
|
|
179
191
|
.goodsDescription {
|
|
180
192
|
display: block;
|
|
181
193
|
position: relative;
|
|
194
|
+
margin-left: 10px;
|
|
195
|
+
width: 210px;
|
|
196
|
+
.goodsName {
|
|
197
|
+
max-height: 42px;
|
|
198
|
+
height: auto;
|
|
199
|
+
}
|
|
182
200
|
.footerContent {
|
|
183
201
|
.goodsPrice {
|
|
184
|
-
|
|
202
|
+
font-size: 16px;
|
|
203
|
+
.scribing {
|
|
204
|
+
font-size: 12px;
|
|
205
|
+
}
|
|
185
206
|
}
|
|
207
|
+
}
|
|
208
|
+
.goodsBuyWrapper {
|
|
209
|
+
position: relative;
|
|
186
210
|
.goodsBuy {
|
|
187
211
|
position: absolute;
|
|
188
|
-
top:
|
|
189
|
-
|
|
212
|
+
top: 0;
|
|
213
|
+
right: 0;
|
|
214
|
+
border-radius: 5px;
|
|
215
|
+
background-color: red;
|
|
216
|
+
color: white;
|
|
217
|
+
align-self: flex-end;
|
|
218
|
+
padding: 0.25em 0.5em;
|
|
219
|
+
font-size: 12px;
|
|
190
220
|
}
|
|
191
221
|
}
|
|
192
222
|
}
|
|
@@ -224,14 +254,15 @@ button {
|
|
|
224
254
|
font-weight: normal;
|
|
225
255
|
}
|
|
226
256
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.goodsBuy {
|
|
260
|
+
border-radius: 5px;
|
|
261
|
+
background-color: red;
|
|
262
|
+
color: white;
|
|
263
|
+
align-self: flex-end;
|
|
264
|
+
padding: 0.25em 0.5em;
|
|
265
|
+
font-size: 12px;
|
|
235
266
|
}
|
|
236
267
|
}
|
|
237
268
|
}
|
package/src/package/index.js
CHANGED
|
@@ -8,3 +8,4 @@ export { default as ArsenalPicture } from "./cyy-ArsenalPicture/cyy-ArsenalPictu
|
|
|
8
8
|
export { default as ArsenalNavigation } from "./cyy-ArsenalNavigation/cyy-ArsenalNavigation.vue";
|
|
9
9
|
export { default as ArsenalCarousel } from "./cyy-ArsenalCarousel/cyy-ArsenalCarousel.vue";
|
|
10
10
|
export { default as Collocation } from "./cyy-collocation/cyy-collocation.vue";
|
|
11
|
+
export { default as ArsenalTop } from "./cyy-ArsenalTop/cyy-ArsenalTop.vue";
|