@fonixtree/magic-design 0.1.45 → 0.1.47
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.
- package/es/assets/fonts/.DS_Store +0 -0
- package/es/common/LinkModal/StoreCatgTable/index.js +244 -0
- package/es/common/LinkModal/index.js +7 -1
- package/es/composite-comp/bol/components/Banner/mobile/index.less +52 -78
- package/es/composite-comp/bol/components/Carousel/mobile/index.less +81 -100
- package/es/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -22
- package/es/composite-comp/bol/components/ImageText/mobile/index.less +233 -292
- package/es/composite-comp/bol/components/Video/mobile/Layout1/index.less +23 -27
- package/es/composite-comp/bol/components/Video/mobile/Layout2/index.less +38 -45
- package/es/composite-comp/bol/components/Video/mobile/Layout3/index.less +41 -50
- package/es/composite-comp/bol/components/Video/mobile/index.less +2 -3
- package/es/composite-comp/bol/components/Wallet/mobile/index.less +27 -40
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +83 -97
- package/es/composite-comp/dito/components/MobileNavigation/mobile/index.less +18 -35
- package/es/composite-comp/dito/components/Recommend/mobile/index.less +73 -86
- package/es/composite-comp/dito/components/SearchBar/mobile/index.less +45 -52
- package/es/composite-comp/dito/components/SignBoard/mobile/index.less +76 -80
- package/es/constants/index.js +1 -0
- package/es/utils/businessUtil.js +21 -5
- package/es/utils/commonUtil.js +2 -3
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/common/LinkModal/StoreCatgTable/index.js +244 -0
- package/lib/common/LinkModal/index.js +7 -1
- package/lib/composite-comp/bol/components/Banner/mobile/index.less +52 -78
- package/lib/composite-comp/bol/components/Carousel/mobile/index.less +81 -100
- package/lib/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -22
- package/lib/composite-comp/bol/components/ImageText/mobile/index.less +233 -292
- package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.less +23 -27
- package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.less +38 -45
- package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.less +41 -50
- package/lib/composite-comp/bol/components/Video/mobile/index.less +2 -3
- package/lib/composite-comp/bol/components/Wallet/mobile/index.less +27 -40
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +83 -97
- package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.less +18 -35
- package/lib/composite-comp/dito/components/Recommend/mobile/index.less +73 -86
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +45 -52
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.less +76 -80
- package/lib/constants/index.js +1 -0
- package/lib/utils/businessUtil.js +21 -5
- package/lib/utils/commonUtil.js +2 -3
- package/package.json +1 -1
|
@@ -1,58 +1,51 @@
|
|
|
1
1
|
.m-search-bar {
|
|
2
|
-
height:
|
|
3
|
-
padding:
|
|
2
|
+
height: 0.96rem;
|
|
3
|
+
padding: 0.16rem 0;
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: row-reverse;
|
|
6
6
|
align-items: center;
|
|
7
7
|
justify-content: space-between;
|
|
8
8
|
width: 100%;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
.logo {
|
|
54
|
-
img {
|
|
55
|
-
width: auto;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
9
|
+
}
|
|
10
|
+
.m-search-bar .right {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex: 1;
|
|
13
|
+
margin-left: 0.3rem;
|
|
14
|
+
align-items: center;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
}
|
|
17
|
+
.m-search-bar .right .search-input-wrap {
|
|
18
|
+
flex: 1;
|
|
19
|
+
background: #fff;
|
|
20
|
+
border-radius: 0.08rem;
|
|
21
|
+
border: 0.02rem solid #D2D9E5;
|
|
22
|
+
padding: 0.08rem 0.24rem;
|
|
23
|
+
height: 0.64rem;
|
|
24
|
+
text-align: right;
|
|
25
|
+
display: flex;
|
|
26
|
+
justify-content: flex-end;
|
|
27
|
+
}
|
|
28
|
+
.m-search-bar .right .message-wrap {
|
|
29
|
+
position: relative;
|
|
30
|
+
margin-left: 0.2rem;
|
|
31
|
+
}
|
|
32
|
+
.m-search-bar .right .message-wrap .num {
|
|
33
|
+
position: absolute;
|
|
34
|
+
top: -0.12rem;
|
|
35
|
+
right: -0.12rem;
|
|
36
|
+
display: inline-block;
|
|
37
|
+
padding: 0.02rem 0.04rem;
|
|
38
|
+
min-width: 0.34rem;
|
|
39
|
+
text-align: center;
|
|
40
|
+
background-color: #CE1126;
|
|
41
|
+
border: 0.02rem solid #fff;
|
|
42
|
+
border-radius: 0.16rem;
|
|
43
|
+
font-family: 'Montserrat';
|
|
44
|
+
font-style: normal;
|
|
45
|
+
font-weight: 600;
|
|
46
|
+
font-size: 0.16rem;
|
|
47
|
+
color: #FFFFFF;
|
|
48
|
+
}
|
|
49
|
+
.m-search-bar .logo img {
|
|
50
|
+
width: auto;
|
|
51
|
+
}
|
|
@@ -1,82 +1,78 @@
|
|
|
1
1
|
.m-sign-board-bar {
|
|
2
2
|
width: 100%;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
}
|
|
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
|
+
}
|
|
65
|
+
.m-sign-board-bar .store-info-wrap .store-logo {
|
|
66
|
+
width: 0.88rem;
|
|
67
|
+
height: 0.88rem;
|
|
68
|
+
border-radius: 50%;
|
|
69
|
+
}
|
|
70
|
+
.m-sign-board-bar .store-info-wrap .store-name {
|
|
71
|
+
flex: 1;
|
|
72
|
+
margin-left: 0.24rem;
|
|
73
|
+
font-weight: 500;
|
|
74
|
+
font-size: 0.32rem;
|
|
75
|
+
line-height: 0.4rem;
|
|
76
|
+
color: #070707;
|
|
77
|
+
font-family: 'Montserrat';
|
|
78
|
+
}
|
package/es/constants/index.js
CHANGED
package/es/utils/businessUtil.js
CHANGED
|
@@ -49,6 +49,18 @@ var newParseUrl = function newParseUrl(urlObj) {
|
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
break;
|
|
52
|
+
|
|
53
|
+
case _constants.urlTypeMap.STORE_CATEGORY:
|
|
54
|
+
// 商品列表
|
|
55
|
+
link = "/product/list/?storeCategory=" + value;
|
|
56
|
+
params = {
|
|
57
|
+
action: 'jump',
|
|
58
|
+
params: {
|
|
59
|
+
type: 'STORE_CATEGORY',
|
|
60
|
+
catgId: value
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
break;
|
|
52
64
|
// 海报页面
|
|
53
65
|
|
|
54
66
|
case _constants.urlTypeMap.CUSTOMIZED_PAGE:
|
|
@@ -316,13 +328,17 @@ var renderPreview = function renderPreview() {
|
|
|
316
328
|
|
|
317
329
|
exports.renderPreview = renderPreview;
|
|
318
330
|
|
|
319
|
-
var listToTree = function listToTree(list) {
|
|
331
|
+
var listToTree = function listToTree(list, idName) {
|
|
332
|
+
if (idName === void 0) {
|
|
333
|
+
idName = 'catgId';
|
|
334
|
+
}
|
|
335
|
+
|
|
320
336
|
var map = {};
|
|
321
337
|
var node;
|
|
322
338
|
var tree = [];
|
|
323
339
|
|
|
324
340
|
for (var i = 0; i < list.length; i++) {
|
|
325
|
-
map[list[i]
|
|
341
|
+
map[list[i][idName]] = list[i];
|
|
326
342
|
list[i].children = list[i].isLeaf == 0 ? null : [];
|
|
327
343
|
}
|
|
328
344
|
|
|
@@ -330,8 +346,8 @@ var listToTree = function listToTree(list) {
|
|
|
330
346
|
node = {
|
|
331
347
|
catgName: list[i].catgName,
|
|
332
348
|
title: list[i].catgName,
|
|
333
|
-
value: list[i]
|
|
334
|
-
key: list[i]
|
|
349
|
+
value: list[i][idName],
|
|
350
|
+
key: list[i][idName],
|
|
335
351
|
children: list[i].children
|
|
336
352
|
};
|
|
337
353
|
|
|
@@ -350,7 +366,7 @@ exports.listToTree = listToTree;
|
|
|
350
366
|
|
|
351
367
|
var getPromotionList = function getPromotionList(offer) {
|
|
352
368
|
var PROMOTION_TYPE_MAP = {
|
|
353
|
-
2: '
|
|
369
|
+
2: 'FLASH',
|
|
354
370
|
4: 'Group',
|
|
355
371
|
C: 'Discount',
|
|
356
372
|
D: 'Discount',
|
package/es/utils/commonUtil.js
CHANGED
|
@@ -211,10 +211,9 @@ function commonFetch(url, data, method) {
|
|
|
211
211
|
return new Promise(function (resolve, reject) {
|
|
212
212
|
var _a, _b;
|
|
213
213
|
|
|
214
|
-
var isLoginUrl = url.includes('portal/login');
|
|
215
214
|
var credentials = localStorage.getItem('credentials');
|
|
216
215
|
var headers = {
|
|
217
|
-
'Content-Type':
|
|
216
|
+
'Content-Type': 'application/json; charset=UTF-8',
|
|
218
217
|
credentials: credentials
|
|
219
218
|
};
|
|
220
219
|
|
|
@@ -254,7 +253,7 @@ function commonFetch(url, data, method) {
|
|
|
254
253
|
return;
|
|
255
254
|
}
|
|
256
255
|
|
|
257
|
-
_axios["default"].post(url,
|
|
256
|
+
_axios["default"].post(url, data, {
|
|
258
257
|
headers: headers
|
|
259
258
|
}).then(function (res) {
|
|
260
259
|
resolve(res.data);
|
|
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 === '
|
|
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
|
}
|