@fonixtree/magic-design 2.0.84 → 2.0.86
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/common/CountDown/index.js +20 -11
- package/es/common/CropperModal/index.js +126 -0
- package/es/common/CropperModal/index.less +29 -0
- package/es/common/GroupList/index.js +2 -0
- package/es/common/LinkModal/AffiliateStore/index.js +332 -0
- package/es/common/LinkModal/index.js +6 -0
- package/es/common/UrlPicker/index.js +1 -10
- package/es/common/index.js +8 -0
- package/es/composite-comp/dito/components/CommonFunctions/defaultJSON.js +8 -4
- package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +6 -4
- package/es/composite-comp/dito/components/CommonFunctions/mobile/index.less +2 -2
- package/es/composite-comp/dito/components/Orders/defaultJSON.js +2 -2
- package/es/composite-comp/dito/components/Orders/mobile/index.js +17 -8
- package/es/composite-comp/dito/components/Orders/mobile/index.less +2 -6
- package/es/composite-comp/dito/components/PersonalInformation/defaultJSON.js +1 -1
- package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +147 -11
- package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +26 -20
- package/es/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +4 -1
- package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +1 -2
- package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +4 -4
- package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +2 -2
- package/es/constants/index.js +3 -3
- package/es/core/Designer/ToolBarModal/index.js +5 -1
- package/es/core/Renderer/index.js +3 -1
- package/es/decorator/compositeDecorator.js +9 -5
- package/es/locale/en/en.json +5 -5
- package/es/locale/es/es.json +5 -5
- package/es/locale/id/id.json +5 -5
- package/es/meta-comp/config-panels/TextConfig/index.js +1 -1
- package/es/utils/commonUtil.js +12 -5
- package/es/utils/coreUtil.js +3 -2
- package/lib/common/CountDown/index.js +20 -11
- package/lib/common/CropperModal/index.js +126 -0
- package/lib/common/CropperModal/index.less +29 -0
- package/lib/common/GroupList/index.js +2 -0
- package/lib/common/LinkModal/AffiliateStore/index.js +332 -0
- package/lib/common/LinkModal/index.js +6 -0
- package/lib/common/UrlPicker/index.js +1 -10
- package/lib/common/index.js +8 -0
- package/lib/composite-comp/dito/components/CommonFunctions/defaultJSON.js +8 -4
- package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +6 -4
- package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.less +2 -2
- package/lib/composite-comp/dito/components/Orders/defaultJSON.js +2 -2
- package/lib/composite-comp/dito/components/Orders/mobile/index.js +17 -8
- package/lib/composite-comp/dito/components/Orders/mobile/index.less +2 -6
- package/lib/composite-comp/dito/components/PersonalInformation/defaultJSON.js +1 -1
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +147 -11
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +26 -20
- package/lib/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +4 -1
- package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +1 -2
- package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +4 -4
- package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +2 -2
- package/lib/constants/index.js +3 -3
- package/lib/core/Designer/ToolBarModal/index.js +5 -1
- package/lib/core/Renderer/index.js +3 -1
- package/lib/decorator/compositeDecorator.js +9 -5
- package/lib/locale/en/en.json +5 -5
- package/lib/locale/es/es.json +5 -5
- package/lib/locale/id/id.json +5 -5
- package/lib/meta-comp/config-panels/TextConfig/index.js +1 -1
- package/lib/utils/commonUtil.js +12 -5
- package/lib/utils/coreUtil.js +3 -2
- package/package.json +2 -1
- package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +0 -1
- package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +0 -1
|
@@ -37,6 +37,8 @@ var _StoreCatgTable = _interopRequireDefault(require("./StoreCatgTable"));
|
|
|
37
37
|
|
|
38
38
|
var _AffiliateProductTable = _interopRequireDefault(require("./AffiliateProductTable"));
|
|
39
39
|
|
|
40
|
+
var _AffiliateStore = _interopRequireDefault(require("./AffiliateStore"));
|
|
41
|
+
|
|
40
42
|
var _locale = require("../../locale");
|
|
41
43
|
|
|
42
44
|
var _commonUtil = require("../../utils/commonUtil");
|
|
@@ -359,6 +361,10 @@ var LinkModal = function LinkModal(props) {
|
|
|
359
361
|
onChange: function onChange(value) {
|
|
360
362
|
return setLinkUrl(value);
|
|
361
363
|
}
|
|
364
|
+
}), item.linkTypeCode === 'AffiliateStore' && /*#__PURE__*/_react["default"].createElement(_AffiliateStore["default"], {
|
|
365
|
+
onChange: function onChange(value) {
|
|
366
|
+
return setLinkUrl(value);
|
|
367
|
+
}
|
|
362
368
|
}));
|
|
363
369
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
364
370
|
className: "footer"
|
|
@@ -117,16 +117,7 @@ function (_super) {
|
|
|
117
117
|
value: inputName
|
|
118
118
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
119
119
|
className: "icon-btns"
|
|
120
|
-
}, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
121
|
-
color: "#000",
|
|
122
|
-
onClick: function onClick() {
|
|
123
|
-
return _this.setState({
|
|
124
|
-
anchorModalVisible: true
|
|
125
|
-
});
|
|
126
|
-
},
|
|
127
|
-
size: "20px",
|
|
128
|
-
type: "icon-anchor"
|
|
129
|
-
}), window.magicDesign.outputType != 'html' && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
120
|
+
}, window.magicDesign.outputType != 'html' && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
130
121
|
color: "#000",
|
|
131
122
|
onClick: function onClick() {
|
|
132
123
|
return _this.setState({
|
package/lib/common/index.js
CHANGED
|
@@ -39,6 +39,12 @@ Object.defineProperty(exports, "ColorPickerInput", {
|
|
|
39
39
|
return _ColorPickerInput["default"];
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
+
Object.defineProperty(exports, "CropperModal", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function get() {
|
|
45
|
+
return _CropperModal["default"];
|
|
46
|
+
}
|
|
47
|
+
});
|
|
42
48
|
Object.defineProperty(exports, "Field", {
|
|
43
49
|
enumerable: true,
|
|
44
50
|
get: function get() {
|
|
@@ -188,4 +194,6 @@ var _CardCarousel = _interopRequireDefault(require("./CardCarousel"));
|
|
|
188
194
|
|
|
189
195
|
var _MyModal = _interopRequireDefault(require("./MyModal"));
|
|
190
196
|
|
|
197
|
+
var _CropperModal = _interopRequireDefault(require("./CropperModal"));
|
|
198
|
+
|
|
191
199
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -7,7 +7,7 @@ exports.getDefaultJSON = exports.CommonFunctionsGroupSourceJSON = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _uuid = require("uuid");
|
|
9
9
|
|
|
10
|
-
var CommonFunctionsGroupSourceJSON = function CommonFunctionsGroupSourceJSON(text) {
|
|
10
|
+
var CommonFunctionsGroupSourceJSON = function CommonFunctionsGroupSourceJSON(text, url) {
|
|
11
11
|
var groupId = (0, _uuid.v4)();
|
|
12
12
|
return {
|
|
13
13
|
id: groupId,
|
|
@@ -17,7 +17,7 @@ var CommonFunctionsGroupSourceJSON = function CommonFunctionsGroupSourceJSON(tex
|
|
|
17
17
|
open: true,
|
|
18
18
|
type: 'TEXT',
|
|
19
19
|
specialContent: [],
|
|
20
|
-
text: text || '
|
|
20
|
+
text: text || 'Chat With Us',
|
|
21
21
|
content: {
|
|
22
22
|
sizeType: 'Customize font styles',
|
|
23
23
|
fontFamily: 'Open Sans',
|
|
@@ -25,7 +25,11 @@ var CommonFunctionsGroupSourceJSON = function CommonFunctionsGroupSourceJSON(tex
|
|
|
25
25
|
fontSize: 14,
|
|
26
26
|
color: '#2C2C2C',
|
|
27
27
|
width: 0,
|
|
28
|
-
textAlign: 'center'
|
|
28
|
+
textAlign: 'center',
|
|
29
|
+
clickUrl: {
|
|
30
|
+
name: url,
|
|
31
|
+
value: url
|
|
32
|
+
}
|
|
29
33
|
},
|
|
30
34
|
underline: {
|
|
31
35
|
open: false,
|
|
@@ -63,7 +67,7 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
63
67
|
return {
|
|
64
68
|
id: (0, _uuid.v4)(),
|
|
65
69
|
type: 'COMMON_FUNCTIONS',
|
|
66
|
-
groupSource: [CommonFunctionsGroupSourceJSON('Address'), CommonFunctionsGroupSourceJSON('Policies'), CommonFunctionsGroupSourceJSON('Security Center'), CommonFunctionsGroupSourceJSON('
|
|
70
|
+
groupSource: [CommonFunctionsGroupSourceJSON('Address', '/address/manage'), CommonFunctionsGroupSourceJSON('Policies', '/account/policies'), CommonFunctionsGroupSourceJSON('Security Center', '/account/security'), CommonFunctionsGroupSourceJSON('Chat With Us', '/new-chat')],
|
|
67
71
|
spacing: {
|
|
68
72
|
pc: {
|
|
69
73
|
paddingTop: 0,
|
|
@@ -56,10 +56,12 @@ function (_super) {
|
|
|
56
56
|
_this.state = {};
|
|
57
57
|
|
|
58
58
|
_this.onItemClick = function (item) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
if ((0, _commonUtil.checkLogin)(true, '/main/account')) {
|
|
60
|
+
var url = (0, _commonUtil.ensure)(function () {
|
|
61
|
+
return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
|
|
62
|
+
}, '');
|
|
63
|
+
(0, _commonUtil.navigateTo)(url);
|
|
64
|
+
}
|
|
63
65
|
};
|
|
64
66
|
|
|
65
67
|
return _this;
|
|
@@ -54,7 +54,7 @@ var OrdersGroupSourceJSON = function OrdersGroupSourceJSON(text) {
|
|
|
54
54
|
h5ImgHoverUrl: ''
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
-
sourceType:
|
|
57
|
+
sourceType: text
|
|
58
58
|
};
|
|
59
59
|
};
|
|
60
60
|
|
|
@@ -64,7 +64,7 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
64
64
|
return {
|
|
65
65
|
id: (0, _uuid.v4)(),
|
|
66
66
|
type: 'ORDERS',
|
|
67
|
-
groupSource: [OrdersGroupSourceJSON('To Pay'), OrdersGroupSourceJSON('To Ship'), OrdersGroupSourceJSON('To Receive'), OrdersGroupSourceJSON('
|
|
67
|
+
groupSource: [OrdersGroupSourceJSON('To Pay'), OrdersGroupSourceJSON('To Ship'), OrdersGroupSourceJSON('To Receive'), OrdersGroupSourceJSON('Done'), OrdersGroupSourceJSON('Cancelled')],
|
|
68
68
|
spacing: {
|
|
69
69
|
pc: {
|
|
70
70
|
paddingTop: 0,
|
|
@@ -210,13 +210,13 @@ var orderData = {
|
|
|
210
210
|
key: 'toReceiveNum',
|
|
211
211
|
route: '/main/order/3'
|
|
212
212
|
},
|
|
213
|
-
|
|
213
|
+
Done: {
|
|
214
214
|
key: 'toRatingNum',
|
|
215
|
-
route: '/
|
|
215
|
+
route: '/main/order/4'
|
|
216
216
|
},
|
|
217
|
-
|
|
217
|
+
Cancelled: {
|
|
218
218
|
key: 'returnsNum',
|
|
219
|
-
route: '/
|
|
219
|
+
route: '/main/order/5'
|
|
220
220
|
}
|
|
221
221
|
};
|
|
222
222
|
exports.orderData = orderData;
|
|
@@ -234,8 +234,13 @@ function (_super) {
|
|
|
234
234
|
};
|
|
235
235
|
|
|
236
236
|
_this.onItemClick = function (v) {
|
|
237
|
-
var
|
|
238
|
-
|
|
237
|
+
var _a;
|
|
238
|
+
|
|
239
|
+
var routeUrl = (_a = orderData[v]) === null || _a === void 0 ? void 0 : _a.route;
|
|
240
|
+
var selfUrl = (0, _commonUtil.ensure)(function () {
|
|
241
|
+
return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
|
|
242
|
+
}, '');
|
|
243
|
+
(0, _commonUtil.navigateTo)(routeUrl || selfUrl);
|
|
239
244
|
};
|
|
240
245
|
|
|
241
246
|
_this.getInit = function () {
|
|
@@ -266,7 +271,9 @@ function (_super) {
|
|
|
266
271
|
|
|
267
272
|
_this.getImageHtml = function (item) {
|
|
268
273
|
var orderStatus = _this.state.orderStatus;
|
|
269
|
-
var num =
|
|
274
|
+
var num = (0, _commonUtil.ensure)(function () {
|
|
275
|
+
return orderStatus[orderData[item.sourceType].key];
|
|
276
|
+
}, '');
|
|
270
277
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
271
278
|
data: item.image,
|
|
272
279
|
maxWidth: "100%"
|
|
@@ -321,7 +328,9 @@ function (_super) {
|
|
|
321
328
|
}, item.image.open && _this.getImageHtml(item)), item.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
322
329
|
className: "title",
|
|
323
330
|
data: item.title,
|
|
324
|
-
|
|
331
|
+
onTextInput: function onTextInput(text) {
|
|
332
|
+
item.title.text = text;
|
|
333
|
+
}
|
|
325
334
|
}));
|
|
326
335
|
}))));
|
|
327
336
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.orders-mobile {
|
|
2
|
-
|
|
2
|
+
padding: 0 0.32rem;
|
|
3
3
|
}
|
|
4
4
|
.orders-mobile .fixed-wrap {
|
|
5
5
|
display: flex;
|
|
@@ -8,11 +8,6 @@
|
|
|
8
8
|
box-shadow: 0 0.06rem 0.12rem rgba(0, 0, 0, 0.16);
|
|
9
9
|
border-radius: 0.32rem;
|
|
10
10
|
width: auto;
|
|
11
|
-
position: absolute;
|
|
12
|
-
z-index: 3;
|
|
13
|
-
left: 0.32rem;
|
|
14
|
-
right: 0.32rem;
|
|
15
|
-
top: -1.4rem;
|
|
16
11
|
padding: 0.32rem;
|
|
17
12
|
}
|
|
18
13
|
.orders-mobile .fixed-wrap .top {
|
|
@@ -44,6 +39,7 @@
|
|
|
44
39
|
display: flex;
|
|
45
40
|
flex-direction: row;
|
|
46
41
|
justify-content: space-between;
|
|
42
|
+
height: 1.32rem;
|
|
47
43
|
margin-top: 0.48rem;
|
|
48
44
|
margin-bottom: 0.02rem;
|
|
49
45
|
}
|
|
@@ -70,7 +70,7 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
70
70
|
login: {
|
|
71
71
|
open: true
|
|
72
72
|
},
|
|
73
|
-
groupSource: [PersonalInfoGroupSourceJSON('Wishlist'), PersonalInfoGroupSourceJSON('Stores'), PersonalInfoGroupSourceJSON('
|
|
73
|
+
groupSource: [PersonalInfoGroupSourceJSON('Wishlist'), PersonalInfoGroupSourceJSON('Stores'), PersonalInfoGroupSourceJSON('Vouchers'), PersonalInfoGroupSourceJSON('Recently Viewed')],
|
|
74
74
|
spacing: {
|
|
75
75
|
pc: {
|
|
76
76
|
paddingTop: 0,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.setAccountPageValue = exports["default"] = void 0;
|
|
6
|
+
exports.setAccountPageValue = exports.pInfoData = exports["default"] = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -29,6 +29,8 @@ var _index = require("../../../../../constants/index");
|
|
|
29
29
|
|
|
30
30
|
var _storeUtil = require("../../../../../utils/storeUtil");
|
|
31
31
|
|
|
32
|
+
var _common = require("../../../../../common");
|
|
33
|
+
|
|
32
34
|
require("./index.less");
|
|
33
35
|
|
|
34
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -218,7 +220,23 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
|
218
220
|
}
|
|
219
221
|
};
|
|
220
222
|
|
|
223
|
+
var pInfoData = {
|
|
224
|
+
Wishlist: {
|
|
225
|
+
route: '/favourite/list'
|
|
226
|
+
},
|
|
227
|
+
Stores: {
|
|
228
|
+
route: '/collect-store'
|
|
229
|
+
},
|
|
230
|
+
Vouchers: {
|
|
231
|
+
route: '/my-coupon'
|
|
232
|
+
},
|
|
233
|
+
'Recently Viewed': {
|
|
234
|
+
route: '/review-list'
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
exports.pInfoData = pInfoData;
|
|
221
238
|
var LPObj = (0, _storeUtil.getSessionStore)('channelPurchase') || {};
|
|
239
|
+
var currentUser = JSON.parse(localStorage.getItem('currentUser')) || {};
|
|
222
240
|
|
|
223
241
|
var setAccountPageValue = function setAccountPageValue(obj) {
|
|
224
242
|
var accountPageValue = JSON.parse(localStorage.getItem('accountPageValue'));
|
|
@@ -237,7 +255,10 @@ function (_super) {
|
|
|
237
255
|
|
|
238
256
|
_this.state = {
|
|
239
257
|
messageNum: '',
|
|
240
|
-
userInfo:
|
|
258
|
+
userInfo: currentUser,
|
|
259
|
+
loading: false,
|
|
260
|
+
selectedImgFile: {},
|
|
261
|
+
editImgModalVisible: false
|
|
241
262
|
};
|
|
242
263
|
|
|
243
264
|
_this.getNum = function (v) {
|
|
@@ -247,7 +268,7 @@ function (_super) {
|
|
|
247
268
|
return userInfo.userCollectionNum || 0;
|
|
248
269
|
} else if (v === _index.personalInfoType.STORES) {
|
|
249
270
|
return userInfo.userCollectionStoreNum || 0;
|
|
250
|
-
} else if (v === _index.personalInfoType.
|
|
271
|
+
} else if (v === _index.personalInfoType.VOUCHERS) {
|
|
251
272
|
return userInfo.couponNum || 0;
|
|
252
273
|
} else if (v === _index.personalInfoType.VIEWED) {
|
|
253
274
|
return userInfo.recentViewNum || 0;
|
|
@@ -264,8 +285,12 @@ function (_super) {
|
|
|
264
285
|
return;
|
|
265
286
|
}
|
|
266
287
|
|
|
267
|
-
|
|
268
|
-
|
|
288
|
+
_this.hideBottomBar();
|
|
289
|
+
|
|
290
|
+
_this.setState({
|
|
291
|
+
editImgModalVisible: true,
|
|
292
|
+
selectedImgFile: file
|
|
293
|
+
});
|
|
269
294
|
}
|
|
270
295
|
|
|
271
296
|
e.target.value = '';
|
|
@@ -292,7 +317,7 @@ function (_super) {
|
|
|
292
317
|
};
|
|
293
318
|
|
|
294
319
|
_this.goLoginPage = function () {
|
|
295
|
-
if (browserVersion().isApp) {
|
|
320
|
+
if ((0, _androidUtil.browserVersion)().isApp) {
|
|
296
321
|
(0, _androidUtil.goToLoginApp)();
|
|
297
322
|
} else {
|
|
298
323
|
(0, _commonUtil.goLogin)();
|
|
@@ -349,6 +374,101 @@ function (_super) {
|
|
|
349
374
|
});
|
|
350
375
|
};
|
|
351
376
|
|
|
377
|
+
_this.modifyPhoto = function (params) {
|
|
378
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
379
|
+
return __generator(this, function (_a) {
|
|
380
|
+
switch (_a.label) {
|
|
381
|
+
case 0:
|
|
382
|
+
return [4
|
|
383
|
+
/*yield*/
|
|
384
|
+
, (0, _commonUtil.commonFetch)('/designer/v1/h5/users/modify', params, 'POST')];
|
|
385
|
+
|
|
386
|
+
case 1:
|
|
387
|
+
_a.sent();
|
|
388
|
+
|
|
389
|
+
this.showBottomBar();
|
|
390
|
+
this.setState(function (preState, props) {
|
|
391
|
+
return {
|
|
392
|
+
userInfo: __assign(__assign({}, preState.userInfo), {
|
|
393
|
+
photo: params.photo
|
|
394
|
+
}),
|
|
395
|
+
loading: false,
|
|
396
|
+
editImgModalVisible: false
|
|
397
|
+
};
|
|
398
|
+
});
|
|
399
|
+
return [2
|
|
400
|
+
/*return*/
|
|
401
|
+
];
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
});
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
_this.hideBottomBar = function () {
|
|
408
|
+
var homeNavBar = document.querySelector('.home-navigation');
|
|
409
|
+
console.log('homeNavBar', homeNavBar);
|
|
410
|
+
if (homeNavBar) homeNavBar.style.visibility = 'hidden';
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
_this.showBottomBar = function () {
|
|
414
|
+
var homeNavBar = document.querySelector('.home-navigation');
|
|
415
|
+
if (homeNavBar) homeNavBar.style.visibility = 'visible';
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
_this.onUploadImg = function (formData) {
|
|
419
|
+
if (_this.state.loading) return;
|
|
420
|
+
|
|
421
|
+
_this.setState({
|
|
422
|
+
loading: true
|
|
423
|
+
});
|
|
424
|
+
|
|
425
|
+
fetch('/designer/v1/h5/image', {
|
|
426
|
+
method: 'POST',
|
|
427
|
+
body: formData
|
|
428
|
+
}).then(function (response) {
|
|
429
|
+
return response.json();
|
|
430
|
+
}).then(function (responseData) {
|
|
431
|
+
var _a;
|
|
432
|
+
|
|
433
|
+
if (((_a = responseData === null || responseData === void 0 ? void 0 : responseData.fileUrl) === null || _a === void 0 ? void 0 : _a.length) > 120) {
|
|
434
|
+
_antd.message.toast({
|
|
435
|
+
type: 'error',
|
|
436
|
+
message: (0, _locale.i18n)('IMAGE_NAME_IS_TOO_LONG'),
|
|
437
|
+
duration: 3000
|
|
438
|
+
});
|
|
439
|
+
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
_this.modifyPhoto({
|
|
444
|
+
photo: responseData.fileUrl
|
|
445
|
+
});
|
|
446
|
+
})["catch"](function (err) {
|
|
447
|
+
_antd.message.toast({
|
|
448
|
+
type: 'error',
|
|
449
|
+
message: err === null || err === void 0 ? void 0 : err.data,
|
|
450
|
+
duration: 5000
|
|
451
|
+
});
|
|
452
|
+
|
|
453
|
+
_this.showBottomBar();
|
|
454
|
+
|
|
455
|
+
_this.setState({
|
|
456
|
+
editImgModalVisible: false,
|
|
457
|
+
loading: false
|
|
458
|
+
});
|
|
459
|
+
});
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
_this.onItemClick = function (v) {
|
|
463
|
+
var _a;
|
|
464
|
+
|
|
465
|
+
var routeUrl = (_a = pInfoData[v]) === null || _a === void 0 ? void 0 : _a.route;
|
|
466
|
+
var selfUrl = (0, _commonUtil.ensure)(function () {
|
|
467
|
+
return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
|
|
468
|
+
}, '');
|
|
469
|
+
(0, _commonUtil.navigateTo)(routeUrl || selfUrl);
|
|
470
|
+
};
|
|
471
|
+
|
|
352
472
|
return _this;
|
|
353
473
|
}
|
|
354
474
|
|
|
@@ -366,7 +486,9 @@ function (_super) {
|
|
|
366
486
|
var data = this.props.data;
|
|
367
487
|
var _a = this.state,
|
|
368
488
|
messageNum = _a.messageNum,
|
|
369
|
-
userInfo = _a.userInfo
|
|
489
|
+
userInfo = _a.userInfo,
|
|
490
|
+
editImgModalVisible = _a.editImgModalVisible,
|
|
491
|
+
selectedImgFile = _a.selectedImgFile;
|
|
370
492
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
371
493
|
className: (0, _classnames["default"])('personal-information-mobile')
|
|
372
494
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -386,7 +508,6 @@ function (_super) {
|
|
|
386
508
|
}
|
|
387
509
|
}), /*#__PURE__*/_react["default"].createElement("input", {
|
|
388
510
|
accept: "image/*",
|
|
389
|
-
disabled: !(0, _lodash.isEmpty)(LPObj),
|
|
390
511
|
id: "userPhoto",
|
|
391
512
|
onChange: this.handleFileChange,
|
|
392
513
|
type: "file"
|
|
@@ -395,7 +516,9 @@ function (_super) {
|
|
|
395
516
|
}, /*#__PURE__*/_react["default"].createElement("p", {
|
|
396
517
|
className: "name",
|
|
397
518
|
onClick: this.clickName
|
|
398
|
-
}, userInfo.firstName || userInfo.nickName)
|
|
519
|
+
}, userInfo.firstName || userInfo.nickName), /*#__PURE__*/_react["default"].createElement("p", {
|
|
520
|
+
className: "phone"
|
|
521
|
+
}, userInfo.mobilePhone))) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
399
522
|
className: "photo"
|
|
400
523
|
}, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
401
524
|
color: "#fff",
|
|
@@ -424,7 +547,10 @@ function (_super) {
|
|
|
424
547
|
className: "bottom"
|
|
425
548
|
}, data.groupSource.map(function (item) {
|
|
426
549
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
427
|
-
className: "item"
|
|
550
|
+
className: "item",
|
|
551
|
+
onClick: function onClick() {
|
|
552
|
+
return _this.onItemClick(item.sourceType);
|
|
553
|
+
}
|
|
428
554
|
}, item.number.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
429
555
|
className: "number",
|
|
430
556
|
data: __assign(__assign({}, item.number), {
|
|
@@ -438,7 +564,17 @@ function (_super) {
|
|
|
438
564
|
item.title.text = text;
|
|
439
565
|
}
|
|
440
566
|
}));
|
|
441
|
-
}))
|
|
567
|
+
})), editImgModalVisible && /*#__PURE__*/_react["default"].createElement(_common.CropperModal, {
|
|
568
|
+
onClose: function onClose() {
|
|
569
|
+
_this.setState({
|
|
570
|
+
editImgModalVisible: false
|
|
571
|
+
});
|
|
572
|
+
|
|
573
|
+
_this.showBottomBar();
|
|
574
|
+
},
|
|
575
|
+
onSubmit: this.onUploadImg,
|
|
576
|
+
uploadedImageFile: selectedImgFile
|
|
577
|
+
}));
|
|
442
578
|
};
|
|
443
579
|
|
|
444
580
|
PersonalInfoMobile.defaultProps = {
|
|
@@ -1,38 +1,42 @@
|
|
|
1
1
|
.personal-information-mobile {
|
|
2
|
-
height:
|
|
2
|
+
height: 3.24rem;
|
|
3
3
|
padding: 0.32rem;
|
|
4
4
|
box-sizing: border-box;
|
|
5
5
|
}
|
|
6
|
-
.top {
|
|
6
|
+
.personal-information-mobile .top {
|
|
7
7
|
display: flex;
|
|
8
8
|
justify-content: space-between;
|
|
9
|
-
align-items: start;
|
|
9
|
+
align-items: flex-start;
|
|
10
10
|
}
|
|
11
|
-
.top .pInfoWrap {
|
|
11
|
+
.personal-information-mobile .top .pInfoWrap {
|
|
12
12
|
display: flex;
|
|
13
13
|
align-items: center;
|
|
14
14
|
}
|
|
15
|
-
.top .pInfoWrap .photoWrap {
|
|
15
|
+
.personal-information-mobile .top .pInfoWrap .photoWrap {
|
|
16
16
|
position: relative;
|
|
17
17
|
display: inline-block;
|
|
18
18
|
vertical-align: middle;
|
|
19
|
+
margin-right: 0.3rem;
|
|
20
|
+
height: 0.88rem;
|
|
21
|
+
width: 0.88rem;
|
|
19
22
|
}
|
|
20
|
-
.top .pInfoWrap .photoWrap > input {
|
|
23
|
+
.personal-information-mobile .top .pInfoWrap .photoWrap > input {
|
|
21
24
|
position: absolute;
|
|
25
|
+
z-index: 1;
|
|
22
26
|
top: 0;
|
|
23
27
|
left: 0;
|
|
24
28
|
width: 100%;
|
|
25
29
|
height: 100%;
|
|
26
30
|
opacity: 0;
|
|
27
31
|
}
|
|
28
|
-
.top .pInfoWrap .userInfo {
|
|
32
|
+
.personal-information-mobile .top .pInfoWrap .userInfo {
|
|
29
33
|
display: inline-block;
|
|
30
34
|
vertical-align: middle;
|
|
31
35
|
}
|
|
32
|
-
.top .pInfoWrap .userInfo p {
|
|
36
|
+
.personal-information-mobile .top .pInfoWrap .userInfo p {
|
|
33
37
|
margin: 0;
|
|
34
38
|
}
|
|
35
|
-
.top .pInfoWrap .userInfo .name {
|
|
39
|
+
.personal-information-mobile .top .pInfoWrap .userInfo .name {
|
|
36
40
|
font-size: 0.28rem;
|
|
37
41
|
font-weight: 500;
|
|
38
42
|
color: #ffffff;
|
|
@@ -42,13 +46,13 @@
|
|
|
42
46
|
overflow: hidden;
|
|
43
47
|
word-break: break-all;
|
|
44
48
|
}
|
|
45
|
-
.top .pInfoWrap .userInfo .phone {
|
|
49
|
+
.personal-information-mobile .top .pInfoWrap .userInfo .phone {
|
|
46
50
|
font-size: 0.28rem;
|
|
47
51
|
font-weight: 400;
|
|
48
52
|
color: #ffffff;
|
|
49
53
|
margin-top: 0.1rem;
|
|
50
54
|
}
|
|
51
|
-
.top .pInfoWrap .photo {
|
|
55
|
+
.personal-information-mobile .top .pInfoWrap .photo {
|
|
52
56
|
display: inline-block;
|
|
53
57
|
width: 0.88rem;
|
|
54
58
|
height: 0.88rem;
|
|
@@ -58,18 +62,18 @@
|
|
|
58
62
|
margin-right: 0.3rem;
|
|
59
63
|
border-radius: 50%;
|
|
60
64
|
}
|
|
61
|
-
.top .pInfoWrap .btnLogin {
|
|
65
|
+
.personal-information-mobile .top .pInfoWrap .btnLogin {
|
|
62
66
|
font-size: 0.28rem;
|
|
63
67
|
font-weight: 400;
|
|
64
68
|
color: #ffffff;
|
|
65
69
|
font-family: Montserrat;
|
|
66
70
|
}
|
|
67
|
-
.top .btnGroup .iconWrap {
|
|
71
|
+
.personal-information-mobile .top .btnGroup .iconWrap {
|
|
68
72
|
display: inline-block;
|
|
69
73
|
margin-left: 0.3rem;
|
|
70
74
|
position: relative;
|
|
71
75
|
}
|
|
72
|
-
.top .btnGroup .num {
|
|
76
|
+
.personal-information-mobile .top .btnGroup .num {
|
|
73
77
|
position: absolute;
|
|
74
78
|
top: -0.04rem;
|
|
75
79
|
left: 0.28rem;
|
|
@@ -84,14 +88,14 @@
|
|
|
84
88
|
font-size: 0.12rem;
|
|
85
89
|
color: #ffffff;
|
|
86
90
|
}
|
|
87
|
-
.bottom {
|
|
91
|
+
.personal-information-mobile .bottom {
|
|
88
92
|
display: flex;
|
|
89
93
|
flex-direction: row;
|
|
90
94
|
justify-content: space-around;
|
|
91
95
|
width: 100%;
|
|
92
96
|
margin-top: 0.48rem;
|
|
93
97
|
}
|
|
94
|
-
.bottom .item {
|
|
98
|
+
.personal-information-mobile .bottom .item {
|
|
95
99
|
display: flex;
|
|
96
100
|
flex-direction: column;
|
|
97
101
|
justify-content: flex-start;
|
|
@@ -99,7 +103,7 @@
|
|
|
99
103
|
flex: 1;
|
|
100
104
|
position: relative;
|
|
101
105
|
}
|
|
102
|
-
.bottom .item:after {
|
|
106
|
+
.personal-information-mobile .bottom .item:after {
|
|
103
107
|
content: '';
|
|
104
108
|
display: inline-block;
|
|
105
109
|
width: 0.02rem;
|
|
@@ -109,16 +113,18 @@
|
|
|
109
113
|
top: 0.12rem;
|
|
110
114
|
background: #ccc;
|
|
111
115
|
}
|
|
112
|
-
.bottom .item:last-child:after {
|
|
116
|
+
.personal-information-mobile .bottom .item:last-child:after {
|
|
113
117
|
display: none;
|
|
114
118
|
}
|
|
115
|
-
.bottom .item .number {
|
|
119
|
+
.personal-information-mobile .bottom .item .number {
|
|
120
|
+
width: 70% !important;
|
|
116
121
|
font-size: 0.36rem;
|
|
117
122
|
font-weight: 600;
|
|
118
123
|
color: #ffffff;
|
|
119
124
|
text-align: center;
|
|
120
125
|
}
|
|
121
|
-
.bottom .item .title {
|
|
126
|
+
.personal-information-mobile .bottom .item .title {
|
|
127
|
+
width: 70% !important;
|
|
122
128
|
font-size: 0.24rem;
|
|
123
129
|
font-weight: 400;
|
|
124
130
|
color: #ffffff;
|
|
@@ -97,7 +97,9 @@ function (_super) {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
ImageTextConfigGroup.prototype.render = function () {
|
|
100
|
-
var
|
|
100
|
+
var _a = this.props,
|
|
101
|
+
source = _a.source,
|
|
102
|
+
maxNum = _a.maxNum;
|
|
101
103
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
102
104
|
className: "banner_group"
|
|
103
105
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -111,6 +113,7 @@ function (_super) {
|
|
|
111
113
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
112
114
|
className: "btn_wrap"
|
|
113
115
|
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
116
|
+
disabled: source.length >= maxNum,
|
|
114
117
|
icon: "icon-add",
|
|
115
118
|
onClick: this.onAddClick,
|
|
116
119
|
type: "primary"
|
|
@@ -17,8 +17,6 @@ var _coreUtil = require("../../../../utils/coreUtil");
|
|
|
17
17
|
|
|
18
18
|
var _locale = require("../../../../locale");
|
|
19
19
|
|
|
20
|
-
require("./index.less");
|
|
21
|
-
|
|
22
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
21
|
|
|
24
22
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
@@ -47,6 +45,7 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
47
45
|
};
|
|
48
46
|
}();
|
|
49
47
|
|
|
48
|
+
// import './index.less';
|
|
50
49
|
var CommonFunctionsSecondConfig =
|
|
51
50
|
/** @class */
|
|
52
51
|
function (_super) {
|
|
@@ -114,10 +114,10 @@ function (_super) {
|
|
|
114
114
|
}, (0, _locale.i18n)('TO_SHIP')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
115
115
|
value: _index.orderStatusType.RECEIVE
|
|
116
116
|
}, (0, _locale.i18n)('TO_RECEIVE')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
117
|
-
value: _index.orderStatusType.
|
|
118
|
-
}, (0, _locale.i18n)('
|
|
119
|
-
value: _index.orderStatusType.
|
|
120
|
-
}, (0, _locale.i18n)('
|
|
117
|
+
value: _index.orderStatusType.DONE
|
|
118
|
+
}, (0, _locale.i18n)('DONE')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
119
|
+
value: _index.orderStatusType.CANCELLED
|
|
120
|
+
}, (0, _locale.i18n)('CANCELLED'))))));
|
|
121
121
|
};
|
|
122
122
|
|
|
123
123
|
return _this;
|