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,328 +1,328 @@
1
- <template>
2
- <div>
3
- <div v-if="lowCode">
4
- <div class="title-l" slot="left" :style="{ 'background-color': color }">
5
- <div class="title-t">{{ props.siteName || "人才优选 品质优选" }}</div>
6
- </div>
7
- <div class="Box" :style="{ 'background-color': color }">
8
- <div class="boxBgL">
9
- <div class="one" :style="{ 'background-color': color }"></div>
10
- <div class="two" :style="{ 'background-color': color }"></div>
11
- </div>
12
- <!-- 搜索栏 -->
13
- <div class="search" style="display: flex; justify-content: center; position: relative; z-index: 1">
14
- <div class="search--input" style="padding: 2px 112px; border: 1px solid white; border-radius: 20px">
15
- <div class="search--input--box" style="color: #fff">
16
- <span>搜索您喜欢的商品</span>
17
- <img
18
- src="https://static-rs.s3.cn-east-2.jdcloud-oss.com/decorate/search.png"
19
- style="width: 20px; height: 20px; margin-top: 7px; margin-right: 10px; position: absolute; top: -4px; right: 18px"
20
- />
21
- </div>
22
- </div>
23
- </div>
24
- <!-- 标签 -->
25
- <div class="tag" style="justify-content: center">
26
- <div class="tag--item">
27
- <div class="" style="color: #fff; font-size: 24rpx; position: relative; z-index: 1">
28
- <img v-if="props.iconImg" :lazy-load="true" :src="props.iconImg" mode="" style="width: 16px; height: 16px; margin-right: 8rpx" />
29
- <img v-else :lazy-load="true" :src="props.iconImg" mode="" style="width: 16px; height: 16px; margin-right: 8rpx" />{{ props.mallSlogan }}
30
- </div>
31
- </div>
32
- </div>
33
- </div>
34
- <div class="lowCode-warp" :style="{ marginTop: props.marginTop + 'px', marginBottom: props.marginBottom + 'px' }">
35
- <img :src="resultArrImg(resultArr)" alt="" style="width: 100%" />
36
- <ul>
37
- <li v-for="(item, index) in resultArr" :key="index"></li>
38
- </ul>
39
- </div>
40
- <!-- <div class="coupon" v-if="props.coupon === 0">
41
- <img :src="props.couponImg" mode="" />
42
- </div> -->
43
- </div>
44
- <template v-else>
45
- <div class="Box">
46
- <div class="boxBg">
47
- <div class="one" :style="{ 'background-color': color }"></div>
48
- <div class="two" :style="{ 'background-color': color }"></div>
49
- </div>
50
- <!-- 搜索栏 -->
51
- <div class="search">
52
- <div class="search--input" @click="ToSearch">
53
- <div class="search--input--box">搜索您喜欢的商品</div>
54
- <div class="search--input--icon" :style="{ 'background-color': color }"><text class="iconfont icon-sousuo"></text></div>
55
- </div>
56
- </div>
57
- <!-- 标签 -->
58
- <div class="tag">
59
- <div class="tag--item">
60
- <div class="header-box" style="width: 32rpx; height: 32rpx; margin-right: 8rpx">
61
- <img :lazy-load="true" :src="props.iconImg" mode="" style="width: 100%; height: 100%" />
62
- </div>
63
- <div class="" style="color: #fff; font-size: 24rpx">{{ props.mallSlogan }}</div>
64
- </div>
65
- </div>
66
- <canvas id="canvasID" canvas-id="mycanvas" style="position: fixed; left: -500px"></canvas>
67
- </div>
68
-
69
- <div class="swiperBox" :style="{ marginTop: props.marginTop + 'px', marginBottom: props.marginBottom + 'px' }">
70
- <div class="swiper">
71
- <swiper
72
- interval="4000"
73
- class="swiper-content"
74
- circular="true"
75
- :vertical="directionResult"
76
- :autoplay="autoplayResult"
77
- :duration="props.autoplayInterval"
78
- @change="setimg"
79
- >
80
- <block v-for="(item, index) in resultArr" :key="index">
81
- <swiper-item class="img-item">
82
- <img :style="{ bordeRadius: classifyPhotoCorner(props.photoCorner) + 'px' }" :lazy-load="true" :src="item['imgUrl']" @click="linkClick(item)" />
83
- </swiper-item>
84
- </block>
85
- </swiper>
86
- </div>
87
- </div>
88
- </template>
89
- </div>
90
- </template>
91
-
92
- <script>
93
- import { isLc } from "../../utils/index.js";
94
- import { isEmpty, isUndefined } from "lodash-es";
95
- export default {
96
- name: "cyy-ArsenalTop",
97
- data() {
98
- return {
99
- lowCode: isLc,
100
- color: "#FD1738",
101
- };
102
- },
103
- props: {
104
- props: {
105
- autoPlay: Number, //自动播放
106
- autoplayInterval: Number, //轮播间隔
107
- direction: Number, //方向
108
- siteName: String, //站点名称
109
- mallSlogan: String, //商城标语
110
- iconImg: String, //ICON
111
- couponImg: String, //优惠券图片
112
- coupon: Number, //优惠券
113
- marginTop: Number, //上边距
114
- marginBottom: Number, //下边距
115
- selectImg: Array, //添加图片
116
- },
117
- },
118
- mounted() {
119
- this.changeColor();
120
- },
121
- computed: {
122
- resultArrImg() {
123
- return (arr) => {
124
- return arr[0]?.imgUrl || "https://static-rs.s3.cn-east-2.jdcloud-oss.com/decorate/66341675912421_.pic.jpg";
125
- };
126
- },
127
- autoplayResult() {
128
- if (this.props.autoPlay === 0) {
129
- return true;
130
- }
131
- return false;
132
- },
133
- directionResult() {
134
- if (this.props.direction === 0) {
135
- return false;
136
- }
137
- return true;
138
- },
139
- resultArr() {
140
- const { selectImg, defaultValue } = this.props;
141
- const computedArr = selectImg.filter((item) => !isUndefined(item)).filter((item) => !Object.values(item).every((citem) => isUndefined(citem)));
142
- let arr = defaultValue;
143
- if (!isEmpty(computedArr)) {
144
- arr = computedArr;
145
- }
146
- console.log(52, arr);
147
- return arr;
148
- },
149
- },
150
- methods: {
151
- changeColor() {
152
- if (this.props.selectImg.length) {
153
- this.color = this.props.selectImg[0]?.color || "#FD1738";
154
- }
155
- },
156
- classifyPhotoCorner(item) {
157
- if (item === 20) {
158
- return 10;
159
- }
160
- if (item === 50) {
161
- return 20;
162
- }
163
- return item;
164
- },
165
- setimg(e) {
166
- const index = e.detail.current;
167
- this.color = this.props.selectImg[index]?.color || "#FD1738";
168
- this.$emit("setimg", this.color);
169
- },
170
- ToSearch() {
171
- this.$emit("ToSearch");
172
- },
173
- linkClick(item) {
174
- this.$emit("linkClick", item);
175
- },
176
- },
177
- };
178
- </script>
179
- <style lang="less" scoped>
180
- .holder {
181
- width: 100%;
182
- padding: 10px 0;
183
- height: 60px;
184
- background-color: rgb(888, 431, 73);
185
- }
186
- .swiperBox {
187
- width: 100%;
188
- height: 150px;
189
- border-radius: 10px;
190
-
191
- .swiper {
192
- width: 100%;
193
- height: 150px;
194
-
195
- .swiper-content {
196
- height: 150px;
197
- width: 100%;
198
-
199
- .img-item {
200
- padding: 0 12.5px;
201
- box-sizing: border-box;
202
- }
203
- }
204
-
205
- img {
206
- width: 100%;
207
- height: 100%;
208
- border-radius: 10px;
209
- }
210
- }
211
- }
212
- .Box {
213
- width: 100%;
214
- position: relative;
215
- }
216
-
217
- .boxBg {
218
- width: 100%;
219
- height: 201px;
220
- position: absolute;
221
- top: 0;
222
- left: 0;
223
- z-index: -1;
224
-
225
- .one {
226
- width: 100%;
227
- height: 150px;
228
- }
229
-
230
- .two {
231
- width: 100%;
232
- height: 102px;
233
- border-radius: 50%;
234
- position: relative;
235
- top: -51px;
236
- }
237
- }
238
- .boxBgL {
239
- width: 100%;
240
- height: 201px;
241
- position: absolute;
242
- top: 0;
243
- left: 0;
244
-
245
- .one {
246
- width: 100%;
247
- height: 150px;
248
- }
249
-
250
- .two {
251
- width: 100%;
252
- height: 102px;
253
- border-radius: 50%;
254
- position: relative;
255
- top: -51px;
256
- }
257
- }
258
-
259
- .search {
260
- &--input {
261
- margin: 0 auto;
262
- width: 90%;
263
- height: 32px;
264
- background: rgba(255, 255, 255, 0.3);
265
- box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.1);
266
- border-radius: 17.5px;
267
- text-align: center;
268
- position: relative;
269
-
270
- &--box {
271
- font-size: 12px;
272
- color: #fff;
273
- line-height: 32px;
274
- }
275
-
276
- &--icon {
277
- position: absolute;
278
- top: 5px;
279
- right: 5px;
280
- width: 27.5px;
281
- height: 22px;
282
- border-radius: 17.5px;
283
- display: flex;
284
- align-items: center;
285
- justify-content: center;
286
-
287
- .icon-sousuo {
288
- color: #fff;
289
- }
290
- }
291
- }
292
- }
293
-
294
- .tag {
295
- display: flex;
296
- padding: 7px 0;
297
-
298
- &--item {
299
- flex: 1;
300
- display: flex;
301
- justify-content: center;
302
- align-items: center;
303
- }
304
- }
305
- .title-l {
306
- height: 40px;
307
- .title-t {
308
- color: #fff;
309
- font-size: 18px;
310
- padding-left: 22px;
311
- }
312
- }
313
- .lowCode-warp {
314
- padding: 0 20px;
315
- }
316
- .coupon {
317
- width: 60px;
318
- height: 60px;
319
- position: fixed;
320
- right: 450px;
321
- z-index: 101;
322
-
323
- img {
324
- width: 55px;
325
- height: 55px;
326
- }
327
- }
328
- </style>
1
+ <template>
2
+ <div>
3
+ <div v-if="lowCode">
4
+ <div class="title-l" slot="left" :style="{ 'background-color': color }">
5
+ <div class="title-t">{{ props.siteName || "人才优选 品质优选" }}</div>
6
+ </div>
7
+ <div class="Box" :style="{ 'background-color': color }">
8
+ <div class="boxBgL">
9
+ <div class="one" :style="{ 'background-color': color }"></div>
10
+ <div class="two" :style="{ 'background-color': color }"></div>
11
+ </div>
12
+ <!-- 搜索栏 -->
13
+ <div class="search" style="display: flex; justify-content: center; position: relative; z-index: 1">
14
+ <div class="search--input" style="padding: 2px 112px; border: 1px solid white; border-radius: 20px">
15
+ <div class="search--input--box" style="color: #fff">
16
+ <span>搜索您喜欢的商品</span>
17
+ <img
18
+ src="https://static-rs.s3.cn-east-2.jdcloud-oss.com/decorate/search.png"
19
+ style="width: 20px; height: 20px; margin-top: 7px; margin-right: 10px; position: absolute; top: -4px; right: 18px"
20
+ />
21
+ </div>
22
+ </div>
23
+ </div>
24
+ <!-- 标签 -->
25
+ <div class="tag" style="justify-content: center">
26
+ <div class="tag--item">
27
+ <div class="" style="color: #fff; font-size: 24rpx; position: relative; z-index: 1">
28
+ <img v-if="props.iconImg" :lazy-load="true" :src="props.iconImg" mode="" style="width: 16px; height: 16px; margin-right: 8rpx" />
29
+ <img v-else :lazy-load="true" :src="props.iconImg" mode="" style="width: 16px; height: 16px; margin-right: 8rpx" />{{ props.mallSlogan }}
30
+ </div>
31
+ </div>
32
+ </div>
33
+ </div>
34
+ <div class="lowCode-warp" :style="{ marginTop: props.marginTop + 'px', marginBottom: props.marginBottom + 'px' }">
35
+ <img :src="resultArrImg(resultArr)" alt="" style="width: 100%" />
36
+ <ul>
37
+ <li v-for="(item, index) in resultArr" :key="index"></li>
38
+ </ul>
39
+ </div>
40
+ <!-- <div class="coupon" v-if="props.coupon === 0">
41
+ <img :src="props.couponImg" mode="" />
42
+ </div> -->
43
+ </div>
44
+ <template v-else>
45
+ <div class="Box">
46
+ <div class="boxBg">
47
+ <div class="one" :style="{ 'background-color': color }"></div>
48
+ <div class="two" :style="{ 'background-color': color }"></div>
49
+ </div>
50
+ <!-- 搜索栏 -->
51
+ <div class="search">
52
+ <div class="search--input" @click="ToSearch">
53
+ <div class="search--input--box">搜索您喜欢的商品</div>
54
+ <div class="search--input--icon" :style="{ 'background-color': color }"><text class="iconfont icon-sousuo"></text></div>
55
+ </div>
56
+ </div>
57
+ <!-- 标签 -->
58
+ <div class="tag">
59
+ <div class="tag--item">
60
+ <div class="header-box" style="width: 32rpx; height: 32rpx; margin-right: 8rpx">
61
+ <img :lazy-load="true" :src="props.iconImg" mode="" style="width: 100%; height: 100%" />
62
+ </div>
63
+ <div class="" style="color: #fff; font-size: 24rpx">{{ props.mallSlogan }}</div>
64
+ </div>
65
+ </div>
66
+ <canvas id="canvasID" canvas-id="mycanvas" style="position: fixed; left: -500px"></canvas>
67
+ </div>
68
+
69
+ <div class="swiperBox" :style="{ marginTop: props.marginTop + 'px', marginBottom: props.marginBottom + 'px' }">
70
+ <div class="swiper">
71
+ <swiper
72
+ interval="4000"
73
+ class="swiper-content"
74
+ circular="true"
75
+ :vertical="directionResult"
76
+ :autoplay="autoplayResult"
77
+ :duration="props.autoplayInterval"
78
+ @change="setimg"
79
+ >
80
+ <block v-for="(item, index) in resultArr" :key="index">
81
+ <swiper-item class="img-item">
82
+ <img :style="{ bordeRadius: classifyPhotoCorner(props.photoCorner) + 'px' }" :lazy-load="true" :src="item['imgUrl']" @click="linkClick(item)" />
83
+ </swiper-item>
84
+ </block>
85
+ </swiper>
86
+ </div>
87
+ </div>
88
+ </template>
89
+ </div>
90
+ </template>
91
+
92
+ <script>
93
+ import { isLc } from "../../utils/index.js";
94
+ import { isEmpty, isUndefined } from "lodash-es";
95
+ export default {
96
+ name: "cyy-ArsenalTop",
97
+ data() {
98
+ return {
99
+ lowCode: isLc,
100
+ color: "#FD1738",
101
+ };
102
+ },
103
+ props: {
104
+ props: {
105
+ autoPlay: Number, //自动播放
106
+ autoplayInterval: Number, //轮播间隔
107
+ direction: Number, //方向
108
+ siteName: String, //站点名称
109
+ mallSlogan: String, //商城标语
110
+ iconImg: String, //ICON
111
+ couponImg: String, //优惠券图片
112
+ coupon: Number, //优惠券
113
+ marginTop: Number, //上边距
114
+ marginBottom: Number, //下边距
115
+ selectImg: Array, //添加图片
116
+ },
117
+ },
118
+ mounted() {
119
+ this.changeColor();
120
+ },
121
+ computed: {
122
+ resultArrImg() {
123
+ return (arr) => {
124
+ return arr[0]?.imgUrl || "https://static-rs.s3.cn-east-2.jdcloud-oss.com/decorate/66341675912421_.pic.jpg";
125
+ };
126
+ },
127
+ autoplayResult() {
128
+ if (this.props.autoPlay === 0) {
129
+ return true;
130
+ }
131
+ return false;
132
+ },
133
+ directionResult() {
134
+ if (this.props.direction === 0) {
135
+ return false;
136
+ }
137
+ return true;
138
+ },
139
+ resultArr() {
140
+ const { selectImg, defaultValue } = this.props;
141
+ const computedArr = selectImg.filter((item) => !isUndefined(item)).filter((item) => !Object.values(item).every((citem) => isUndefined(citem)));
142
+ let arr = defaultValue;
143
+ if (!isEmpty(computedArr)) {
144
+ arr = computedArr;
145
+ }
146
+ console.log(52, arr);
147
+ return arr;
148
+ },
149
+ },
150
+ methods: {
151
+ changeColor() {
152
+ if (this.props.selectImg.length) {
153
+ this.color = this.props.selectImg[0]?.color || "#FD1738";
154
+ }
155
+ },
156
+ classifyPhotoCorner(item) {
157
+ if (item === 20) {
158
+ return 10;
159
+ }
160
+ if (item === 50) {
161
+ return 20;
162
+ }
163
+ return item;
164
+ },
165
+ setimg(e) {
166
+ const index = e.detail.current;
167
+ this.color = this.props.selectImg[index]?.color || "#FD1738";
168
+ this.$emit("setimg", this.color);
169
+ },
170
+ ToSearch() {
171
+ this.$emit("ToSearch");
172
+ },
173
+ linkClick(item) {
174
+ this.$emit("linkClick", item);
175
+ },
176
+ },
177
+ };
178
+ </script>
179
+ <style lang="less" scoped>
180
+ .holder {
181
+ width: 100%;
182
+ padding: 10px 0;
183
+ height: 60px;
184
+ background-color: rgb(888, 431, 73);
185
+ }
186
+ .swiperBox {
187
+ width: 100%;
188
+ height: 150px;
189
+ border-radius: 10px;
190
+
191
+ .swiper {
192
+ width: 100%;
193
+ height: 150px;
194
+
195
+ .swiper-content {
196
+ height: 150px;
197
+ width: 100%;
198
+
199
+ .img-item {
200
+ padding: 0 12.5px;
201
+ box-sizing: border-box;
202
+ }
203
+ }
204
+
205
+ img {
206
+ width: 100%;
207
+ height: 100%;
208
+ border-radius: 10px;
209
+ }
210
+ }
211
+ }
212
+ .Box {
213
+ width: 100%;
214
+ position: relative;
215
+ }
216
+
217
+ .boxBg {
218
+ width: 100%;
219
+ height: 201px;
220
+ position: absolute;
221
+ top: 0;
222
+ left: 0;
223
+ z-index: -1;
224
+
225
+ .one {
226
+ width: 100%;
227
+ height: 150px;
228
+ }
229
+
230
+ .two {
231
+ width: 100%;
232
+ height: 102px;
233
+ border-radius: 50%;
234
+ position: relative;
235
+ top: -51px;
236
+ }
237
+ }
238
+ .boxBgL {
239
+ width: 100%;
240
+ height: 201px;
241
+ position: absolute;
242
+ top: 0;
243
+ left: 0;
244
+
245
+ .one {
246
+ width: 100%;
247
+ height: 150px;
248
+ }
249
+
250
+ .two {
251
+ width: 100%;
252
+ height: 102px;
253
+ border-radius: 50%;
254
+ position: relative;
255
+ top: -51px;
256
+ }
257
+ }
258
+
259
+ .search {
260
+ &--input {
261
+ margin: 0 auto;
262
+ width: 90%;
263
+ height: 32px;
264
+ background: rgba(255, 255, 255, 0.3);
265
+ box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.1);
266
+ border-radius: 17.5px;
267
+ text-align: center;
268
+ position: relative;
269
+
270
+ &--box {
271
+ font-size: 12px;
272
+ color: #fff;
273
+ line-height: 32px;
274
+ }
275
+
276
+ &--icon {
277
+ position: absolute;
278
+ top: 5px;
279
+ right: 5px;
280
+ width: 27.5px;
281
+ height: 22px;
282
+ border-radius: 17.5px;
283
+ display: flex;
284
+ align-items: center;
285
+ justify-content: center;
286
+
287
+ .icon-sousuo {
288
+ color: #fff;
289
+ }
290
+ }
291
+ }
292
+ }
293
+
294
+ .tag {
295
+ display: flex;
296
+ padding: 7px 0;
297
+
298
+ &--item {
299
+ flex: 1;
300
+ display: flex;
301
+ justify-content: center;
302
+ align-items: center;
303
+ }
304
+ }
305
+ .title-l {
306
+ height: 40px;
307
+ .title-t {
308
+ color: #fff;
309
+ font-size: 18px;
310
+ padding-left: 22px;
311
+ }
312
+ }
313
+ .lowCode-warp {
314
+ padding: 0 20px;
315
+ }
316
+ .coupon {
317
+ width: 60px;
318
+ height: 60px;
319
+ position: fixed;
320
+ right: 450px;
321
+ z-index: 101;
322
+
323
+ img {
324
+ width: 55px;
325
+ height: 55px;
326
+ }
327
+ }
328
+ </style>