@fonixtree/magic-design 0.1.45 → 0.1.46

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 (41) hide show
  1. package/es/assets/fonts/.DS_Store +0 -0
  2. package/es/common/LinkModal/StoreCatgTable/index.js +244 -0
  3. package/es/common/LinkModal/index.js +7 -1
  4. package/es/composite-comp/bol/components/Banner/mobile/index.less +52 -78
  5. package/es/composite-comp/bol/components/Carousel/mobile/index.less +81 -100
  6. package/es/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -22
  7. package/es/composite-comp/bol/components/ImageText/mobile/index.less +233 -292
  8. package/es/composite-comp/bol/components/Video/mobile/Layout1/index.less +23 -27
  9. package/es/composite-comp/bol/components/Video/mobile/Layout2/index.less +38 -45
  10. package/es/composite-comp/bol/components/Video/mobile/Layout3/index.less +41 -50
  11. package/es/composite-comp/bol/components/Video/mobile/index.less +2 -3
  12. package/es/composite-comp/bol/components/Wallet/mobile/index.less +27 -40
  13. package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +83 -97
  14. package/es/composite-comp/dito/components/MobileNavigation/mobile/index.less +18 -35
  15. package/es/composite-comp/dito/components/Recommend/mobile/index.less +73 -86
  16. package/es/composite-comp/dito/components/SearchBar/mobile/index.less +45 -52
  17. package/es/composite-comp/dito/components/SignBoard/mobile/index.less +76 -80
  18. package/es/constants/index.js +1 -0
  19. package/es/utils/businessUtil.js +20 -4
  20. package/es/utils/commonUtil.js +2 -3
  21. package/lib/assets/fonts/.DS_Store +0 -0
  22. package/lib/common/LinkModal/StoreCatgTable/index.js +244 -0
  23. package/lib/common/LinkModal/index.js +7 -1
  24. package/lib/composite-comp/bol/components/Banner/mobile/index.less +52 -78
  25. package/lib/composite-comp/bol/components/Carousel/mobile/index.less +81 -100
  26. package/lib/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -22
  27. package/lib/composite-comp/bol/components/ImageText/mobile/index.less +233 -292
  28. package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.less +23 -27
  29. package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.less +38 -45
  30. package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.less +41 -50
  31. package/lib/composite-comp/bol/components/Video/mobile/index.less +2 -3
  32. package/lib/composite-comp/bol/components/Wallet/mobile/index.less +27 -40
  33. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +83 -97
  34. package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.less +18 -35
  35. package/lib/composite-comp/dito/components/Recommend/mobile/index.less +73 -86
  36. package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +45 -52
  37. package/lib/composite-comp/dito/components/SignBoard/mobile/index.less +76 -80
  38. package/lib/constants/index.js +1 -0
  39. package/lib/utils/businessUtil.js +20 -4
  40. package/lib/utils/commonUtil.js +2 -3
  41. package/package.json +1 -1
Binary file
@@ -0,0 +1,244 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = StoreCatgTable;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _antd = require("antd");
13
+
14
+ var _commonUtil = require("../../../utils/commonUtil");
15
+
16
+ var _businessUtil = require("../../../utils/businessUtil");
17
+
18
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
+
20
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
+
22
+ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
23
+ function adopt(value) {
24
+ return value instanceof P ? value : new P(function (resolve) {
25
+ resolve(value);
26
+ });
27
+ }
28
+
29
+ return new (P || (P = Promise))(function (resolve, reject) {
30
+ function fulfilled(value) {
31
+ try {
32
+ step(generator.next(value));
33
+ } catch (e) {
34
+ reject(e);
35
+ }
36
+ }
37
+
38
+ function rejected(value) {
39
+ try {
40
+ step(generator["throw"](value));
41
+ } catch (e) {
42
+ reject(e);
43
+ }
44
+ }
45
+
46
+ function step(result) {
47
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
48
+ }
49
+
50
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
51
+ });
52
+ };
53
+
54
+ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
55
+ var _ = {
56
+ label: 0,
57
+ sent: function sent() {
58
+ if (t[0] & 1) throw t[1];
59
+ return t[1];
60
+ },
61
+ trys: [],
62
+ ops: []
63
+ },
64
+ f,
65
+ y,
66
+ t,
67
+ g;
68
+ return g = {
69
+ next: verb(0),
70
+ "throw": verb(1),
71
+ "return": verb(2)
72
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
73
+ return this;
74
+ }), g;
75
+
76
+ function verb(n) {
77
+ return function (v) {
78
+ return step([n, v]);
79
+ };
80
+ }
81
+
82
+ function step(op) {
83
+ if (f) throw new TypeError("Generator is already executing.");
84
+
85
+ while (_) {
86
+ try {
87
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
88
+ if (y = 0, t) op = [op[0] & 2, t.value];
89
+
90
+ switch (op[0]) {
91
+ case 0:
92
+ case 1:
93
+ t = op;
94
+ break;
95
+
96
+ case 4:
97
+ _.label++;
98
+ return {
99
+ value: op[1],
100
+ done: false
101
+ };
102
+
103
+ case 5:
104
+ _.label++;
105
+ y = op[1];
106
+ op = [0];
107
+ continue;
108
+
109
+ case 7:
110
+ op = _.ops.pop();
111
+
112
+ _.trys.pop();
113
+
114
+ continue;
115
+
116
+ default:
117
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
118
+ _ = 0;
119
+ continue;
120
+ }
121
+
122
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
123
+ _.label = op[1];
124
+ break;
125
+ }
126
+
127
+ if (op[0] === 6 && _.label < t[1]) {
128
+ _.label = t[1];
129
+ t = op;
130
+ break;
131
+ }
132
+
133
+ if (t && _.label < t[2]) {
134
+ _.label = t[2];
135
+
136
+ _.ops.push(op);
137
+
138
+ break;
139
+ }
140
+
141
+ if (t[2]) _.ops.pop();
142
+
143
+ _.trys.pop();
144
+
145
+ continue;
146
+ }
147
+
148
+ op = body.call(thisArg, _);
149
+ } catch (e) {
150
+ op = [6, e];
151
+ y = 0;
152
+ } finally {
153
+ f = t = 0;
154
+ }
155
+ }
156
+
157
+ if (op[0] & 5) throw op[1];
158
+ return {
159
+ value: op[0] ? op[1] : void 0,
160
+ done: true
161
+ };
162
+ }
163
+ };
164
+
165
+ function StoreCatgTable(props) {
166
+ var _this = this;
167
+
168
+ var _onChange = props.onChange;
169
+
170
+ var _a = (0, _react.useState)([]),
171
+ catgList = _a[0],
172
+ setCatgList = _a[1];
173
+
174
+ var _b = (0, _react.useState)(false),
175
+ loading = _b[0],
176
+ setLoading = _b[1];
177
+
178
+ var queryCategory = function queryCategory() {
179
+ return __awaiter(_this, void 0, void 0, function () {
180
+ var res, tree;
181
+ return __generator(this, function (_a) {
182
+ switch (_a.label) {
183
+ case 0:
184
+ setLoading(true);
185
+ return [4
186
+ /*yield*/
187
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/storeoffercatgs", {}, 'GET')];
188
+
189
+ case 1:
190
+ res = _a.sent();
191
+ tree = (0, _businessUtil.listToTree)(res, 'storeCatgId'); // console.log('res', res);
192
+
193
+ console.log('tree', tree);
194
+ setCatgList(tree);
195
+ setLoading(false);
196
+ return [2
197
+ /*return*/
198
+ ];
199
+ }
200
+ });
201
+ });
202
+ };
203
+
204
+ (0, _react.useEffect)(function () {
205
+ queryCategory();
206
+ }, []);
207
+ var columns = [{
208
+ title: 'Category',
209
+ dataIndex: 'catgName',
210
+ render: function render(catgName) {
211
+ return /*#__PURE__*/_react["default"].createElement("span", {
212
+ className: "productName"
213
+ }, catgName);
214
+ }
215
+ }];
216
+ var rowSelection = {
217
+ onChange: function onChange(selectedRowKeys, selectedRow) {
218
+ _onChange({
219
+ value: selectedRowKeys[0],
220
+ name: selectedRow[0].catgName
221
+ });
222
+ },
223
+ type: 'radio'
224
+ };
225
+ return /*#__PURE__*/_react["default"].createElement("div", {
226
+ style: {
227
+ height: 550
228
+ }
229
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Table, {
230
+ bordered: false,
231
+ columns: columns,
232
+ dataSource: catgList,
233
+ defaultExpandAllRows: true,
234
+ loading: loading,
235
+ pagination: false,
236
+ rowKey: function rowKey(record) {
237
+ return record && record.key;
238
+ },
239
+ rowSelection: rowSelection,
240
+ scroll: {
241
+ y: 480
242
+ }
243
+ }));
244
+ }
@@ -33,6 +33,8 @@ var _MiniAppTable = _interopRequireDefault(require("./MiniAppTable"));
33
33
 
34
34
  var _StoreTable = _interopRequireDefault(require("./StoreTable"));
35
35
 
36
+ var _StoreCatgTable = _interopRequireDefault(require("./StoreCatgTable"));
37
+
36
38
  var _locale = require("../../locale");
37
39
 
38
40
  var _commonUtil = require("../../utils/commonUtil");
@@ -290,7 +292,11 @@ var LinkModal = function LinkModal(props) {
290
292
  return /*#__PURE__*/_react["default"].createElement(_antd.Tabs.TabPane, {
291
293
  key: item.linkTypeCode,
292
294
  tab: item.linkTypeName
293
- }, item.linkTypeCode === 'Category' && /*#__PURE__*/_react["default"].createElement(_CatgTable["default"], {
295
+ }, item.linkTypeCode === 'StoreCategory' && /*#__PURE__*/_react["default"].createElement(_StoreCatgTable["default"], {
296
+ onChange: function onChange(value) {
297
+ setLinkUrl(value);
298
+ }
299
+ }), item.linkTypeCode === 'Category' && /*#__PURE__*/_react["default"].createElement(_CatgTable["default"], {
294
300
  onChange: function onChange(value) {
295
301
  return setLinkUrl(value);
296
302
  }
@@ -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: 80px 28px 0;
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: 1.6rem 0.56rem 0;
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
+ }