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.
Files changed (38) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +34 -34
  3. package/src/App.vue +149 -149
  4. package/src/api/http.js +16 -16
  5. package/src/api/index.js +21 -21
  6. package/src/api/urlQuery.js +20 -20
  7. package/src/common/js/constant.js +5 -5
  8. package/src/common/js/index.js +1 -1
  9. package/src/components/vop-label.vue +29 -29
  10. package/src/index.dev.js +4 -4
  11. package/src/package/cyy-ArsenalActivity/components/u-cont-down.vue +316 -316
  12. package/src/package/cyy-ArsenalActivity/components/u-line-progress.vue +150 -150
  13. package/src/package/cyy-ArsenalActivity/cyy-ArsenalActivity.vue +820 -820
  14. package/src/package/cyy-ArsenalCarousel/cyy-ArsenalCarousel.vue +137 -137
  15. package/src/package/cyy-ArsenalClass/cyy-ArsenalClass.vue +564 -564
  16. package/src/package/cyy-ArsenalMyNavigation/cyy-ArsenalMyNavigation.vue +128 -125
  17. package/src/package/cyy-ArsenalMyTop/cyy-ArsenalMyTop.vue +211 -211
  18. package/src/package/cyy-ArsenalNavigation/cyy-ArsenalNavigation.vue +236 -236
  19. package/src/package/cyy-ArsenalPicture/cyy-ArsenalPicture.vue +228 -228
  20. package/src/package/cyy-ArsenalPromotion/cyy-ArsenalPromotion.vue +913 -899
  21. package/src/package/cyy-ArsenalRecommend/cyy-ArsenalRecommend.vue +56 -56
  22. package/src/package/cyy-ArsenalTop/cyy-ArsenalTop.vue +328 -328
  23. package/src/package/cyy-collocation/cyy-collocation.vue +639 -639
  24. package/src/package/cyy-goods/cyy-goods.vue +317 -317
  25. package/src/package/cyy-goodsOne/consult.vue +267 -267
  26. package/src/package/cyy-goodsOne/cyy-goodsOne.vue +217 -217
  27. package/src/package/cyy-image/cyy-image.vue +64 -64
  28. package/src/package/cyy-live/cyy-live.vue +196 -196
  29. package/src/package/cyy-new-product/cyy-new-product.vue +834 -834
  30. package/src/package/cyy-notice/cyy-notice.vue +137 -137
  31. package/src/package/cyy-search/cyy-search.vue +57 -57
  32. package/src/package/cyy-slider/cyy-slider.vue +117 -117
  33. package/src/package/cyy-title/cyy-title.vue +38 -38
  34. package/src/package/cyy-video/cyy-video.vue +49 -49
  35. package/src/package/index.js +21 -21
  36. package/src/utils/checkEnv.js +16 -16
  37. package/src/utils/fetchFactory.js +100 -100
  38. package/src/utils/index.js +2 -2
@@ -1,317 +1,317 @@
1
- <template>
2
- <div>
3
- <div v-if="!listArr.length" :style="noDataStyle">请选择商品</div>
4
- <div v-else>
5
- <div
6
- :class="['cube-container', `arrange-${props.arrange}`, { isLc: isLc }]"
7
- :style="{
8
- marginTop: `${props.marginTop}px`,
9
- marginBottom: `${props.marginBottom}px`,
10
- gap: `${props.margin}px`,
11
- }"
12
- >
13
- <div v-for="(item, index) in listArr" class="cube-item" :key="item.skuCode" @click="goGoodsDetail(item)">
14
- <div class="imgWrapper">
15
- <div
16
- v-if="isLc === false && (item.goodsSupplynum <= 0 || item.goodsProperty5 === '1')"
17
- class="imgMarked"
18
- :style="{
19
- borderRadius: `${props.borderRadius}px`,
20
- }"
21
- >
22
- <div class="maskState">
23
- {{ getMaskState(item.goodsProperty5) }}
24
- </div>
25
- </div>
26
- <img
27
- class="goodsImg"
28
- :src="item.dataPic ? (item.dataPic.indexOf('http') === -1 ? domainNameUrl + item.dataPic : item.dataPic) : ''"
29
- alt=""
30
- :style="{
31
- borderRadius: `${props.borderRadius}px`,
32
- }"
33
- />
34
- </div>
35
-
36
- <div class="goodsDescription">
37
- <div v-if="isLc === true && props.arrange === 2" class="specialGoodsName">{{ item.goodsName }}</div>
38
- <div v-else class="goodsName">{{ item.goodsName }}</div>
39
- <section class="footerContent">
40
- <div class="goodsPrice">
41
- ¥{{ item.pricesetNprice }}
42
- <div class="scribing" v-if="props.markedPrice === 1">¥{{ item.pricesetMakeprice }}</div>
43
- </div>
44
- <div class="goodsBuy">立即购买</div>
45
- </section>
46
- </div>
47
- </div>
48
- </div>
49
- </div>
50
- </div>
51
- </template>
52
-
53
- <script>
54
- import { fetchGoodImpl, isLc, getUrl } from "../../utils/index.js";
55
- import { get } from "lodash-es";
56
- export default {
57
- name: "cyy-goods",
58
- props: {
59
- props: {
60
- goods: Array,
61
- SelectGoods: Object,
62
- arrange: Number,
63
- borderRadius: Number,
64
- margin: Number,
65
- markedPrice: Number,
66
- marginTop: Number,
67
- marginBottom: Number,
68
- },
69
- },
70
- data() {
71
- return {
72
- listArr: [],
73
- noDataStyle: {
74
- width: "100%",
75
- height: "180px",
76
- lineHeight: "180px",
77
- fontSize: "30px",
78
- backgroundColor: "#ccc",
79
- color: "#aaa",
80
- textAlign: "center",
81
- },
82
- domainNameUrl: "",
83
- isLc: isLc,
84
- };
85
- },
86
- mounted() {
87
- this.init();
88
- },
89
- methods: {
90
- async init() {
91
- this.domainNameUrl = getUrl(this);
92
- const { goods = [] } = this.props;
93
- const goodsCode = goods.toString();
94
- const paramObj = { goodsCode };
95
- const res = await fetchGoodImpl(this, paramObj);
96
- this.listArr = get(res, "list", []);
97
- console.log("🐽🐽🐽🐽🐽🐽🐽🐽w", this.listArr);
98
- },
99
-
100
- goGoodsDetail(item) {
101
- if (isLc) {
102
- return;
103
- }
104
- const { skuCode } = item;
105
- let params = {
106
- skuNo: skuCode,
107
- };
108
- this.$routers.push("detail", params);
109
- },
110
-
111
- getMaskState(state) {
112
- if (state === "1") {
113
- return "预售中";
114
- } else {
115
- return "补货中";
116
- }
117
- },
118
- },
119
- };
120
- </script>
121
-
122
- <style lang="less" scoped>
123
- .cube-container {
124
- display: grid;
125
- &.arrange-1 {
126
- grid-template-columns: repeat(1, 1fr);
127
- .cube-item {
128
- .goodsImg {
129
- width: 100%;
130
- height: 100%;
131
- aspect-ratio: 1;
132
- margin-left: auto;
133
- margin-right: auto;
134
- }
135
- .goodsDescription {
136
- .goodsName {
137
- font-size: 20px;
138
- }
139
- .footerContent {
140
- .goodsPrice {
141
- font-size: 18px;
142
- .scribing {
143
- font-size: 14px;
144
- }
145
- }
146
- }
147
- }
148
- }
149
- }
150
- &.arrange-2 {
151
- grid-template-columns: repeat(2, 1fr);
152
- .cube-item {
153
- margin: 0 5px;
154
- .goodsImg {
155
- width: 100%;
156
- height: 100%;
157
- aspect-ratio: 1;
158
- }
159
- .goodsDescription {
160
- position: relative;
161
- .goodsName {
162
- font-size: 16px;
163
- height: 42px;
164
- width: 41vw;
165
- }
166
- .specialGoodsName {
167
- font-size: 12px;
168
- height: 42px;
169
- }
170
- .footerContent {
171
- .goodsPrice {
172
- font-size: 14px;
173
- .scribing {
174
- font-size: 12px;
175
- }
176
- }
177
- }
178
- }
179
- }
180
- }
181
- &.arrange-3 {
182
- display: flex;
183
- overflow-x: scroll;
184
- .cube-item {
185
- flex: 0 0 auto;
186
- width: 100%;
187
- max-width: 100%;
188
- .goodsImg {
189
- width: 100%;
190
- height: 100%;
191
- aspect-ratio: 1;
192
- }
193
- .goodsDescription {
194
- .goodsPrice {
195
- font-size: 18px;
196
- .scribing {
197
- font-size: 14px;
198
- }
199
- }
200
- .goodsName {
201
- font-size: 20px;
202
- }
203
- }
204
- }
205
- .cube-item:not(:last-child) {
206
- margin-right: 10px;
207
- }
208
- }
209
- &.arrange-4 {
210
- .cube-item {
211
- display: flex;
212
- justify-content: space-around;
213
- height: 100px;
214
-
215
- .imgWrapper {
216
- .goodsImg {
217
- width: 100px;
218
- height: 100px;
219
- }
220
- }
221
-
222
- .goodsDescription {
223
- position: relative;
224
- width: 100%;
225
- margin-left: 20px;
226
- .goodsName {
227
- height: auto;
228
- font-size: 16px;
229
- }
230
- .footerContent {
231
- .goodsPrice {
232
- font-size: 16px;
233
- .scribing {
234
- font-size: 12px;
235
- }
236
- }
237
- }
238
- .goodsBuyWrapper {
239
- position: relative;
240
- .goodsBuy {
241
- position: absolute;
242
- top: 0;
243
- right: 0;
244
- border-radius: 5px;
245
- background-color: red;
246
- color: white;
247
- align-self: flex-end;
248
- font-size: 12px;
249
- }
250
- }
251
- }
252
- }
253
- }
254
-
255
- .cube-item {
256
- .imgWrapper {
257
- position: relative;
258
- text-align: center;
259
- }
260
- .imgMarked {
261
- position: absolute;
262
- top: 0;
263
- left: 0;
264
- width: 100%;
265
- height: 100%;
266
- background-color: rgba(0, 0, 0, 0.5);
267
- display: flex;
268
- justify-content: center;
269
- align-items: center;
270
- z-index: 100;
271
- .maskState {
272
- font-size: 23px;
273
- color: white;
274
- }
275
- }
276
- .goodsDescription {
277
- display: flex;
278
- flex-direction: column;
279
- justify-content: space-between;
280
- .goodsName {
281
- display: -webkit-box;
282
- -webkit-line-clamp: 2;
283
- -webkit-box-orient: vertical;
284
- overflow: hidden;
285
- text-overflow: ellipsis;
286
- }
287
- .footerContent {
288
- display: flex;
289
- justify-content: space-between;
290
- align-items: flex-end;
291
- .goodsPrice {
292
- color: #f53a50;
293
- font-weight: 600;
294
- .scribing {
295
- display: inline-block;
296
- color: #ccc;
297
- text-decoration: line-through;
298
- font-weight: normal;
299
- }
300
- }
301
- }
302
-
303
- .goodsBuy {
304
- text-align: center;
305
- border-radius: 5px;
306
- background-color: red;
307
- color: white;
308
- align-self: flex-end;
309
- font-size: 12px;
310
- line-height: 22px;
311
- width: 5em;
312
- text-align: center;
313
- }
314
- }
315
- }
316
- }
317
- </style>
1
+ <template>
2
+ <div>
3
+ <div v-if="!listArr.length" :style="noDataStyle">请选择商品</div>
4
+ <div v-else>
5
+ <div
6
+ :class="['cube-container', `arrange-${props.arrange}`, { isLc: isLc }]"
7
+ :style="{
8
+ marginTop: `${props.marginTop}px`,
9
+ marginBottom: `${props.marginBottom}px`,
10
+ gap: `${props.margin}px`,
11
+ }"
12
+ >
13
+ <div v-for="(item, index) in listArr" class="cube-item" :key="item.skuCode" @click="goGoodsDetail(item)">
14
+ <div class="imgWrapper">
15
+ <div
16
+ v-if="isLc === false && (item.goodsSupplynum <= 0 || item.goodsProperty5 === '1')"
17
+ class="imgMarked"
18
+ :style="{
19
+ borderRadius: `${props.borderRadius}px`,
20
+ }"
21
+ >
22
+ <div class="maskState">
23
+ {{ getMaskState(item.goodsProperty5) }}
24
+ </div>
25
+ </div>
26
+ <img
27
+ class="goodsImg"
28
+ :src="item.dataPic ? (item.dataPic.indexOf('http') === -1 ? domainNameUrl + item.dataPic : item.dataPic) : ''"
29
+ alt=""
30
+ :style="{
31
+ borderRadius: `${props.borderRadius}px`,
32
+ }"
33
+ />
34
+ </div>
35
+
36
+ <div class="goodsDescription">
37
+ <div v-if="isLc === true && props.arrange === 2" class="specialGoodsName">{{ item.goodsName }}</div>
38
+ <div v-else class="goodsName">{{ item.goodsName }}</div>
39
+ <section class="footerContent">
40
+ <div class="goodsPrice">
41
+ ¥{{ item.pricesetNprice }}
42
+ <div class="scribing" v-if="props.markedPrice === 1">¥{{ item.pricesetMakeprice }}</div>
43
+ </div>
44
+ <div class="goodsBuy">立即购买</div>
45
+ </section>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ </template>
52
+
53
+ <script>
54
+ import { fetchGoodImpl, isLc, getUrl } from "../../utils/index.js";
55
+ import { get } from "lodash-es";
56
+ export default {
57
+ name: "cyy-goods",
58
+ props: {
59
+ props: {
60
+ goods: Array,
61
+ SelectGoods: Object,
62
+ arrange: Number,
63
+ borderRadius: Number,
64
+ margin: Number,
65
+ markedPrice: Number,
66
+ marginTop: Number,
67
+ marginBottom: Number,
68
+ },
69
+ },
70
+ data() {
71
+ return {
72
+ listArr: [],
73
+ noDataStyle: {
74
+ width: "100%",
75
+ height: "180px",
76
+ lineHeight: "180px",
77
+ fontSize: "30px",
78
+ backgroundColor: "#ccc",
79
+ color: "#aaa",
80
+ textAlign: "center",
81
+ },
82
+ domainNameUrl: "",
83
+ isLc: isLc,
84
+ };
85
+ },
86
+ mounted() {
87
+ this.init();
88
+ },
89
+ methods: {
90
+ async init() {
91
+ this.domainNameUrl = getUrl(this);
92
+ const { goods = [] } = this.props;
93
+ const goodsCode = goods.toString();
94
+ const paramObj = { goodsCode };
95
+ const res = await fetchGoodImpl(this, paramObj);
96
+ this.listArr = get(res, "list", []);
97
+ console.log("🐽🐽🐽🐽🐽🐽🐽🐽w", this.listArr);
98
+ },
99
+
100
+ goGoodsDetail(item) {
101
+ if (isLc) {
102
+ return;
103
+ }
104
+ const { skuCode } = item;
105
+ let params = {
106
+ skuNo: skuCode,
107
+ };
108
+ this.$routers.push("detail", params);
109
+ },
110
+
111
+ getMaskState(state) {
112
+ if (state === "1") {
113
+ return "预售中";
114
+ } else {
115
+ return "补货中";
116
+ }
117
+ },
118
+ },
119
+ };
120
+ </script>
121
+
122
+ <style lang="less" scoped>
123
+ .cube-container {
124
+ display: grid;
125
+ &.arrange-1 {
126
+ grid-template-columns: repeat(1, 1fr);
127
+ .cube-item {
128
+ .goodsImg {
129
+ width: 100%;
130
+ height: 100%;
131
+ aspect-ratio: 1;
132
+ margin-left: auto;
133
+ margin-right: auto;
134
+ }
135
+ .goodsDescription {
136
+ .goodsName {
137
+ font-size: 20px;
138
+ }
139
+ .footerContent {
140
+ .goodsPrice {
141
+ font-size: 18px;
142
+ .scribing {
143
+ font-size: 14px;
144
+ }
145
+ }
146
+ }
147
+ }
148
+ }
149
+ }
150
+ &.arrange-2 {
151
+ grid-template-columns: repeat(2, 1fr);
152
+ .cube-item {
153
+ margin: 0 5px;
154
+ .goodsImg {
155
+ width: 100%;
156
+ height: 100%;
157
+ aspect-ratio: 1;
158
+ }
159
+ .goodsDescription {
160
+ position: relative;
161
+ .goodsName {
162
+ font-size: 16px;
163
+ height: 42px;
164
+ width: 41vw;
165
+ }
166
+ .specialGoodsName {
167
+ font-size: 12px;
168
+ height: 42px;
169
+ }
170
+ .footerContent {
171
+ .goodsPrice {
172
+ font-size: 14px;
173
+ .scribing {
174
+ font-size: 12px;
175
+ }
176
+ }
177
+ }
178
+ }
179
+ }
180
+ }
181
+ &.arrange-3 {
182
+ display: flex;
183
+ overflow-x: scroll;
184
+ .cube-item {
185
+ flex: 0 0 auto;
186
+ width: 100%;
187
+ max-width: 100%;
188
+ .goodsImg {
189
+ width: 100%;
190
+ height: 100%;
191
+ aspect-ratio: 1;
192
+ }
193
+ .goodsDescription {
194
+ .goodsPrice {
195
+ font-size: 18px;
196
+ .scribing {
197
+ font-size: 14px;
198
+ }
199
+ }
200
+ .goodsName {
201
+ font-size: 20px;
202
+ }
203
+ }
204
+ }
205
+ .cube-item:not(:last-child) {
206
+ margin-right: 10px;
207
+ }
208
+ }
209
+ &.arrange-4 {
210
+ .cube-item {
211
+ display: flex;
212
+ justify-content: space-around;
213
+ height: 100px;
214
+
215
+ .imgWrapper {
216
+ .goodsImg {
217
+ width: 100px;
218
+ height: 100px;
219
+ }
220
+ }
221
+
222
+ .goodsDescription {
223
+ position: relative;
224
+ width: 100%;
225
+ margin-left: 20px;
226
+ .goodsName {
227
+ height: auto;
228
+ font-size: 16px;
229
+ }
230
+ .footerContent {
231
+ .goodsPrice {
232
+ font-size: 16px;
233
+ .scribing {
234
+ font-size: 12px;
235
+ }
236
+ }
237
+ }
238
+ .goodsBuyWrapper {
239
+ position: relative;
240
+ .goodsBuy {
241
+ position: absolute;
242
+ top: 0;
243
+ right: 0;
244
+ border-radius: 5px;
245
+ background-color: red;
246
+ color: white;
247
+ align-self: flex-end;
248
+ font-size: 12px;
249
+ }
250
+ }
251
+ }
252
+ }
253
+ }
254
+
255
+ .cube-item {
256
+ .imgWrapper {
257
+ position: relative;
258
+ text-align: center;
259
+ }
260
+ .imgMarked {
261
+ position: absolute;
262
+ top: 0;
263
+ left: 0;
264
+ width: 100%;
265
+ height: 100%;
266
+ background-color: rgba(0, 0, 0, 0.5);
267
+ display: flex;
268
+ justify-content: center;
269
+ align-items: center;
270
+ z-index: 100;
271
+ .maskState {
272
+ font-size: 23px;
273
+ color: white;
274
+ }
275
+ }
276
+ .goodsDescription {
277
+ display: flex;
278
+ flex-direction: column;
279
+ justify-content: space-between;
280
+ .goodsName {
281
+ display: -webkit-box;
282
+ -webkit-line-clamp: 2;
283
+ -webkit-box-orient: vertical;
284
+ overflow: hidden;
285
+ text-overflow: ellipsis;
286
+ }
287
+ .footerContent {
288
+ display: flex;
289
+ justify-content: space-between;
290
+ align-items: flex-end;
291
+ .goodsPrice {
292
+ color: #f53a50;
293
+ font-weight: 600;
294
+ .scribing {
295
+ display: inline-block;
296
+ color: #ccc;
297
+ text-decoration: line-through;
298
+ font-weight: normal;
299
+ }
300
+ }
301
+ }
302
+
303
+ .goodsBuy {
304
+ text-align: center;
305
+ border-radius: 5px;
306
+ background-color: red;
307
+ color: white;
308
+ align-self: flex-end;
309
+ font-size: 12px;
310
+ line-height: 22px;
311
+ width: 5em;
312
+ text-align: center;
313
+ }
314
+ }
315
+ }
316
+ }
317
+ </style>