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,38 +1,38 @@
1
- <template>
2
- <div :style="[computedStyle]">{{ props.value }}</div>
3
- </template>
4
-
5
- <script>
6
- import { handlePlat } from "../../utils/index.js";
7
- import pick from "lodash-es/pick";
8
- import omit from "lodash-es/omit";
9
- export default {
10
- name: "cyy-title",
11
- props: {
12
- props: {
13
- value: { type: String, default: "请填写主标题或文本" },
14
- fontSize: Number,
15
- textAlign: String,
16
- color: String,
17
- backgroundColor: String,
18
- fontWeight: String,
19
- fontStyle: String,
20
- textDecoration: Boolean,
21
- marginTop: Number,
22
- marginBottom: Number,
23
- },
24
- },
25
- computed: {
26
- computedStyle() {
27
- const variates = ["fontSize", "marginTop", "marginBottom"];
28
- const params = pick(this.props || {}, variates);
29
- const resetProps = omit(this.props || {}, variates);
30
-
31
- return {
32
- ...handlePlat(params),
33
- ...resetProps,
34
- };
35
- },
36
- },
37
- };
38
- </script>
1
+ <template>
2
+ <div :style="[computedStyle]">{{ props.value }}</div>
3
+ </template>
4
+
5
+ <script>
6
+ import { handlePlat } from "../../utils/index.js";
7
+ import pick from "lodash-es/pick";
8
+ import omit from "lodash-es/omit";
9
+ export default {
10
+ name: "cyy-title",
11
+ props: {
12
+ props: {
13
+ value: { type: String, default: "请填写主标题或文本" },
14
+ fontSize: Number,
15
+ textAlign: String,
16
+ color: String,
17
+ backgroundColor: String,
18
+ fontWeight: String,
19
+ fontStyle: String,
20
+ textDecoration: Boolean,
21
+ marginTop: Number,
22
+ marginBottom: Number,
23
+ },
24
+ },
25
+ computed: {
26
+ computedStyle() {
27
+ const variates = ["fontSize", "marginTop", "marginBottom"];
28
+ const params = pick(this.props || {}, variates);
29
+ const resetProps = omit(this.props || {}, variates);
30
+
31
+ return {
32
+ ...handlePlat(params),
33
+ ...resetProps,
34
+ };
35
+ },
36
+ },
37
+ };
38
+ </script>
@@ -1,49 +1,49 @@
1
- <template>
2
- <div>
3
- <video
4
- :style="{
5
- marginTop: `${props.marginTop}px`,
6
- marginBottom: `${props.marginBottom}px`,
7
- }"
8
- controls
9
- :src="props.url"
10
- :poster="props.poster"
11
- :autoplay="props.autoplay"
12
- ></video>
13
- </div>
14
- </template>
15
-
16
- <script>
17
- export default {
18
- props: {
19
- props: {
20
- url: {
21
- type: String,
22
- default: "",
23
- },
24
- poster: {
25
- type: String,
26
- default: "",
27
- },
28
- autoplay: {
29
- type: Boolean,
30
- default: false,
31
- },
32
- marginTop: {
33
- type: Number,
34
- default: 0,
35
- },
36
- marginBottom: {
37
- type: Number,
38
- default: 0,
39
- },
40
- },
41
- },
42
- };
43
- </script>
44
-
45
- <style lang="less" scoped>
46
- video {
47
- width: 100% !important;
48
- }
49
- </style>
1
+ <template>
2
+ <div>
3
+ <video
4
+ :style="{
5
+ marginTop: `${props.marginTop}px`,
6
+ marginBottom: `${props.marginBottom}px`,
7
+ }"
8
+ controls
9
+ :src="props.url"
10
+ :poster="props.poster"
11
+ :autoplay="props.autoplay"
12
+ ></video>
13
+ </div>
14
+ </template>
15
+
16
+ <script>
17
+ export default {
18
+ props: {
19
+ props: {
20
+ url: {
21
+ type: String,
22
+ default: "",
23
+ },
24
+ poster: {
25
+ type: String,
26
+ default: "",
27
+ },
28
+ autoplay: {
29
+ type: Boolean,
30
+ default: false,
31
+ },
32
+ marginTop: {
33
+ type: Number,
34
+ default: 0,
35
+ },
36
+ marginBottom: {
37
+ type: Number,
38
+ default: 0,
39
+ },
40
+ },
41
+ },
42
+ };
43
+ </script>
44
+
45
+ <style lang="less" scoped>
46
+ video {
47
+ width: 100% !important;
48
+ }
49
+ </style>
@@ -1,21 +1,21 @@
1
- export { default as Title } from "./cyy-title/cyy-title.vue";
2
- export { default as Cube } from "./cyy-image/cyy-image.vue";
3
- export { default as Search } from "./cyy-search/cyy-search.vue";
4
- export { default as Goods } from "./cyy-goods/cyy-goods.vue";
5
- export { default as Slider } from "./cyy-slider/cyy-slider.vue";
6
- export { default as GoodsOne } from "./cyy-goodsOne/cyy-goodsOne.vue";
7
- export { default as ArsenalPicture } from "./cyy-ArsenalPicture/cyy-ArsenalPicture.vue";
8
- export { default as ArsenalNavigation } from "./cyy-ArsenalNavigation/cyy-ArsenalNavigation.vue";
9
- export { default as ArsenalCarousel } from "./cyy-ArsenalCarousel/cyy-ArsenalCarousel.vue";
10
- export { default as Collocation } from "./cyy-collocation/cyy-collocation.vue";
11
- export { default as ArsenalTop } from "./cyy-ArsenalTop/cyy-ArsenalTop.vue";
12
- export { default as Live } from "./cyy-live/cyy-live.vue";
13
- export { default as Notice } from "./cyy-notice/cyy-notice.vue";
14
- export { default as ArsenalActivity } from "./cyy-ArsenalActivity/cyy-ArsenalActivity.vue";
15
- export { default as Video } from "./cyy-video/cyy-video.vue";
16
- export { default as ArsenalClass } from "./cyy-ArsenalClass/cyy-ArsenalClass.vue";
17
- export { default as ArsenalMyTop } from "./cyy-ArsenalMyTop/cyy-ArsenalMyTop.vue";
18
- export { default as ArsenalMyNavigation } from "./cyy-ArsenalMyNavigation/cyy-ArsenalMyNavigation";
19
- export { default as ArsenalRecommend } from "./cyy-ArsenalRecommend/cyy-ArsenalRecommend.vue";
20
- export { default as NewProduct } from "./cyy-new-product/cyy-new-product.vue";
21
- export { default as ArsenalPromotion } from "./cyy-ArsenalPromotion/cyy-ArsenalPromotion.vue";
1
+ export { default as Title } from "./cyy-title/cyy-title.vue";
2
+ export { default as Cube } from "./cyy-image/cyy-image.vue";
3
+ export { default as Search } from "./cyy-search/cyy-search.vue";
4
+ export { default as Goods } from "./cyy-goods/cyy-goods.vue";
5
+ export { default as Slider } from "./cyy-slider/cyy-slider.vue";
6
+ export { default as GoodsOne } from "./cyy-goodsOne/cyy-goodsOne.vue";
7
+ export { default as ArsenalPicture } from "./cyy-ArsenalPicture/cyy-ArsenalPicture.vue";
8
+ export { default as ArsenalNavigation } from "./cyy-ArsenalNavigation/cyy-ArsenalNavigation.vue";
9
+ export { default as ArsenalCarousel } from "./cyy-ArsenalCarousel/cyy-ArsenalCarousel.vue";
10
+ export { default as Collocation } from "./cyy-collocation/cyy-collocation.vue";
11
+ export { default as ArsenalTop } from "./cyy-ArsenalTop/cyy-ArsenalTop.vue";
12
+ export { default as Live } from "./cyy-live/cyy-live.vue";
13
+ export { default as Notice } from "./cyy-notice/cyy-notice.vue";
14
+ export { default as ArsenalActivity } from "./cyy-ArsenalActivity/cyy-ArsenalActivity.vue";
15
+ export { default as Video } from "./cyy-video/cyy-video.vue";
16
+ export { default as ArsenalClass } from "./cyy-ArsenalClass/cyy-ArsenalClass.vue";
17
+ export { default as ArsenalMyTop } from "./cyy-ArsenalMyTop/cyy-ArsenalMyTop.vue";
18
+ export { default as ArsenalMyNavigation } from "./cyy-ArsenalMyNavigation/cyy-ArsenalMyNavigation";
19
+ export { default as ArsenalRecommend } from "./cyy-ArsenalRecommend/cyy-ArsenalRecommend.vue";
20
+ export { default as NewProduct } from "./cyy-new-product/cyy-new-product.vue";
21
+ export { default as ArsenalPromotion } from "./cyy-ArsenalPromotion/cyy-ArsenalPromotion.vue";
@@ -1,16 +1,16 @@
1
- export const isLc = process.env.NODE_ENV === "dev" || process.env.VUE_APP_PLATFORM === "low-code";
2
-
3
- export const handlePlat = (params) => {
4
- let result = {};
5
- for (let key in params) {
6
- result[key] = sumPix(params[key]);
7
- }
8
- return result;
9
- };
10
-
11
- const sumPix = (param) => {
12
- if (isLc) {
13
- return param + "px";
14
- }
15
- return param * 2 + "rpx";
16
- };
1
+ export const isLc = process.env.NODE_ENV === "dev" || process.env.VUE_APP_PLATFORM === "low-code";
2
+
3
+ export const handlePlat = (params) => {
4
+ let result = {};
5
+ for (let key in params) {
6
+ result[key] = sumPix(params[key]);
7
+ }
8
+ return result;
9
+ };
10
+
11
+ const sumPix = (param) => {
12
+ if (isLc) {
13
+ return param + "px";
14
+ }
15
+ return param * 2 + "rpx";
16
+ };
@@ -1,100 +1,100 @@
1
- import { querySkuFromJm } from "../api/index.js";
2
- import { isLc } from "./checkEnv";
3
- import { isEmpty, isEqual } from "lodash-es";
4
-
5
- const handleParams = (obj) => {
6
- const formData = new URLSearchParams();
7
- for (let key in obj) {
8
- formData.append(key, obj[key]);
9
- }
10
- return formData;
11
- };
12
-
13
- const fetchGoodsInfo = (id) => {
14
- const { mGoodsInfo } = goodsCache[id];
15
- return mGoodsInfo;
16
- };
17
-
18
- const setGoodsInfo = (id, goods, data) => {
19
- goodsCache[id] = {
20
- mGoodsInfo: data,
21
- mGoods: goods,
22
- };
23
- };
24
-
25
- const handleCache = (that) => {
26
- const { goods, id } = that.props;
27
- const { mGoods } = goodsCache[id] || {};
28
- return isEqual(goods, mGoods);
29
- };
30
-
31
- export const getUrl = (that) => {
32
- return isLc ? process.env.REACT_APP_BASE_URL : that.$imgDomain;
33
- };
34
-
35
- function getGoodsImpl() {
36
- const uniIo = async (that, paramObj) => {
37
- const { list } = await that.http.get(
38
- "web/es/searchengine/find.json?rows=200&page=1",
39
- paramObj
40
- );
41
-
42
- const skuCodeList = paramObj.goodsCode.split(",");
43
- let sortedArrays = [];
44
-
45
- skuCodeList.forEach((goodsCode) => {
46
- list.forEach((item) => {
47
- if (item.goodsCode === goodsCode) {
48
- sortedArrays.push(item);
49
- }
50
- });
51
- });
52
- console.log("findList", sortedArrays);
53
- return { list: sortedArrays };
54
- };
55
- const fetchIO = async (that, paramObj) => {
56
- const { id, goods } = that.props;
57
- if (isEmpty(goods)) return Promise.resolve({ list: [] });
58
-
59
- const isEqualFlag = handleCache(that);
60
-
61
- if (isEqualFlag) {
62
- return Promise.resolve(fetchGoodsInfo(id));
63
- }
64
- // 从 URL 中获取 channelCode
65
- const urlParams = new URLSearchParams(window.location.hash.split('?')[1] || window.location.search);
66
- const channelCode = urlParams.get('channelCode') || '';
67
- const saasToken = localStorage.getItem("saas-token");
68
- return await fetch(
69
- getUrl() +
70
- querySkuFromJm +
71
- "&rows=200&page=1&goodsCode=" +
72
- paramObj.goodsCode +
73
- "&channelCode=" + channelCode,
74
- {
75
- method: "GET",
76
- headers: {
77
- "saas-token": saasToken,
78
- "user-agent":
79
- "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
80
- "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
81
- },
82
- credentials: "include",
83
- }
84
- )
85
- .then((response) => response.json())
86
- .then((res = {}) => {
87
- setGoodsInfo(id, goods, res);
88
- return res;
89
- });
90
- };
91
-
92
- if (isLc) {
93
- return fetchIO;
94
- }
95
- return uniIo;
96
- }
97
-
98
- export const fetchGoodImpl = getGoodsImpl();
99
-
100
- export const goodsCache = {};
1
+ import { querySkuFromJm } from "../api/index.js";
2
+ import { isLc } from "./checkEnv";
3
+ import { isEmpty, isEqual } from "lodash-es";
4
+
5
+ const handleParams = (obj) => {
6
+ const formData = new URLSearchParams();
7
+ for (let key in obj) {
8
+ formData.append(key, obj[key]);
9
+ }
10
+ return formData;
11
+ };
12
+
13
+ const fetchGoodsInfo = (id) => {
14
+ const { mGoodsInfo } = goodsCache[id];
15
+ return mGoodsInfo;
16
+ };
17
+
18
+ const setGoodsInfo = (id, goods, data) => {
19
+ goodsCache[id] = {
20
+ mGoodsInfo: data,
21
+ mGoods: goods,
22
+ };
23
+ };
24
+
25
+ const handleCache = (that) => {
26
+ const { goods, id } = that.props;
27
+ const { mGoods } = goodsCache[id] || {};
28
+ return isEqual(goods, mGoods);
29
+ };
30
+
31
+ export const getUrl = (that) => {
32
+ return isLc ? process.env.REACT_APP_BASE_URL : that.$imgDomain;
33
+ };
34
+
35
+ function getGoodsImpl() {
36
+ const uniIo = async (that, paramObj) => {
37
+ const { list } = await that.http.get(
38
+ "web/es/searchengine/find.json?rows=200&page=1",
39
+ paramObj
40
+ );
41
+
42
+ const skuCodeList = paramObj.goodsCode.split(",");
43
+ let sortedArrays = [];
44
+
45
+ skuCodeList.forEach((goodsCode) => {
46
+ list.forEach((item) => {
47
+ if (item.goodsCode === goodsCode) {
48
+ sortedArrays.push(item);
49
+ }
50
+ });
51
+ });
52
+ console.log("findList", sortedArrays);
53
+ return { list: sortedArrays };
54
+ };
55
+ const fetchIO = async (that, paramObj) => {
56
+ const { id, goods } = that.props;
57
+ if (isEmpty(goods)) return Promise.resolve({ list: [] });
58
+
59
+ const isEqualFlag = handleCache(that);
60
+
61
+ if (isEqualFlag) {
62
+ return Promise.resolve(fetchGoodsInfo(id));
63
+ }
64
+ // 从 URL 中获取 channelCode
65
+ const urlParams = new URLSearchParams(window.location.hash.split('?')[1] || window.location.search);
66
+ const channelCode = urlParams.get('channelCode') || '';
67
+ const saasToken = localStorage.getItem("saas-token");
68
+ return await fetch(
69
+ getUrl() +
70
+ querySkuFromJm +
71
+ "&rows=200&page=1&goodsCode=" +
72
+ paramObj.goodsCode +
73
+ "&channelCode=" + channelCode,
74
+ {
75
+ method: "GET",
76
+ headers: {
77
+ "saas-token": saasToken,
78
+ "user-agent":
79
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
80
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
81
+ },
82
+ credentials: "include",
83
+ }
84
+ )
85
+ .then((response) => response.json())
86
+ .then((res = {}) => {
87
+ setGoodsInfo(id, goods, res);
88
+ return res;
89
+ });
90
+ };
91
+
92
+ if (isLc) {
93
+ return fetchIO;
94
+ }
95
+ return uniIo;
96
+ }
97
+
98
+ export const fetchGoodImpl = getGoodsImpl();
99
+
100
+ export const goodsCache = {};
@@ -1,2 +1,2 @@
1
- export * from './checkEnv.js';
2
- export * from './fetchFactory';
1
+ export * from './checkEnv.js';
2
+ export * from './fetchFactory';