@fonixtree/magic-design 2.0.174 → 2.0.177
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/magic-box-iconfont.css +10 -6
- package/es/assets/fonts/magic-box-iconfont.css.bak +59 -3
- package/es/assets/fonts/magic-box-iconfont.js +1 -1
- package/es/assets/fonts/magic-box-iconfont.js.bak +1 -1
- package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/es/common/LinkModal/BizType/index.js +274 -0
- package/es/common/LinkModal/index.js +7 -0
- package/es/composite-comp/common/components/MonpayProductItem/index.js +17 -1
- package/es/composite-comp/common/components/MonpayProductItem/index.less +13 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.js +2 -10
- package/es/composite-comp/public/components/Location/mobile/index.js +3 -208
- package/es/composite-comp/public/components/Location/mobile/index.less +0 -30
- package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.js +16 -40
- package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.less +1 -1
- package/es/composite-comp/public/components/Stores/mobile/index.js +209 -69
- package/es/locale/ar/ar.json +1 -0
- package/es/locale/en/en.json +1 -0
- package/es/locale/es/es.json +1 -0
- package/es/locale/mn/mn.json +1 -0
- package/lib/assets/fonts/magic-box-iconfont.css +10 -6
- package/lib/assets/fonts/magic-box-iconfont.css.bak +59 -3
- package/lib/assets/fonts/magic-box-iconfont.js +1 -1
- package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
- package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/lib/common/LinkModal/BizType/index.js +274 -0
- package/lib/common/LinkModal/index.js +7 -0
- package/lib/composite-comp/common/components/MonpayProductItem/index.js +17 -1
- package/lib/composite-comp/common/components/MonpayProductItem/index.less +13 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.js +2 -10
- package/lib/composite-comp/public/components/Location/mobile/index.js +3 -208
- package/lib/composite-comp/public/components/Location/mobile/index.less +0 -30
- package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.js +16 -40
- package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.less +1 -1
- package/lib/composite-comp/public/components/Stores/mobile/index.js +209 -69
- package/lib/locale/ar/ar.json +1 -0
- package/lib/locale/en/en.json +1 -0
- package/lib/locale/es/es.json +1 -0
- package/lib/locale/mn/mn.json +1 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,274 @@
|
|
|
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"] = AffiliatePlatform;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _antd = require("antd4");
|
|
13
|
+
|
|
14
|
+
var _locale = require("../../../locale");
|
|
15
|
+
|
|
16
|
+
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); }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
21
|
+
__assign = Object.assign || function (t) {
|
|
22
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
23
|
+
s = arguments[i];
|
|
24
|
+
|
|
25
|
+
for (var p in s) {
|
|
26
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return t;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return __assign.apply(this, arguments);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) {
|
|
38
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
39
|
+
resolve(value);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
+
function fulfilled(value) {
|
|
45
|
+
try {
|
|
46
|
+
step(generator.next(value));
|
|
47
|
+
} catch (e) {
|
|
48
|
+
reject(e);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function rejected(value) {
|
|
53
|
+
try {
|
|
54
|
+
step(generator["throw"](value));
|
|
55
|
+
} catch (e) {
|
|
56
|
+
reject(e);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function step(result) {
|
|
61
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
69
|
+
var _ = {
|
|
70
|
+
label: 0,
|
|
71
|
+
sent: function sent() {
|
|
72
|
+
if (t[0] & 1) throw t[1];
|
|
73
|
+
return t[1];
|
|
74
|
+
},
|
|
75
|
+
trys: [],
|
|
76
|
+
ops: []
|
|
77
|
+
},
|
|
78
|
+
f,
|
|
79
|
+
y,
|
|
80
|
+
t,
|
|
81
|
+
g;
|
|
82
|
+
return g = {
|
|
83
|
+
next: verb(0),
|
|
84
|
+
"throw": verb(1),
|
|
85
|
+
"return": verb(2)
|
|
86
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
87
|
+
return this;
|
|
88
|
+
}), g;
|
|
89
|
+
|
|
90
|
+
function verb(n) {
|
|
91
|
+
return function (v) {
|
|
92
|
+
return step([n, v]);
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function step(op) {
|
|
97
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
98
|
+
|
|
99
|
+
while (_) {
|
|
100
|
+
try {
|
|
101
|
+
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;
|
|
102
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
103
|
+
|
|
104
|
+
switch (op[0]) {
|
|
105
|
+
case 0:
|
|
106
|
+
case 1:
|
|
107
|
+
t = op;
|
|
108
|
+
break;
|
|
109
|
+
|
|
110
|
+
case 4:
|
|
111
|
+
_.label++;
|
|
112
|
+
return {
|
|
113
|
+
value: op[1],
|
|
114
|
+
done: false
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
case 5:
|
|
118
|
+
_.label++;
|
|
119
|
+
y = op[1];
|
|
120
|
+
op = [0];
|
|
121
|
+
continue;
|
|
122
|
+
|
|
123
|
+
case 7:
|
|
124
|
+
op = _.ops.pop();
|
|
125
|
+
|
|
126
|
+
_.trys.pop();
|
|
127
|
+
|
|
128
|
+
continue;
|
|
129
|
+
|
|
130
|
+
default:
|
|
131
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
132
|
+
_ = 0;
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
137
|
+
_.label = op[1];
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
142
|
+
_.label = t[1];
|
|
143
|
+
t = op;
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (t && _.label < t[2]) {
|
|
148
|
+
_.label = t[2];
|
|
149
|
+
|
|
150
|
+
_.ops.push(op);
|
|
151
|
+
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (t[2]) _.ops.pop();
|
|
156
|
+
|
|
157
|
+
_.trys.pop();
|
|
158
|
+
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
op = body.call(thisArg, _);
|
|
163
|
+
} catch (e) {
|
|
164
|
+
op = [6, e];
|
|
165
|
+
y = 0;
|
|
166
|
+
} finally {
|
|
167
|
+
f = t = 0;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
if (op[0] & 5) throw op[1];
|
|
172
|
+
return {
|
|
173
|
+
value: op[0] ? op[1] : void 0,
|
|
174
|
+
done: true
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
var paginationParams = {
|
|
180
|
+
pageSize: 50,
|
|
181
|
+
pageIndex: 1
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
function AffiliatePlatform(props) {
|
|
185
|
+
var _this = this;
|
|
186
|
+
|
|
187
|
+
var _onChange = props.onChange,
|
|
188
|
+
_fetch = props._fetch;
|
|
189
|
+
|
|
190
|
+
var _a = (0, _react.useState)([]),
|
|
191
|
+
list = _a[0],
|
|
192
|
+
setList = _a[1];
|
|
193
|
+
|
|
194
|
+
var _b = (0, _react.useState)(false),
|
|
195
|
+
loading = _b[0],
|
|
196
|
+
setLoading = _b[1];
|
|
197
|
+
|
|
198
|
+
var queryBizType = function queryBizType(params) {
|
|
199
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
200
|
+
var res;
|
|
201
|
+
return __generator(this, function (_a) {
|
|
202
|
+
switch (_a.label) {
|
|
203
|
+
case 0:
|
|
204
|
+
setLoading(true);
|
|
205
|
+
return [4
|
|
206
|
+
/*yield*/
|
|
207
|
+
, _fetch("/designer/v1/" + window.magicDesign.MBaseUrl + "/biztype/list", params, 'GET')];
|
|
208
|
+
|
|
209
|
+
case 1:
|
|
210
|
+
res = _a.sent();
|
|
211
|
+
paginationParams.total = 50;
|
|
212
|
+
setList(res || []);
|
|
213
|
+
setLoading(false);
|
|
214
|
+
return [2
|
|
215
|
+
/*return*/
|
|
216
|
+
];
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
(0, _react.useEffect)(function () {
|
|
223
|
+
queryBizType(paginationParams);
|
|
224
|
+
}, []);
|
|
225
|
+
var columns = [{
|
|
226
|
+
title: (0, _locale.i18n)('NAME'),
|
|
227
|
+
dataIndex: 'bizTypeName'
|
|
228
|
+
}, {
|
|
229
|
+
title: (0, _locale.i18n)('LOGO'),
|
|
230
|
+
dataIndex: 'logo',
|
|
231
|
+
render: function render(val) {
|
|
232
|
+
return /*#__PURE__*/_react["default"].createElement("img", {
|
|
233
|
+
alt: "",
|
|
234
|
+
src: val.url,
|
|
235
|
+
style: {
|
|
236
|
+
maxWidth: '50px',
|
|
237
|
+
maxHeight: '50px'
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
}];
|
|
242
|
+
var rowSelection = {
|
|
243
|
+
onChange: function onChange(selectedRowKeys, selectedRow) {
|
|
244
|
+
_onChange({
|
|
245
|
+
value: selectedRow[0].storeBizTypeId,
|
|
246
|
+
name: selectedRow[0].bizTypeName
|
|
247
|
+
});
|
|
248
|
+
},
|
|
249
|
+
type: 'radio'
|
|
250
|
+
};
|
|
251
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
252
|
+
style: {
|
|
253
|
+
height: 450
|
|
254
|
+
}
|
|
255
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Table, {
|
|
256
|
+
bordered: false,
|
|
257
|
+
columns: columns,
|
|
258
|
+
dataSource: list,
|
|
259
|
+
defaultExpandAllRows: true,
|
|
260
|
+
loading: loading,
|
|
261
|
+
pagination: __assign(__assign({}, paginationParams), {
|
|
262
|
+
onChange: function onChange(page) {
|
|
263
|
+
paginationParams.pageIndex = page;
|
|
264
|
+
queryBizType(paginationParams);
|
|
265
|
+
},
|
|
266
|
+
showSizeChanger: false
|
|
267
|
+
}),
|
|
268
|
+
rowKey: "storeBizTypeId",
|
|
269
|
+
rowSelection: rowSelection,
|
|
270
|
+
scroll: {
|
|
271
|
+
y: 350
|
|
272
|
+
}
|
|
273
|
+
}));
|
|
274
|
+
}
|
|
@@ -53,6 +53,8 @@ var _MerchantStory = _interopRequireDefault(require("./MerchantStory"));
|
|
|
53
53
|
|
|
54
54
|
var _MissionDetail = _interopRequireDefault(require("./MissionDetail"));
|
|
55
55
|
|
|
56
|
+
var _BizType = _interopRequireDefault(require("./BizType"));
|
|
57
|
+
|
|
56
58
|
var _locale = require("../../locale");
|
|
57
59
|
|
|
58
60
|
var _commonUtil = require("../../utils/commonUtil");
|
|
@@ -442,6 +444,11 @@ var LinkModal = function LinkModal(props) {
|
|
|
442
444
|
onChange: function onChange(value) {
|
|
443
445
|
return setLinkUrl(value);
|
|
444
446
|
}
|
|
447
|
+
}), selected === 'Business Type' && /*#__PURE__*/_react["default"].createElement(_BizType["default"], {
|
|
448
|
+
_fetch: _fetch,
|
|
449
|
+
onChange: function onChange(value) {
|
|
450
|
+
return setLinkUrl(value);
|
|
451
|
+
}
|
|
445
452
|
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
446
453
|
className: "footer"
|
|
447
454
|
}, selected === 'FilteredProduct' ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -146,6 +146,15 @@ function (_super) {
|
|
|
146
146
|
if (imgWidth) imgStyle.width = imgWidth;
|
|
147
147
|
if (imgHeight) imgStyle.height = imgHeight;
|
|
148
148
|
var soldNumber = data.salesCnt > 250 ? "" + (data.salesCnt - data.salesCnt % 250) : data.salesCnt || 0;
|
|
149
|
+
var isGift = false;
|
|
150
|
+
|
|
151
|
+
if (data.promotType && data.promotType !== '[]') {
|
|
152
|
+
// 赠品
|
|
153
|
+
if (data.promotType.includes('G')) {
|
|
154
|
+
isGift = true;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
149
158
|
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
150
159
|
className: (0, _classnames["default"])('monpay-product-item-wrap', {
|
|
151
160
|
fixHeight: fixHeight,
|
|
@@ -164,7 +173,14 @@ function (_super) {
|
|
|
164
173
|
lazy: true,
|
|
165
174
|
src: (0, _commonUtil.convertImageUrl)(data.productImg || data.imgUrlContent || data.productImageUrlContent),
|
|
166
175
|
style: imgStyle
|
|
167
|
-
}),
|
|
176
|
+
}), isGift && /*#__PURE__*/_react["default"].createElement("div", {
|
|
177
|
+
className: "discount-tag giftL-tag"
|
|
178
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
179
|
+
className: "icon",
|
|
180
|
+
color: "#fff",
|
|
181
|
+
size: 18,
|
|
182
|
+
type: "icon-a-EssentionalUI"
|
|
183
|
+
}), /*#__PURE__*/_react["default"].createElement("span", null, (0, _locale.i18n)('GIFT'))), ((_a = panelProps.label) === null || _a === void 0 ? void 0 : _a.open) && data.discountPercent && !isGift && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
168
184
|
className: "discount-tag",
|
|
169
185
|
data: __assign(__assign({}, panelProps.label), {
|
|
170
186
|
text: isWill ? (0, _locale.i18n)('COMING_SOON') : data.discountPercent + "% " + (0, _locale.i18n)('OFF')
|
|
@@ -30,6 +30,19 @@
|
|
|
30
30
|
top: 15px;
|
|
31
31
|
left: 0;
|
|
32
32
|
}
|
|
33
|
+
.giftL-tag {
|
|
34
|
+
font-size: 12px;
|
|
35
|
+
font-weight: 700;
|
|
36
|
+
color: #fff;
|
|
37
|
+
background-color: #FA7373;
|
|
38
|
+
padding: 5px;
|
|
39
|
+
border-radius: 0 5px 5px 0;
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
.icon {
|
|
43
|
+
margin-right: 4px;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
33
46
|
}
|
|
34
47
|
|
|
35
48
|
.content-wrap {
|
package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.js
CHANGED
|
@@ -7,8 +7,6 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var _ButtonConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/ButtonConfig"));
|
|
11
|
-
|
|
12
10
|
var _TextConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/TextConfig"));
|
|
13
11
|
|
|
14
12
|
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
@@ -76,14 +74,8 @@ function (_super) {
|
|
|
76
74
|
name: (0, _locale.i18n)('FILTER'),
|
|
77
75
|
value: null,
|
|
78
76
|
metaOption: panelProps.filter
|
|
79
|
-
}, {
|
|
80
|
-
|
|
81
|
-
name: (0, _locale.i18n)('LABEL'),
|
|
82
|
-
value: /*#__PURE__*/_react["default"].createElement(_ButtonConfig["default"], {
|
|
83
|
-
data: panelProps.label
|
|
84
|
-
}),
|
|
85
|
-
metaOption: panelProps.label
|
|
86
|
-
}, {
|
|
77
|
+
}, // { key: '1', name: i18n('LABEL'), value: <ButtonConfig data={panelProps.label} />, metaOption: panelProps.label },
|
|
78
|
+
{
|
|
87
79
|
key: '2',
|
|
88
80
|
name: (0, _locale.i18n)('PRODUCT_NAME'),
|
|
89
81
|
value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
|
|
@@ -11,20 +11,14 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
|
|
12
12
|
require("./index.less");
|
|
13
13
|
|
|
14
|
-
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
15
|
-
|
|
16
14
|
var _components = require("../../../../../meta-comp/components");
|
|
17
15
|
|
|
18
16
|
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
19
17
|
|
|
20
|
-
var _storeUtil = require("../../../../../utils/storeUtil");
|
|
21
|
-
|
|
22
18
|
var _common = require("../../../../../common");
|
|
23
19
|
|
|
24
20
|
var _locale = require("../../../../../locale");
|
|
25
21
|
|
|
26
|
-
var _product = _interopRequireDefault(require("../../../../../assets/images/common/product.png"));
|
|
27
|
-
|
|
28
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
29
23
|
|
|
30
24
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
@@ -69,149 +63,6 @@ var __assign = void 0 && (void 0).__assign || function () {
|
|
|
69
63
|
return __assign.apply(this, arguments);
|
|
70
64
|
};
|
|
71
65
|
|
|
72
|
-
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
73
|
-
function adopt(value) {
|
|
74
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
75
|
-
resolve(value);
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
80
|
-
function fulfilled(value) {
|
|
81
|
-
try {
|
|
82
|
-
step(generator.next(value));
|
|
83
|
-
} catch (e) {
|
|
84
|
-
reject(e);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function rejected(value) {
|
|
89
|
-
try {
|
|
90
|
-
step(generator["throw"](value));
|
|
91
|
-
} catch (e) {
|
|
92
|
-
reject(e);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function step(result) {
|
|
97
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
105
|
-
var _ = {
|
|
106
|
-
label: 0,
|
|
107
|
-
sent: function sent() {
|
|
108
|
-
if (t[0] & 1) throw t[1];
|
|
109
|
-
return t[1];
|
|
110
|
-
},
|
|
111
|
-
trys: [],
|
|
112
|
-
ops: []
|
|
113
|
-
},
|
|
114
|
-
f,
|
|
115
|
-
y,
|
|
116
|
-
t,
|
|
117
|
-
g;
|
|
118
|
-
return g = {
|
|
119
|
-
next: verb(0),
|
|
120
|
-
"throw": verb(1),
|
|
121
|
-
"return": verb(2)
|
|
122
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
123
|
-
return this;
|
|
124
|
-
}), g;
|
|
125
|
-
|
|
126
|
-
function verb(n) {
|
|
127
|
-
return function (v) {
|
|
128
|
-
return step([n, v]);
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
function step(op) {
|
|
133
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
134
|
-
|
|
135
|
-
while (_) {
|
|
136
|
-
try {
|
|
137
|
-
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;
|
|
138
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
139
|
-
|
|
140
|
-
switch (op[0]) {
|
|
141
|
-
case 0:
|
|
142
|
-
case 1:
|
|
143
|
-
t = op;
|
|
144
|
-
break;
|
|
145
|
-
|
|
146
|
-
case 4:
|
|
147
|
-
_.label++;
|
|
148
|
-
return {
|
|
149
|
-
value: op[1],
|
|
150
|
-
done: false
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
case 5:
|
|
154
|
-
_.label++;
|
|
155
|
-
y = op[1];
|
|
156
|
-
op = [0];
|
|
157
|
-
continue;
|
|
158
|
-
|
|
159
|
-
case 7:
|
|
160
|
-
op = _.ops.pop();
|
|
161
|
-
|
|
162
|
-
_.trys.pop();
|
|
163
|
-
|
|
164
|
-
continue;
|
|
165
|
-
|
|
166
|
-
default:
|
|
167
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
168
|
-
_ = 0;
|
|
169
|
-
continue;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
173
|
-
_.label = op[1];
|
|
174
|
-
break;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
178
|
-
_.label = t[1];
|
|
179
|
-
t = op;
|
|
180
|
-
break;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
if (t && _.label < t[2]) {
|
|
184
|
-
_.label = t[2];
|
|
185
|
-
|
|
186
|
-
_.ops.push(op);
|
|
187
|
-
|
|
188
|
-
break;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
if (t[2]) _.ops.pop();
|
|
192
|
-
|
|
193
|
-
_.trys.pop();
|
|
194
|
-
|
|
195
|
-
continue;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
op = body.call(thisArg, _);
|
|
199
|
-
} catch (e) {
|
|
200
|
-
op = [6, e];
|
|
201
|
-
y = 0;
|
|
202
|
-
} finally {
|
|
203
|
-
f = t = 0;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
if (op[0] & 5) throw op[1];
|
|
208
|
-
return {
|
|
209
|
-
value: op[0] ? op[1] : void 0,
|
|
210
|
-
done: true
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
|
-
|
|
215
66
|
var MerchantSalesMobile =
|
|
216
67
|
/** @class */
|
|
217
68
|
function (_super) {
|
|
@@ -220,55 +71,11 @@ function (_super) {
|
|
|
220
71
|
function MerchantSalesMobile() {
|
|
221
72
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
222
73
|
|
|
223
|
-
_this.state = {
|
|
224
|
-
list: (0, _coreUtil.isDesignMode)() ? [] : (0, _commonUtil.ensure)(function () {
|
|
225
|
-
return (0, _storeUtil.getMagicStore)("merchantSales_" + (window.magicDesign.pageId || '') + "_" + _this.props.panelProps.id);
|
|
226
|
-
}, [])
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
_this.getData = function () {
|
|
230
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
231
|
-
var res, list;
|
|
232
|
-
return __generator(this, function (_a) {
|
|
233
|
-
switch (_a.label) {
|
|
234
|
-
case 0:
|
|
235
|
-
return [4
|
|
236
|
-
/*yield*/
|
|
237
|
-
, (0, _commonUtil.commonFetch)('/designer/v1/h5/offers', {
|
|
238
|
-
pageIndex: 1,
|
|
239
|
-
pageSize: 50,
|
|
240
|
-
qryStorePage: 'Y',
|
|
241
|
-
storeOfferCnt: 0,
|
|
242
|
-
campaignType: '2,14'
|
|
243
|
-
}, 'POST')];
|
|
244
|
-
|
|
245
|
-
case 1:
|
|
246
|
-
res = _a.sent();
|
|
247
|
-
list = (0, _commonUtil.ensure)(function () {
|
|
248
|
-
return res.storePage.list;
|
|
249
|
-
}, []);
|
|
250
|
-
this.setState({
|
|
251
|
-
list: list
|
|
252
|
-
});
|
|
253
|
-
|
|
254
|
-
if (!(0, _coreUtil.isDesignMode)()) {
|
|
255
|
-
(0, _storeUtil.setMagicStore)("merchantSales_" + (window.magicDesign.pageId || '') + "_" + this.props.panelProps.id, list);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
return [2
|
|
259
|
-
/*return*/
|
|
260
|
-
];
|
|
261
|
-
}
|
|
262
|
-
});
|
|
263
|
-
});
|
|
264
|
-
};
|
|
265
|
-
|
|
74
|
+
_this.state = {};
|
|
266
75
|
return _this;
|
|
267
76
|
}
|
|
268
77
|
|
|
269
|
-
MerchantSalesMobile.prototype.componentDidMount = function () {
|
|
270
|
-
this.getData();
|
|
271
|
-
};
|
|
78
|
+
MerchantSalesMobile.prototype.componentDidMount = function () {};
|
|
272
79
|
|
|
273
80
|
MerchantSalesMobile.prototype.render = function () {
|
|
274
81
|
var _a;
|
|
@@ -328,19 +135,7 @@ function (_super) {
|
|
|
328
135
|
color: panelProps.content.arrowIcon.color,
|
|
329
136
|
size: 18,
|
|
330
137
|
type: "icon-chevron-right"
|
|
331
|
-
})))
|
|
332
|
-
className: "list"
|
|
333
|
-
}, [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13].slice(0, 10).map(function (item) {
|
|
334
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
335
|
-
key: item,
|
|
336
|
-
className: "item"
|
|
337
|
-
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
338
|
-
alt: "",
|
|
339
|
-
src: _product["default"]
|
|
340
|
-
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
341
|
-
className: "one_row no-reversed"
|
|
342
|
-
}, "Supermarkets"));
|
|
343
|
-
})));
|
|
138
|
+
}))));
|
|
344
139
|
};
|
|
345
140
|
|
|
346
141
|
MerchantSalesMobile.defaultProps = {
|
|
@@ -47,36 +47,6 @@
|
|
|
47
47
|
text-align: left;
|
|
48
48
|
max-width: 80%;
|
|
49
49
|
}
|
|
50
|
-
.m-location-mobile .list {
|
|
51
|
-
margin: 0.4rem 0.4rem 0 0.4rem;
|
|
52
|
-
display: flex;
|
|
53
|
-
justify-content: center;
|
|
54
|
-
gap: 0.38rem;
|
|
55
|
-
flex-wrap: wrap;
|
|
56
|
-
max-height: 3.1rem;
|
|
57
|
-
overflow: hidden;
|
|
58
|
-
}
|
|
59
|
-
.m-location-mobile .list .item {
|
|
60
|
-
display: inline-block;
|
|
61
|
-
width: 1rem;
|
|
62
|
-
background: url('./img/img-circle.png');
|
|
63
|
-
background-repeat: no-repeat;
|
|
64
|
-
background-size: 100%;
|
|
65
|
-
}
|
|
66
|
-
.m-location-mobile .list .item > img {
|
|
67
|
-
display: inline-block;
|
|
68
|
-
width: 1rem;
|
|
69
|
-
height: 1rem;
|
|
70
|
-
border-radius: 50%;
|
|
71
|
-
}
|
|
72
|
-
.m-location-mobile .list .item > span {
|
|
73
|
-
font-weight: 400;
|
|
74
|
-
font-size: 0.16rem;
|
|
75
|
-
color: #000;
|
|
76
|
-
max-width: 1rem;
|
|
77
|
-
display: block;
|
|
78
|
-
margin-top: 0.1rem;
|
|
79
|
-
}
|
|
80
50
|
.m-location-mobile.reversed-layout .search-input {
|
|
81
51
|
margin-right: 0;
|
|
82
52
|
margin-left: 0.32rem;
|