@fonixtree/magic-design 2.0.85 → 2.0.87
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/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 +1 -1
- package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +1 -1
- package/es/composite-comp/dito/components/CommonFunctions/mobile/index.less +2 -2
- package/es/composite-comp/dito/components/Orders/mobile/index.js +2 -2
- package/es/composite-comp/dito/components/Orders/mobile/index.less +1 -6
- package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +114 -7
- package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +6 -2
- package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +1 -2
- package/es/core/Designer/ToolBarModal/index.js +5 -1
- package/es/core/Renderer/index.js +6 -2
- package/es/decorator/compositeDecorator.js +9 -5
- package/es/locale/en/en.json +1 -1
- package/es/locale/es/es.json +2 -2
- package/es/locale/id/id.json +1 -1
- package/es/meta-comp/config-panels/TextConfig/index.js +1 -1
- package/es/utils/commonUtil.js +1 -3
- package/es/utils/coreUtil.js +29 -21
- 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/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 +1 -1
- package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +1 -1
- package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.less +2 -2
- package/lib/composite-comp/dito/components/Orders/mobile/index.js +2 -2
- package/lib/composite-comp/dito/components/Orders/mobile/index.less +1 -6
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +114 -7
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +6 -2
- package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +1 -2
- package/lib/core/Designer/ToolBarModal/index.js +5 -1
- package/lib/core/Renderer/index.js +6 -2
- package/lib/decorator/compositeDecorator.js +9 -5
- package/lib/locale/en/en.json +1 -1
- package/lib/locale/es/es.json +2 -2
- package/lib/locale/id/id.json +1 -1
- package/lib/meta-comp/config-panels/TextConfig/index.js +1 -1
- package/lib/utils/commonUtil.js +1 -3
- package/lib/utils/coreUtil.js +29 -21
- package/package.json +2 -1
- package/es/assets/fonts/.DS_Store +0 -0
- package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +0 -1
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +0 -1
|
@@ -0,0 +1,332 @@
|
|
|
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"] = AffiliateStore;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _antd = require("antd");
|
|
13
|
+
|
|
14
|
+
var _commonUtil = require("../../../utils/commonUtil");
|
|
15
|
+
|
|
16
|
+
var _locale = require("../../../locale");
|
|
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 __assign = void 0 && (void 0).__assign || function () {
|
|
23
|
+
__assign = Object.assign || function (t) {
|
|
24
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
25
|
+
s = arguments[i];
|
|
26
|
+
|
|
27
|
+
for (var p in s) {
|
|
28
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return t;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return __assign.apply(this, arguments);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) {
|
|
40
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
41
|
+
resolve(value);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
46
|
+
function fulfilled(value) {
|
|
47
|
+
try {
|
|
48
|
+
step(generator.next(value));
|
|
49
|
+
} catch (e) {
|
|
50
|
+
reject(e);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function rejected(value) {
|
|
55
|
+
try {
|
|
56
|
+
step(generator["throw"](value));
|
|
57
|
+
} catch (e) {
|
|
58
|
+
reject(e);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function step(result) {
|
|
63
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
71
|
+
var _ = {
|
|
72
|
+
label: 0,
|
|
73
|
+
sent: function sent() {
|
|
74
|
+
if (t[0] & 1) throw t[1];
|
|
75
|
+
return t[1];
|
|
76
|
+
},
|
|
77
|
+
trys: [],
|
|
78
|
+
ops: []
|
|
79
|
+
},
|
|
80
|
+
f,
|
|
81
|
+
y,
|
|
82
|
+
t,
|
|
83
|
+
g;
|
|
84
|
+
return g = {
|
|
85
|
+
next: verb(0),
|
|
86
|
+
"throw": verb(1),
|
|
87
|
+
"return": verb(2)
|
|
88
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
89
|
+
return this;
|
|
90
|
+
}), g;
|
|
91
|
+
|
|
92
|
+
function verb(n) {
|
|
93
|
+
return function (v) {
|
|
94
|
+
return step([n, v]);
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function step(op) {
|
|
99
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
100
|
+
|
|
101
|
+
while (_) {
|
|
102
|
+
try {
|
|
103
|
+
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;
|
|
104
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
105
|
+
|
|
106
|
+
switch (op[0]) {
|
|
107
|
+
case 0:
|
|
108
|
+
case 1:
|
|
109
|
+
t = op;
|
|
110
|
+
break;
|
|
111
|
+
|
|
112
|
+
case 4:
|
|
113
|
+
_.label++;
|
|
114
|
+
return {
|
|
115
|
+
value: op[1],
|
|
116
|
+
done: false
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
case 5:
|
|
120
|
+
_.label++;
|
|
121
|
+
y = op[1];
|
|
122
|
+
op = [0];
|
|
123
|
+
continue;
|
|
124
|
+
|
|
125
|
+
case 7:
|
|
126
|
+
op = _.ops.pop();
|
|
127
|
+
|
|
128
|
+
_.trys.pop();
|
|
129
|
+
|
|
130
|
+
continue;
|
|
131
|
+
|
|
132
|
+
default:
|
|
133
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
134
|
+
_ = 0;
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
139
|
+
_.label = op[1];
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
144
|
+
_.label = t[1];
|
|
145
|
+
t = op;
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (t && _.label < t[2]) {
|
|
150
|
+
_.label = t[2];
|
|
151
|
+
|
|
152
|
+
_.ops.push(op);
|
|
153
|
+
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (t[2]) _.ops.pop();
|
|
158
|
+
|
|
159
|
+
_.trys.pop();
|
|
160
|
+
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
op = body.call(thisArg, _);
|
|
165
|
+
} catch (e) {
|
|
166
|
+
op = [6, e];
|
|
167
|
+
y = 0;
|
|
168
|
+
} finally {
|
|
169
|
+
f = t = 0;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (op[0] & 5) throw op[1];
|
|
174
|
+
return {
|
|
175
|
+
value: op[0] ? op[1] : void 0,
|
|
176
|
+
done: true
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
var paginationParams = {
|
|
182
|
+
pageSize: 20,
|
|
183
|
+
pageIndex: 1
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
function AffiliateStore(props) {
|
|
187
|
+
var _this = this;
|
|
188
|
+
|
|
189
|
+
var _onChange = props.onChange;
|
|
190
|
+
|
|
191
|
+
var _a = (0, _react.useState)([]),
|
|
192
|
+
storeList = _a[0],
|
|
193
|
+
setStoreList = _a[1];
|
|
194
|
+
|
|
195
|
+
var _b = (0, _react.useState)(false),
|
|
196
|
+
loading = _b[0],
|
|
197
|
+
setLoading = _b[1];
|
|
198
|
+
|
|
199
|
+
var _c = (0, _react.useState)(''),
|
|
200
|
+
storeName = _c[0],
|
|
201
|
+
setStoreName = _c[1];
|
|
202
|
+
|
|
203
|
+
var queryStore = function queryStore(params) {
|
|
204
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
205
|
+
var res;
|
|
206
|
+
return __generator(this, function (_a) {
|
|
207
|
+
switch (_a.label) {
|
|
208
|
+
case 0:
|
|
209
|
+
setLoading(true);
|
|
210
|
+
return [4
|
|
211
|
+
/*yield*/
|
|
212
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/affiliate/store/query/page", params, 'GET')];
|
|
213
|
+
|
|
214
|
+
case 1:
|
|
215
|
+
res = _a.sent();
|
|
216
|
+
paginationParams.total = res.total;
|
|
217
|
+
setStoreList(res.list);
|
|
218
|
+
setLoading(false);
|
|
219
|
+
return [2
|
|
220
|
+
/*return*/
|
|
221
|
+
];
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
});
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
(0, _react.useEffect)(function () {
|
|
228
|
+
queryStore(paginationParams);
|
|
229
|
+
}, []);
|
|
230
|
+
var columns = [{
|
|
231
|
+
title: 'Store ID',
|
|
232
|
+
dataIndex: 'affiliateStoreId'
|
|
233
|
+
}, {
|
|
234
|
+
title: 'Store Name',
|
|
235
|
+
dataIndex: 'storeName'
|
|
236
|
+
}, {
|
|
237
|
+
title: 'Logo',
|
|
238
|
+
dataIndex: 'logo',
|
|
239
|
+
render: function render(val) {
|
|
240
|
+
return /*#__PURE__*/_react["default"].createElement("img", {
|
|
241
|
+
alt: "",
|
|
242
|
+
src: val,
|
|
243
|
+
style: {
|
|
244
|
+
maxWidth: '50px',
|
|
245
|
+
maxHeight: '50px'
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
}, {
|
|
250
|
+
title: 'Channel',
|
|
251
|
+
dataIndex: 'bindChannel'
|
|
252
|
+
}];
|
|
253
|
+
var rowSelection = {
|
|
254
|
+
onChange: function onChange(selectedRowKeys, selectedRow) {
|
|
255
|
+
_onChange({
|
|
256
|
+
value: selectedRow[0].affiliateStoreId,
|
|
257
|
+
name: selectedRow[0].storeName
|
|
258
|
+
});
|
|
259
|
+
},
|
|
260
|
+
type: 'radio'
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
var reset = function reset() {
|
|
264
|
+
setStoreName('');
|
|
265
|
+
queryStore(__assign({
|
|
266
|
+
storeName: ''
|
|
267
|
+
}, paginationParams));
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
271
|
+
style: {
|
|
272
|
+
height: 550
|
|
273
|
+
}
|
|
274
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Form, {
|
|
275
|
+
labelCol: {
|
|
276
|
+
span: 6
|
|
277
|
+
},
|
|
278
|
+
layout: "horizontal"
|
|
279
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Row, {
|
|
280
|
+
gutter: 24
|
|
281
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
282
|
+
span: 12
|
|
283
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
284
|
+
label: "Store Name"
|
|
285
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
286
|
+
onChange: function onChange(e) {
|
|
287
|
+
return setStoreName(e.target.value);
|
|
288
|
+
},
|
|
289
|
+
size: "small",
|
|
290
|
+
value: storeName
|
|
291
|
+
}))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
292
|
+
span: 6
|
|
293
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
294
|
+
onClick: function onClick() {
|
|
295
|
+
setLoading(true);
|
|
296
|
+
paginationParams.pageIndex = 1;
|
|
297
|
+
queryStore(__assign({
|
|
298
|
+
storeName: storeName
|
|
299
|
+
}, paginationParams));
|
|
300
|
+
},
|
|
301
|
+
size: "small",
|
|
302
|
+
style: {
|
|
303
|
+
marginRight: 10
|
|
304
|
+
},
|
|
305
|
+
type: "primary"
|
|
306
|
+
}, (0, _locale.i18n)('QUERY')), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
307
|
+
onClick: function onClick() {
|
|
308
|
+
reset();
|
|
309
|
+
},
|
|
310
|
+
size: "small"
|
|
311
|
+
}, (0, _locale.i18n)('CANCEL'))))), /*#__PURE__*/_react["default"].createElement(_antd.Table, {
|
|
312
|
+
bordered: false,
|
|
313
|
+
columns: columns,
|
|
314
|
+
dataSource: storeList,
|
|
315
|
+
defaultExpandAllRows: true,
|
|
316
|
+
loading: loading,
|
|
317
|
+
pagination: __assign(__assign({}, paginationParams), {
|
|
318
|
+
onChange: function onChange(page) {
|
|
319
|
+
paginationParams.pageIndex = page;
|
|
320
|
+
queryStore(__assign(__assign({}, paginationParams), {
|
|
321
|
+
storeName: storeName
|
|
322
|
+
}));
|
|
323
|
+
},
|
|
324
|
+
showSizeChanger: false
|
|
325
|
+
}),
|
|
326
|
+
rowKey: "affiliateStoreId",
|
|
327
|
+
rowSelection: rowSelection,
|
|
328
|
+
scroll: {
|
|
329
|
+
y: 400
|
|
330
|
+
}
|
|
331
|
+
}));
|
|
332
|
+
}
|
|
@@ -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 }; }
|
|
@@ -67,7 +67,7 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
67
67
|
return {
|
|
68
68
|
id: (0, _uuid.v4)(),
|
|
69
69
|
type: 'COMMON_FUNCTIONS',
|
|
70
|
-
groupSource: [CommonFunctionsGroupSourceJSON('Address', '/address/manage'), CommonFunctionsGroupSourceJSON('Policies', '/account/policies'), CommonFunctionsGroupSourceJSON('Security Center', '/account/security'), CommonFunctionsGroupSourceJSON('Chat With Us')],
|
|
70
|
+
groupSource: [CommonFunctionsGroupSourceJSON('Address', '/address/manage'), CommonFunctionsGroupSourceJSON('Policies', '/account/policies'), CommonFunctionsGroupSourceJSON('Security Center', '/account/security'), CommonFunctionsGroupSourceJSON('Chat With Us', '/new-chat')],
|
|
71
71
|
spacing: {
|
|
72
72
|
pc: {
|
|
73
73
|
paddingTop: 0,
|
|
@@ -56,7 +56,7 @@ function (_super) {
|
|
|
56
56
|
_this.state = {};
|
|
57
57
|
|
|
58
58
|
_this.onItemClick = function (item) {
|
|
59
|
-
if ((0, _commonUtil.checkLogin)()) {
|
|
59
|
+
if ((0, _commonUtil.checkLogin)(true, '/main/account')) {
|
|
60
60
|
var url = (0, _commonUtil.ensure)(function () {
|
|
61
61
|
return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
|
|
62
62
|
}, '');
|
|
@@ -212,11 +212,11 @@ var orderData = {
|
|
|
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;
|
|
@@ -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 {
|
|
@@ -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 }; }
|
|
@@ -253,7 +255,10 @@ function (_super) {
|
|
|
253
255
|
|
|
254
256
|
_this.state = {
|
|
255
257
|
messageNum: '',
|
|
256
|
-
userInfo: currentUser
|
|
258
|
+
userInfo: currentUser,
|
|
259
|
+
loading: false,
|
|
260
|
+
selectedImgFile: {},
|
|
261
|
+
editImgModalVisible: false
|
|
257
262
|
};
|
|
258
263
|
|
|
259
264
|
_this.getNum = function (v) {
|
|
@@ -280,8 +285,12 @@ function (_super) {
|
|
|
280
285
|
return;
|
|
281
286
|
}
|
|
282
287
|
|
|
283
|
-
|
|
284
|
-
|
|
288
|
+
_this.hideBottomBar();
|
|
289
|
+
|
|
290
|
+
_this.setState({
|
|
291
|
+
editImgModalVisible: true,
|
|
292
|
+
selectedImgFile: file
|
|
293
|
+
});
|
|
285
294
|
}
|
|
286
295
|
|
|
287
296
|
e.target.value = '';
|
|
@@ -365,6 +374,91 @@ function (_super) {
|
|
|
365
374
|
});
|
|
366
375
|
};
|
|
367
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
|
+
|
|
368
462
|
_this.onItemClick = function (v) {
|
|
369
463
|
var _a;
|
|
370
464
|
|
|
@@ -392,7 +486,9 @@ function (_super) {
|
|
|
392
486
|
var data = this.props.data;
|
|
393
487
|
var _a = this.state,
|
|
394
488
|
messageNum = _a.messageNum,
|
|
395
|
-
userInfo = _a.userInfo
|
|
489
|
+
userInfo = _a.userInfo,
|
|
490
|
+
editImgModalVisible = _a.editImgModalVisible,
|
|
491
|
+
selectedImgFile = _a.selectedImgFile;
|
|
396
492
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
397
493
|
className: (0, _classnames["default"])('personal-information-mobile')
|
|
398
494
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -412,7 +508,6 @@ function (_super) {
|
|
|
412
508
|
}
|
|
413
509
|
}), /*#__PURE__*/_react["default"].createElement("input", {
|
|
414
510
|
accept: "image/*",
|
|
415
|
-
disabled: !(0, _lodash.isEmpty)(LPObj),
|
|
416
511
|
id: "userPhoto",
|
|
417
512
|
onChange: this.handleFileChange,
|
|
418
513
|
type: "file"
|
|
@@ -421,7 +516,9 @@ function (_super) {
|
|
|
421
516
|
}, /*#__PURE__*/_react["default"].createElement("p", {
|
|
422
517
|
className: "name",
|
|
423
518
|
onClick: this.clickName
|
|
424
|
-
}, 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", {
|
|
425
522
|
className: "photo"
|
|
426
523
|
}, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
427
524
|
color: "#fff",
|
|
@@ -467,7 +564,17 @@ function (_super) {
|
|
|
467
564
|
item.title.text = text;
|
|
468
565
|
}
|
|
469
566
|
}));
|
|
470
|
-
}))
|
|
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
|
+
}));
|
|
471
578
|
};
|
|
472
579
|
|
|
473
580
|
PersonalInfoMobile.defaultProps = {
|
|
@@ -1,12 +1,12 @@
|
|
|
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
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
11
|
.personal-information-mobile .top .pInfoWrap {
|
|
12
12
|
display: flex;
|
|
@@ -16,9 +16,13 @@
|
|
|
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
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%;
|
|
@@ -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) {
|
|
@@ -153,7 +153,11 @@ function (_super) {
|
|
|
153
153
|
|
|
154
154
|
_this.props.quillRef.format('list', currentListType == 'bullet' ? '' : 'bullet');
|
|
155
155
|
} else if (type == 'link') {
|
|
156
|
-
|
|
156
|
+
if (window.magicDesign.outputType === 'html') {
|
|
157
|
+
_this.props.quillRef.format('link', value.name);
|
|
158
|
+
} else {
|
|
159
|
+
_this.props.quillRef.format('link', JSON.stringify(value));
|
|
160
|
+
}
|
|
157
161
|
} else if (type == 'size') {
|
|
158
162
|
_this.props.quillRef.format('size', value + 'px');
|
|
159
163
|
} else if (type == 'font') {
|