@fonixtree/magic-design 1.0.70 → 1.0.73

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 (55) hide show
  1. package/es/assets/fonts/.DS_Store +0 -0
  2. package/es/composite-comp/bol/components/Banner/mobile/index.less +52 -78
  3. package/es/composite-comp/bol/components/Carousel/mobile/index.less +81 -100
  4. package/es/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -22
  5. package/es/composite-comp/bol/components/ImageText/mobile/index.less +233 -292
  6. package/es/composite-comp/bol/components/Video/mobile/Layout1/index.less +21 -27
  7. package/es/composite-comp/bol/components/Video/mobile/Layout2/index.less +36 -45
  8. package/es/composite-comp/bol/components/Video/mobile/Layout3/index.less +43 -54
  9. package/es/composite-comp/bol/components/Video/mobile/index.less +2 -3
  10. package/es/composite-comp/bol/components/Wallet/mobile/index.less +103 -130
  11. package/es/composite-comp/bol/components/WalletNuri/mobile/index.less +19 -20
  12. package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +81 -111
  13. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +7 -1
  14. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.less +27 -35
  15. package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +83 -97
  16. package/es/composite-comp/dito/components/HeadNavigation/mobile/index.less +32 -34
  17. package/es/composite-comp/dito/components/MenuNavigation/mobile/index.less +4 -4
  18. package/es/composite-comp/dito/components/MobileNavigation/mobile/index.less +18 -35
  19. package/es/composite-comp/dito/components/Orders/mobile/index.js +6 -1
  20. package/es/composite-comp/dito/components/Orders/mobile/index.less +85 -92
  21. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +6 -1
  22. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +133 -155
  23. package/es/composite-comp/dito/components/Recommend/mobile/index.less +73 -86
  24. package/es/composite-comp/dito/components/SearchBar/mobile/index.less +45 -52
  25. package/es/composite-comp/dito/components/SignBoard/mobile/index.less +62 -66
  26. package/es/utils/commonUtil.js +6 -4
  27. package/es/utils/coreUtil.js +4 -53
  28. package/lib/assets/fonts/.DS_Store +0 -0
  29. package/lib/composite-comp/bol/components/Banner/mobile/index.less +52 -78
  30. package/lib/composite-comp/bol/components/Carousel/mobile/index.less +81 -100
  31. package/lib/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -22
  32. package/lib/composite-comp/bol/components/ImageText/mobile/index.less +233 -292
  33. package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.less +21 -27
  34. package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.less +36 -45
  35. package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.less +43 -54
  36. package/lib/composite-comp/bol/components/Video/mobile/index.less +2 -3
  37. package/lib/composite-comp/bol/components/Wallet/mobile/index.less +103 -130
  38. package/lib/composite-comp/bol/components/WalletNuri/mobile/index.less +19 -20
  39. package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +81 -111
  40. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +7 -1
  41. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.less +27 -35
  42. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +83 -97
  43. package/lib/composite-comp/dito/components/HeadNavigation/mobile/index.less +32 -34
  44. package/lib/composite-comp/dito/components/MenuNavigation/mobile/index.less +4 -4
  45. package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.less +18 -35
  46. package/lib/composite-comp/dito/components/Orders/mobile/index.js +6 -1
  47. package/lib/composite-comp/dito/components/Orders/mobile/index.less +85 -92
  48. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +6 -1
  49. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +133 -155
  50. package/lib/composite-comp/dito/components/Recommend/mobile/index.less +73 -86
  51. package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +45 -52
  52. package/lib/composite-comp/dito/components/SignBoard/mobile/index.less +62 -66
  53. package/lib/utils/commonUtil.js +6 -4
  54. package/lib/utils/coreUtil.js +4 -53
  55. package/package.json +1 -1
@@ -1,68 +1,64 @@
1
1
  .m-sign-board-bar {
2
2
  width: 100%;
3
-
4
- .search {
5
- width: 100%;
6
- background: #EEEEEE;
7
- border-radius: 8px;
8
- padding: 8px 12px;
9
- height: 36px;
10
- display: flex;
11
- justify-content: space-between;
12
- align-items: center;
13
- margin-bottom: 4px;
14
- .search-input {
15
- height: 20px;
16
- font-weight: 400;
17
- font-size: 16px;
18
- line-height: 20px;
19
- padding: 0;
20
- background-color: transparent;
21
- border: none;
22
- }
23
- }
24
-
25
- .store-info-wrap {
26
- display: flex;
27
- align-items: center;
28
- margin-top: 20px;
29
- .number {
30
- font-family: 'Montserrat';
31
- font-weight: 400;
32
- font-size: 12px;
33
- line-height: 16px;
34
- color: #696973;
35
- display: flex;
36
- align-items: center;
37
- &> img {
38
- width: 14px;
39
- }
40
- &> span {
41
- font-weight: 700;
42
- font-size: 14px;
43
- line-height: 18px;
44
- color: #333333;
45
- margin: 0 4px;
46
- }
47
- &:nth-child(2) {
48
- margin-left: 24px;
49
- flex: 1;
50
- }
51
- }
52
- .chat-btn {
53
- padding: 5px 12px;
54
- // height: 26px;
55
- background: #FFFFFF;
56
- border: 1px solid #333333;
57
- border-radius: 4px;
58
- width: fit-content;
59
- font-family: 'Montserrat';
60
- font-weight: 400;
61
- font-size: 12px;
62
- line-height: 16px;
63
- text-transform: uppercase;
64
- color: #333333;
65
- }
66
- }
67
-
68
- }
3
+ }
4
+ .m-sign-board-bar .search {
5
+ width: 100%;
6
+ background: #EEEEEE;
7
+ border-radius: 0.16rem;
8
+ padding: 0.16rem 0.24rem;
9
+ height: 0.72rem;
10
+ display: flex;
11
+ justify-content: space-between;
12
+ align-items: center;
13
+ margin-bottom: 0.08rem;
14
+ }
15
+ .m-sign-board-bar .search .search-input {
16
+ height: 0.4rem;
17
+ font-weight: 400;
18
+ font-size: 0.32rem;
19
+ line-height: 0.4rem;
20
+ padding: 0;
21
+ background-color: transparent;
22
+ border: none;
23
+ }
24
+ .m-sign-board-bar .store-info-wrap {
25
+ display: flex;
26
+ align-items: center;
27
+ margin-top: 0.4rem;
28
+ }
29
+ .m-sign-board-bar .store-info-wrap .number {
30
+ font-family: 'Montserrat';
31
+ font-weight: 400;
32
+ font-size: 0.24rem;
33
+ line-height: 0.32rem;
34
+ color: #696973;
35
+ display: flex;
36
+ align-items: center;
37
+ }
38
+ .m-sign-board-bar .store-info-wrap .number > img {
39
+ width: 0.28rem;
40
+ }
41
+ .m-sign-board-bar .store-info-wrap .number > span {
42
+ font-weight: 700;
43
+ font-size: 0.28rem;
44
+ line-height: 0.36rem;
45
+ color: #333333;
46
+ margin: 0 0.08rem;
47
+ }
48
+ .m-sign-board-bar .store-info-wrap .number:nth-child(2) {
49
+ margin-left: 0.48rem;
50
+ flex: 1;
51
+ }
52
+ .m-sign-board-bar .store-info-wrap .chat-btn {
53
+ padding: 0.1rem 0.24rem;
54
+ background: #FFFFFF;
55
+ border: 0.02rem solid #333333;
56
+ border-radius: 0.08rem;
57
+ width: fit-content;
58
+ font-family: 'Montserrat';
59
+ font-weight: 400;
60
+ font-size: 0.24rem;
61
+ line-height: 0.32rem;
62
+ text-transform: uppercase;
63
+ color: #333333;
64
+ }
@@ -296,7 +296,9 @@ function commonFetch(url, data, method) {
296
296
  });
297
297
  }
298
298
 
299
- var navigateTo = function navigateTo(url) {
299
+ var navigateTo = function navigateTo(url, state) {
300
+ console.log('navigateTo', url);
301
+
300
302
  if (!url) {
301
303
  return;
302
304
  }
@@ -309,7 +311,7 @@ var navigateTo = function navigateTo(url) {
309
311
  if (!appUrl && !h5Url.startsWith('/')) {
310
312
  window.location.href = h5Url;
311
313
  } else if (window.magicDesign.history) {
312
- window.magicDesign.history.push(url);
314
+ window.magicDesign.history.push(url, state);
313
315
  } else if (window.magicDesign.navigatePreUrl) {
314
316
  // 预览模式跳转
315
317
  if (h5Url.startsWith('/')) {
@@ -748,8 +750,8 @@ function pushGA(data, eventName) {
748
750
  groupName: data.groupName,
749
751
  elementId: data.elementId,
750
752
  elementName: data.elementName
751
- };
752
- console.log('GA push', eventName, eventData);
753
+ }; // console.log('GA push', eventName, eventData);
754
+
753
755
  if (window.gtag) window.gtag('event', eventName, eventData);
754
756
  }
755
757
  } catch (error) {
@@ -286,22 +286,6 @@ var getCoupon = function getCoupon(couponId) {
286
286
  });
287
287
  };
288
288
 
289
- function isUrl(string) {
290
- // var pattern = new RegExp('^(https?:\\/\\/)?' + // 协议
291
- // '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // 域名
292
- // '((\\d{1,3}\\.){3}\\d{1,3}))' + // 或者 IP (v4) 地址
293
- // '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // 端口和路径
294
- // '(\\?[;&a-z\\d%_.~+=-]*)?' + // 查询字符串
295
- // '(\\#[-a-z\\d_]*)?$', 'i'); // fragment locator
296
- // return !!pattern.test(string);
297
- try {
298
- new URL(string);
299
- return true;
300
- } catch (_) {
301
- return false;
302
- }
303
- }
304
-
305
289
  var clickUrl = function clickUrl(url) {
306
290
  if (url === void 0) {
307
291
  url = '';
@@ -318,25 +302,8 @@ var clickUrl = function clickUrl(url) {
318
302
  data = _a.data;
319
303
 
320
304
  var _b = data.params,
321
- params = _b === void 0 ? {} : _b;
322
- console.log('clicked data:', data);
323
- console.log({
324
- type: 'jumpBrowser',
325
- params: {
326
- url: params.link
327
- }
328
- });
329
- /** 锚点跳转 */
330
-
331
- if (params.type === 'ANCHOR') {
332
- (0, _commonUtil.ensure)(function () {
333
- var nodeId = isPc() ? params.data.pcNodeId : params.data.mobileNodeId;
334
- document.querySelector("#node-" + nodeId).scrollIntoView({
335
- behavior: 'smooth'
336
- });
337
- });
338
- return;
339
- }
305
+ params = _b === void 0 ? {} : _b; // console.log('clicked data:', data);
306
+ // console.log({ type: 'jumpBrowser', params: { url: params.link } });
340
307
 
341
308
  if ((0, _androidUtil.browserVersion)().isAshitaApp) {
342
309
  (0, _androidUtil.sendToApp)(data);
@@ -369,25 +336,9 @@ var clickUrl = function clickUrl(url) {
369
336
  }
370
337
 
371
338
  return;
372
- } // 输入的是完整的跳转地址
373
-
374
-
375
- if (isUrl(link)) {
376
- if (!link.includes(window.location.host)) {
377
- // 跳转外链 需要把userToken带上
378
- if (link.includes('?')) {
379
- var a = link + "&userToken=" + (localStorage.getItem('h5Token') || '');
380
- window.open(a);
381
- } else {
382
- var a = link + "?userToken=" + (localStorage.getItem('h5Token') || '');
383
- window.open(a);
384
- }
385
- } else {
386
- window.open(link);
387
- }
388
- } else {
389
- (0, _commonUtil.navigateTo)(link);
390
339
  }
340
+
341
+ (0, _commonUtil.navigateTo)(link);
391
342
  }
392
343
  };
393
344
 
Binary file
@@ -1,80 +1,54 @@
1
1
  .m-banner-mobile {
2
2
  position: relative;
3
- // .turnPage {
4
- // position: absolute;
5
- // top: 50%;
6
- // transform: translateY(-50%);
7
- // z-index: 3;
8
- // cursor: pointer;
9
- // }
10
- // .leftBtn {
11
- // left: 20px;
12
- // }
13
- // .rightBtn {
14
- // right: 20px;
15
- // }
16
-
17
- .cylon-carousel {
18
- .slick-track {
19
- display: flex;
20
- align-items: center;
21
- }
22
- }
23
-
24
- .carouselItem {
25
- // height: 386px;
26
- position: relative;
27
- display: flex;
28
-
29
- .carouseContent {
30
- padding: 0 28px;
31
- position: absolute;
32
- z-index: 2;
33
- display: flex;
34
- flex-direction: column;
35
- margin-bottom: auto;
36
- }
37
-
38
- .title {
39
- margin-bottom: 8px;
40
- }
41
-
42
- .sub-title {
43
- margin-bottom: 20px;
44
- }
45
-
46
- .btn-wrap {
47
- display: flex;
48
- align-items: center;
49
- justify-content: flex-start;
50
-
51
- .btn {
52
- margin-right: 12px;
53
- }
54
- }
55
- }
56
-
57
- .swiper-ban {
58
- position: absolute;
59
- width: 100%;
60
- bottom: 10px;
61
- display: flex;
62
- align-items: center;
63
- justify-content: center;
64
-
65
- .ban {
66
- font-size: 16px;
67
- width: 1.5em;
68
- height: 0.3em;
69
- background: #FFF;
70
- cursor: inherit;
71
- margin-right: 0.3em;
72
- transition: all .5s;
73
-
74
- &.active {
75
- width: 1.5em;
76
- opacity: 1;
77
- }
78
- }
79
- }
80
- }
3
+ }
4
+ .m-banner-mobile .cylon-carousel .slick-track {
5
+ display: flex;
6
+ align-items: center;
7
+ }
8
+ .m-banner-mobile .carouselItem {
9
+ position: relative;
10
+ display: flex;
11
+ }
12
+ .m-banner-mobile .carouselItem .carouseContent {
13
+ padding: 0 0.56rem;
14
+ position: absolute;
15
+ z-index: 2;
16
+ display: flex;
17
+ flex-direction: column;
18
+ margin-bottom: auto;
19
+ }
20
+ .m-banner-mobile .carouselItem .title {
21
+ margin-bottom: 0.16rem;
22
+ }
23
+ .m-banner-mobile .carouselItem .sub-title {
24
+ margin-bottom: 0.4rem;
25
+ }
26
+ .m-banner-mobile .carouselItem .btn-wrap {
27
+ display: flex;
28
+ align-items: center;
29
+ justify-content: flex-start;
30
+ }
31
+ .m-banner-mobile .carouselItem .btn-wrap .btn {
32
+ margin-right: 0.24rem;
33
+ }
34
+ .m-banner-mobile .swiper-ban {
35
+ position: absolute;
36
+ width: 100%;
37
+ bottom: 0.2rem;
38
+ display: flex;
39
+ align-items: center;
40
+ justify-content: center;
41
+ }
42
+ .m-banner-mobile .swiper-ban .ban {
43
+ font-size: 0.32rem;
44
+ width: 1.5em;
45
+ height: 0.3em;
46
+ background: #FFF;
47
+ cursor: inherit;
48
+ margin-right: 0.3em;
49
+ transition: all 0.5s;
50
+ }
51
+ .m-banner-mobile .swiper-ban .ban.active {
52
+ width: 1.5em;
53
+ opacity: 1;
54
+ }
@@ -1,103 +1,84 @@
1
1
  .m-carousel-mobile {
2
2
  position: relative;
3
3
  width: 100%;
4
-
5
- .content {
6
- display: flex;
7
- margin: 0 auto;
8
- }
9
-
10
- .slider-wrap {
11
- width: 100%;
12
- margin: 0 auto;
13
- line-height: 1;
14
-
15
- .slick-list {
16
- // margin-left: -11px;
17
- // margin-right: -11px;
18
- padding: 0;
19
-
20
- &:hover {
21
- padding-top: 100px;
22
- margin-top: -100px;
23
- padding-bottom: 100px;
24
- margin-bottom: -100px;
25
- }
26
-
27
- .slick-track {
28
- display: flex;
29
- align-items: center;
30
- gap: 12px;
31
- }
32
- }
33
-
34
- .img-wrap {
35
- .img {
36
- width: fit-content;
37
- height: fit-content;
38
- display: block;
39
- margin: 0 auto;
40
- }
41
-
42
- .title {
43
- display: flex;
44
- justify-content: center;
45
- margin-top: 12px;
46
- }
47
-
48
- .text {
49
- display: flex;
50
- justify-content: center;
51
- margin-top: 6px;
52
- }
53
-
54
- .tags {
55
- margin-top: 8px;
56
- margin-bottom: 12px;
57
- display: flex;
58
- flex-direction: row;
59
- align-items: center;
60
- justify-content: center;
61
-
62
- >div {
63
- margin-right: 8px;
64
-
65
- &:last-child {
66
- margin-right: 0;
67
- }
68
- }
69
- }
70
- }
71
- }
72
-
73
- .swiper-ban {
74
- position: absolute;
75
- width: 100%;
76
- bottom: 6px;
77
- display: flex;
78
- align-items: center;
79
- justify-content: center;
80
-
81
- .ban {
82
- font-size: 8px;
83
- width: 1em;
84
- height: 1em;
85
- border-radius: 50%;
86
- background: #FFF;
87
- cursor: inherit;
88
- margin-right: 10px;
89
- transition: all .5s;
90
-
91
- &:last-child {
92
- margin-right: 0;
93
- }
94
-
95
- &.active {
96
- width: 2em;
97
- height: 1em;
98
- border-radius: 100px;
99
- opacity: 1;
100
- }
101
- }
102
- }
103
- }
4
+ }
5
+ .m-carousel-mobile .content {
6
+ display: flex;
7
+ margin: 0 auto;
8
+ }
9
+ .m-carousel-mobile .slider-wrap {
10
+ width: 100%;
11
+ margin: 0 auto;
12
+ line-height: 1;
13
+ }
14
+ .m-carousel-mobile .slider-wrap .slick-list {
15
+ padding: 0;
16
+ }
17
+ .m-carousel-mobile .slider-wrap .slick-list:hover {
18
+ padding-top: 2rem;
19
+ margin-top: -2rem;
20
+ padding-bottom: 2rem;
21
+ margin-bottom: -2rem;
22
+ }
23
+ .m-carousel-mobile .slider-wrap .slick-list .slick-track {
24
+ display: flex;
25
+ align-items: center;
26
+ gap: 0.24rem;
27
+ }
28
+ .m-carousel-mobile .slider-wrap .img-wrap .img {
29
+ width: fit-content;
30
+ height: fit-content;
31
+ display: block;
32
+ margin: 0 auto;
33
+ }
34
+ .m-carousel-mobile .slider-wrap .img-wrap .title {
35
+ display: flex;
36
+ justify-content: center;
37
+ margin-top: 0.24rem;
38
+ }
39
+ .m-carousel-mobile .slider-wrap .img-wrap .text {
40
+ display: flex;
41
+ justify-content: center;
42
+ margin-top: 0.12rem;
43
+ }
44
+ .m-carousel-mobile .slider-wrap .img-wrap .tags {
45
+ margin-top: 0.16rem;
46
+ margin-bottom: 0.24rem;
47
+ display: flex;
48
+ flex-direction: row;
49
+ align-items: center;
50
+ justify-content: center;
51
+ }
52
+ .m-carousel-mobile .slider-wrap .img-wrap .tags > div {
53
+ margin-right: 0.16rem;
54
+ }
55
+ .m-carousel-mobile .slider-wrap .img-wrap .tags > div:last-child {
56
+ margin-right: 0;
57
+ }
58
+ .m-carousel-mobile .swiper-ban {
59
+ position: absolute;
60
+ width: 100%;
61
+ bottom: 0.12rem;
62
+ display: flex;
63
+ align-items: center;
64
+ justify-content: center;
65
+ }
66
+ .m-carousel-mobile .swiper-ban .ban {
67
+ font-size: 0.16rem;
68
+ width: 1em;
69
+ height: 1em;
70
+ border-radius: 50%;
71
+ background: #FFF;
72
+ cursor: inherit;
73
+ margin-right: 0.2rem;
74
+ transition: all 0.5s;
75
+ }
76
+ .m-carousel-mobile .swiper-ban .ban:last-child {
77
+ margin-right: 0;
78
+ }
79
+ .m-carousel-mobile .swiper-ban .ban.active {
80
+ width: 2em;
81
+ height: 1em;
82
+ border-radius: 2rem;
83
+ opacity: 1;
84
+ }
@@ -1,22 +1,15 @@
1
- .m-image-gallery-mobile {
2
- .content {
3
- .line {
4
- margin-bottom: 12px;
5
-
6
- &.isHorizontal {
7
- display: flex;
8
- justify-content: flex-start;
9
- }
10
-
11
- &:last-child {
12
- margin-bottom: 0;
13
- }
14
-
15
- .img-wrap {
16
- display: flex;
17
- align-items: center;
18
- justify-content: center;
19
- }
20
- }
21
- }
22
- }
1
+ .m-image-gallery-mobile .content .line {
2
+ margin-bottom: 0.24rem;
3
+ }
4
+ .m-image-gallery-mobile .content .line.isHorizontal {
5
+ display: flex;
6
+ justify-content: flex-start;
7
+ }
8
+ .m-image-gallery-mobile .content .line:last-child {
9
+ margin-bottom: 0;
10
+ }
11
+ .m-image-gallery-mobile .content .line .img-wrap {
12
+ display: flex;
13
+ align-items: center;
14
+ justify-content: center;
15
+ }