@fonixtree/magic-design 2.0.82 → 2.0.84
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/assets/fonts/magic-box-iconfont.css +30 -6
- package/es/assets/fonts/magic-box-iconfont.js +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/GroupList/index.js +5 -2
- package/es/common/ProductModal/SortableImageList/index.js +118 -0
- package/es/common/ProductModal/SortableImageList/index.less +3 -0
- package/es/common/ProductModal/index.js +40 -27
- package/es/composite-comp/common/config-panels/SpacingConfig/index.js +1 -0
- package/es/composite-comp/dito/components/CommonFunctions/defaultJSON.js +88 -0
- package/es/composite-comp/dito/components/CommonFunctions/index.js +84 -0
- package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +105 -0
- package/es/composite-comp/dito/components/CommonFunctions/mobile/index.less +30 -0
- package/es/composite-comp/dito/components/Orders/defaultJSON.js +89 -0
- package/es/composite-comp/dito/components/Orders/index.js +84 -0
- package/es/composite-comp/dito/components/Orders/mobile/index.js +336 -0
- package/es/composite-comp/dito/components/Orders/mobile/index.less +86 -0
- package/es/composite-comp/dito/components/PersonalInformation/defaultJSON.js +95 -0
- package/es/composite-comp/dito/components/PersonalInformation/index.js +84 -0
- package/es/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
- package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +451 -0
- package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +127 -0
- package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +128 -0
- package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/index.js +113 -0
- package/es/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +128 -0
- package/es/composite-comp/dito/config-panels/OrdersConfig/index.js +114 -0
- package/es/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +131 -0
- package/es/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +118 -0
- package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +122 -0
- package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +1 -0
- package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +148 -0
- package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.less +9 -0
- package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +143 -0
- package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.less +9 -0
- package/es/constants/component-types.js +21 -3
- package/es/constants/index.js +37 -3
- package/es/core/Designer/ConfigPanel/index.js +6 -0
- package/es/decorator/compositeDecorator.js +1 -1
- package/es/locale/en/en.json +14 -0
- package/es/locale/es/es.json +14 -0
- package/es/locale/id/id.json +14 -0
- package/es/mobx/UserState.js +144 -0
- package/es/mobx/index.js +9 -3
- package/es/utils/androidUtil.js +13 -2
- package/es/utils/commonUtil.js +117 -3
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/assets/fonts/magic-box-iconfont.css +30 -6
- package/lib/assets/fonts/magic-box-iconfont.js +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/GroupList/index.js +5 -2
- package/lib/common/ProductModal/SortableImageList/index.js +118 -0
- package/lib/common/ProductModal/SortableImageList/index.less +3 -0
- package/lib/common/ProductModal/index.js +40 -27
- package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +1 -0
- package/lib/composite-comp/dito/components/CommonFunctions/defaultJSON.js +88 -0
- package/lib/composite-comp/dito/components/CommonFunctions/index.js +84 -0
- package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +105 -0
- package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.less +30 -0
- package/lib/composite-comp/dito/components/Orders/defaultJSON.js +89 -0
- package/lib/composite-comp/dito/components/Orders/index.js +84 -0
- package/lib/composite-comp/dito/components/Orders/mobile/index.js +336 -0
- package/lib/composite-comp/dito/components/Orders/mobile/index.less +86 -0
- package/lib/composite-comp/dito/components/PersonalInformation/defaultJSON.js +95 -0
- package/lib/composite-comp/dito/components/PersonalInformation/index.js +84 -0
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +451 -0
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +127 -0
- package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +128 -0
- package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/index.js +113 -0
- package/lib/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +128 -0
- package/lib/composite-comp/dito/config-panels/OrdersConfig/index.js +114 -0
- package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +131 -0
- package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +118 -0
- package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +122 -0
- package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +1 -0
- package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +148 -0
- package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.less +9 -0
- package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +143 -0
- package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.less +9 -0
- package/lib/constants/component-types.js +21 -3
- package/lib/constants/index.js +37 -3
- package/lib/core/Designer/ConfigPanel/index.js +6 -0
- package/lib/decorator/compositeDecorator.js +1 -1
- package/lib/locale/en/en.json +14 -0
- package/lib/locale/es/es.json +14 -0
- package/lib/locale/id/id.json +14 -0
- package/lib/mobx/UserState.js +144 -0
- package/lib/mobx/index.js +9 -3
- package/lib/utils/androidUtil.js +13 -2
- package/lib/utils/commonUtil.js +117 -3
- package/package.json +1 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _mobile = _interopRequireDefault(require("./mobile"));
|
|
11
|
+
|
|
12
|
+
var _defaultJSON = require("./defaultJSON");
|
|
13
|
+
|
|
14
|
+
var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
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
|
+
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); }
|
|
23
|
+
|
|
24
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
25
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
26
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
27
|
+
__proto__: []
|
|
28
|
+
} instanceof Array && function (d, b) {
|
|
29
|
+
d.__proto__ = b;
|
|
30
|
+
} || function (d, b) {
|
|
31
|
+
for (var p in b) {
|
|
32
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return _extendStatics(d, b);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return function (d, b) {
|
|
40
|
+
_extendStatics(d, b);
|
|
41
|
+
|
|
42
|
+
function __() {
|
|
43
|
+
this.constructor = d;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
47
|
+
};
|
|
48
|
+
}();
|
|
49
|
+
|
|
50
|
+
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
51
|
+
var c = arguments.length,
|
|
52
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
53
|
+
d;
|
|
54
|
+
if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
|
|
55
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
56
|
+
}
|
|
57
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var Orders =
|
|
61
|
+
/** @class */
|
|
62
|
+
function (_super) {
|
|
63
|
+
__extends(Orders, _super);
|
|
64
|
+
|
|
65
|
+
function Orders() {
|
|
66
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
Orders.prototype.render = function () {
|
|
70
|
+
var nodeData = this.props.nodeData;
|
|
71
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, window.magicDesign.device === 'pc' ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null) : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
|
|
72
|
+
data: nodeData
|
|
73
|
+
}));
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
Orders.defaultProps = {};
|
|
77
|
+
Orders.type = 'ORDERS';
|
|
78
|
+
Orders.getDefaultJSON = _defaultJSON.getDefaultJSON;
|
|
79
|
+
Orders = __decorate([_compositeDecorator["default"]], Orders);
|
|
80
|
+
return Orders;
|
|
81
|
+
}(_react.Component);
|
|
82
|
+
|
|
83
|
+
var _default = Orders;
|
|
84
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.orderData = exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
var _components = require("../../../../../meta-comp/components");
|
|
13
|
+
|
|
14
|
+
var _locale = require("../../../../../locale");
|
|
15
|
+
|
|
16
|
+
var _Iconfont = _interopRequireDefault(require("../../../../../common/Iconfont"));
|
|
17
|
+
|
|
18
|
+
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
19
|
+
|
|
20
|
+
var _index = require("../../PersonalInformation/mobile/index");
|
|
21
|
+
|
|
22
|
+
require("./index.less");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
|
|
26
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
27
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
28
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
29
|
+
__proto__: []
|
|
30
|
+
} instanceof Array && function (d, b) {
|
|
31
|
+
d.__proto__ = b;
|
|
32
|
+
} || function (d, b) {
|
|
33
|
+
for (var p in b) {
|
|
34
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
return _extendStatics(d, b);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return function (d, b) {
|
|
42
|
+
_extendStatics(d, b);
|
|
43
|
+
|
|
44
|
+
function __() {
|
|
45
|
+
this.constructor = d;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
49
|
+
};
|
|
50
|
+
}();
|
|
51
|
+
|
|
52
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
53
|
+
function adopt(value) {
|
|
54
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
55
|
+
resolve(value);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
60
|
+
function fulfilled(value) {
|
|
61
|
+
try {
|
|
62
|
+
step(generator.next(value));
|
|
63
|
+
} catch (e) {
|
|
64
|
+
reject(e);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function rejected(value) {
|
|
69
|
+
try {
|
|
70
|
+
step(generator["throw"](value));
|
|
71
|
+
} catch (e) {
|
|
72
|
+
reject(e);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function step(result) {
|
|
77
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
85
|
+
var _ = {
|
|
86
|
+
label: 0,
|
|
87
|
+
sent: function sent() {
|
|
88
|
+
if (t[0] & 1) throw t[1];
|
|
89
|
+
return t[1];
|
|
90
|
+
},
|
|
91
|
+
trys: [],
|
|
92
|
+
ops: []
|
|
93
|
+
},
|
|
94
|
+
f,
|
|
95
|
+
y,
|
|
96
|
+
t,
|
|
97
|
+
g;
|
|
98
|
+
return g = {
|
|
99
|
+
next: verb(0),
|
|
100
|
+
"throw": verb(1),
|
|
101
|
+
"return": verb(2)
|
|
102
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
103
|
+
return this;
|
|
104
|
+
}), g;
|
|
105
|
+
|
|
106
|
+
function verb(n) {
|
|
107
|
+
return function (v) {
|
|
108
|
+
return step([n, v]);
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function step(op) {
|
|
113
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
114
|
+
|
|
115
|
+
while (_) {
|
|
116
|
+
try {
|
|
117
|
+
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;
|
|
118
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
119
|
+
|
|
120
|
+
switch (op[0]) {
|
|
121
|
+
case 0:
|
|
122
|
+
case 1:
|
|
123
|
+
t = op;
|
|
124
|
+
break;
|
|
125
|
+
|
|
126
|
+
case 4:
|
|
127
|
+
_.label++;
|
|
128
|
+
return {
|
|
129
|
+
value: op[1],
|
|
130
|
+
done: false
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
case 5:
|
|
134
|
+
_.label++;
|
|
135
|
+
y = op[1];
|
|
136
|
+
op = [0];
|
|
137
|
+
continue;
|
|
138
|
+
|
|
139
|
+
case 7:
|
|
140
|
+
op = _.ops.pop();
|
|
141
|
+
|
|
142
|
+
_.trys.pop();
|
|
143
|
+
|
|
144
|
+
continue;
|
|
145
|
+
|
|
146
|
+
default:
|
|
147
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
148
|
+
_ = 0;
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
153
|
+
_.label = op[1];
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
158
|
+
_.label = t[1];
|
|
159
|
+
t = op;
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
if (t && _.label < t[2]) {
|
|
164
|
+
_.label = t[2];
|
|
165
|
+
|
|
166
|
+
_.ops.push(op);
|
|
167
|
+
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
if (t[2]) _.ops.pop();
|
|
172
|
+
|
|
173
|
+
_.trys.pop();
|
|
174
|
+
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
op = body.call(thisArg, _);
|
|
179
|
+
} catch (e) {
|
|
180
|
+
op = [6, e];
|
|
181
|
+
y = 0;
|
|
182
|
+
} finally {
|
|
183
|
+
f = t = 0;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (op[0] & 5) throw op[1];
|
|
188
|
+
return {
|
|
189
|
+
value: op[0] ? op[1] : void 0,
|
|
190
|
+
done: true
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
var getAccountPageValue = function getAccountPageValue(key) {
|
|
196
|
+
var accountPageValue = JSON.parse(localStorage.getItem('accountPageValue'));
|
|
197
|
+
return accountPageValue ? accountPageValue[key] || '' : '';
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
var orderData = {
|
|
201
|
+
'To Pay': {
|
|
202
|
+
key: 'toPayNum',
|
|
203
|
+
route: '/main/order/1'
|
|
204
|
+
},
|
|
205
|
+
'To Ship': {
|
|
206
|
+
key: 'toDeliveryNum',
|
|
207
|
+
route: '/main/order/2'
|
|
208
|
+
},
|
|
209
|
+
'To Receive': {
|
|
210
|
+
key: 'toReceiveNum',
|
|
211
|
+
route: '/main/order/3'
|
|
212
|
+
},
|
|
213
|
+
Rating: {
|
|
214
|
+
key: 'toRatingNum',
|
|
215
|
+
route: '/rating-list'
|
|
216
|
+
},
|
|
217
|
+
Return: {
|
|
218
|
+
key: 'returnsNum',
|
|
219
|
+
route: '/aftersale-list'
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
exports.orderData = orderData;
|
|
223
|
+
|
|
224
|
+
var OrdersMobile =
|
|
225
|
+
/** @class */
|
|
226
|
+
function (_super) {
|
|
227
|
+
__extends(OrdersMobile, _super);
|
|
228
|
+
|
|
229
|
+
function OrdersMobile() {
|
|
230
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
231
|
+
|
|
232
|
+
_this.state = {
|
|
233
|
+
orderStatus: getAccountPageValue('orderStatus') || {}
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
_this.onItemClick = function (v) {
|
|
237
|
+
var url = orderData[v].route;
|
|
238
|
+
(0, _commonUtil.navigateTo)(url);
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
_this.getInit = function () {
|
|
242
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
243
|
+
var orderStatus;
|
|
244
|
+
return __generator(this, function (_a) {
|
|
245
|
+
switch (_a.label) {
|
|
246
|
+
case 0:
|
|
247
|
+
return [4
|
|
248
|
+
/*yield*/
|
|
249
|
+
, (0, _commonUtil.commonFetch)('/designer/v1/h5/orders/status/num', {}, 'GET')];
|
|
250
|
+
|
|
251
|
+
case 1:
|
|
252
|
+
orderStatus = _a.sent();
|
|
253
|
+
this.setState({
|
|
254
|
+
orderStatus: orderStatus
|
|
255
|
+
});
|
|
256
|
+
(0, _index.setAccountPageValue)({
|
|
257
|
+
orderStatus: orderStatus
|
|
258
|
+
});
|
|
259
|
+
return [2
|
|
260
|
+
/*return*/
|
|
261
|
+
];
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
_this.getImageHtml = function (item) {
|
|
268
|
+
var orderStatus = _this.state.orderStatus;
|
|
269
|
+
var num = orderStatus[orderData[item.sourceType].key];
|
|
270
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
271
|
+
data: item.image,
|
|
272
|
+
maxWidth: "100%"
|
|
273
|
+
}), num ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
274
|
+
className: "pot"
|
|
275
|
+
}, num) : null);
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
return _this;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
OrdersMobile.prototype.componentDidMount = function () {
|
|
282
|
+
if ((0, _commonUtil.isLogin)()) {
|
|
283
|
+
this.getInit();
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
OrdersMobile.prototype.render = function () {
|
|
288
|
+
var _this = this;
|
|
289
|
+
|
|
290
|
+
var data = this.props.data;
|
|
291
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
292
|
+
className: (0, _classnames["default"])('orders-mobile')
|
|
293
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
294
|
+
className: "fixed-wrap"
|
|
295
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
296
|
+
className: "top"
|
|
297
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
298
|
+
className: "title"
|
|
299
|
+
}, (0, _locale.i18n)('ORDERS')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
300
|
+
className: "btn-wrap"
|
|
301
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
302
|
+
className: "text",
|
|
303
|
+
onClick: function onClick() {
|
|
304
|
+
return (0, _commonUtil.navigateTo)('/main/order/0');
|
|
305
|
+
}
|
|
306
|
+
}, (0, _locale.i18n)('VIEW_ALL_ORDERS')), /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
307
|
+
color: "#C7C7C7",
|
|
308
|
+
size: 13,
|
|
309
|
+
type: "icon-outlined-right"
|
|
310
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
311
|
+
className: "list"
|
|
312
|
+
}, data.groupSource.map(function (item) {
|
|
313
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
314
|
+
key: item.id,
|
|
315
|
+
className: "item",
|
|
316
|
+
onClick: function onClick() {
|
|
317
|
+
return _this.onItemClick(item.sourceType);
|
|
318
|
+
}
|
|
319
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
320
|
+
className: "img-wrap"
|
|
321
|
+
}, item.image.open && _this.getImageHtml(item)), item.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
322
|
+
className: "title",
|
|
323
|
+
data: item.title,
|
|
324
|
+
readonly: true
|
|
325
|
+
}));
|
|
326
|
+
}))));
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
OrdersMobile.defaultProps = {
|
|
330
|
+
data: {}
|
|
331
|
+
};
|
|
332
|
+
return OrdersMobile;
|
|
333
|
+
}(_react["default"].Component);
|
|
334
|
+
|
|
335
|
+
var _default = OrdersMobile;
|
|
336
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
.orders-mobile {
|
|
2
|
+
height: 1.4rem;
|
|
3
|
+
}
|
|
4
|
+
.orders-mobile .fixed-wrap {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
background-color: #fff;
|
|
8
|
+
box-shadow: 0 0.06rem 0.12rem rgba(0, 0, 0, 0.16);
|
|
9
|
+
border-radius: 0.32rem;
|
|
10
|
+
width: auto;
|
|
11
|
+
position: absolute;
|
|
12
|
+
z-index: 3;
|
|
13
|
+
left: 0.32rem;
|
|
14
|
+
right: 0.32rem;
|
|
15
|
+
top: -1.4rem;
|
|
16
|
+
padding: 0.32rem;
|
|
17
|
+
}
|
|
18
|
+
.orders-mobile .fixed-wrap .top {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: row;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
font-weight: 600;
|
|
23
|
+
line-height: 0.36rem;
|
|
24
|
+
color: var(--font-color);
|
|
25
|
+
}
|
|
26
|
+
.orders-mobile .fixed-wrap .top .title {
|
|
27
|
+
font-size: 0.28rem;
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
color: #2C2C2C;
|
|
30
|
+
}
|
|
31
|
+
.orders-mobile .fixed-wrap .top .btn-wrap {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: row;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
align-items: center;
|
|
36
|
+
}
|
|
37
|
+
.orders-mobile .fixed-wrap .top .btn-wrap .text {
|
|
38
|
+
font-size: 0.28rem;
|
|
39
|
+
color: #929292;
|
|
40
|
+
font-weight: 400;
|
|
41
|
+
margin-right: 0.08rem;
|
|
42
|
+
}
|
|
43
|
+
.orders-mobile .fixed-wrap .list {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: row;
|
|
46
|
+
justify-content: space-between;
|
|
47
|
+
margin-top: 0.48rem;
|
|
48
|
+
margin-bottom: 0.02rem;
|
|
49
|
+
}
|
|
50
|
+
.orders-mobile .fixed-wrap .list .item {
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
align-items: center;
|
|
55
|
+
flex: 1;
|
|
56
|
+
}
|
|
57
|
+
.orders-mobile .fixed-wrap .list .item .img-wrap {
|
|
58
|
+
position: relative;
|
|
59
|
+
display: flex;
|
|
60
|
+
margin-bottom: 0.16rem;
|
|
61
|
+
width: 0.72rem;
|
|
62
|
+
height: 0.72rem;
|
|
63
|
+
}
|
|
64
|
+
.orders-mobile .fixed-wrap .list .item .img-wrap .pot {
|
|
65
|
+
display: inline-block;
|
|
66
|
+
padding: 0 0.08rem;
|
|
67
|
+
background: #ce1126;
|
|
68
|
+
border: 0.02rem solid #ce1126;
|
|
69
|
+
font-size: 0.16rem;
|
|
70
|
+
text-align: center;
|
|
71
|
+
color: #fff;
|
|
72
|
+
position: absolute;
|
|
73
|
+
top: -0.04rem;
|
|
74
|
+
left: 0.4rem;
|
|
75
|
+
min-width: 0.32rem;
|
|
76
|
+
height: 0.32rem;
|
|
77
|
+
border-radius: 50%;
|
|
78
|
+
line-height: 0.3rem;
|
|
79
|
+
}
|
|
80
|
+
.orders-mobile .fixed-wrap .list .item .title {
|
|
81
|
+
height: 0.44rem;
|
|
82
|
+
font-size: 0.24rem;
|
|
83
|
+
line-height: 0.22rem;
|
|
84
|
+
color: #2C2C2C;
|
|
85
|
+
text-align: center;
|
|
86
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getDefaultJSON = exports.PersonalInfoGroupSourceJSON = void 0;
|
|
7
|
+
|
|
8
|
+
var _uuid = require("uuid");
|
|
9
|
+
|
|
10
|
+
var PersonalInfoGroupSourceJSON = function PersonalInfoGroupSourceJSON(text) {
|
|
11
|
+
var groupId = (0, _uuid.v4)();
|
|
12
|
+
return {
|
|
13
|
+
id: groupId,
|
|
14
|
+
title: {
|
|
15
|
+
parentId: groupId,
|
|
16
|
+
id: (0, _uuid.v4)(),
|
|
17
|
+
open: true,
|
|
18
|
+
type: 'TEXT',
|
|
19
|
+
specialContent: [],
|
|
20
|
+
text: text || 'Name',
|
|
21
|
+
content: {
|
|
22
|
+
sizeType: 'Customize font styles',
|
|
23
|
+
fontFamily: 'Open Sans',
|
|
24
|
+
fontWeight: 400,
|
|
25
|
+
fontSize: 12,
|
|
26
|
+
color: '#fff',
|
|
27
|
+
width: 0,
|
|
28
|
+
textAlign: 'center'
|
|
29
|
+
},
|
|
30
|
+
underline: {
|
|
31
|
+
open: false,
|
|
32
|
+
textDecorationColor: '',
|
|
33
|
+
textDecorationStyle: 'solid'
|
|
34
|
+
},
|
|
35
|
+
vertical: {}
|
|
36
|
+
},
|
|
37
|
+
number: {
|
|
38
|
+
parentId: groupId,
|
|
39
|
+
id: (0, _uuid.v4)(),
|
|
40
|
+
open: true,
|
|
41
|
+
type: 'TEXT',
|
|
42
|
+
specialContent: [],
|
|
43
|
+
text: 0,
|
|
44
|
+
content: {
|
|
45
|
+
sizeType: 'Customize font styles',
|
|
46
|
+
fontFamily: 'Open Sans',
|
|
47
|
+
fontWeight: 600,
|
|
48
|
+
fontSize: 18,
|
|
49
|
+
color: '#fff',
|
|
50
|
+
width: 0,
|
|
51
|
+
textAlign: 'center'
|
|
52
|
+
},
|
|
53
|
+
underline: {
|
|
54
|
+
open: false,
|
|
55
|
+
textDecorationColor: '',
|
|
56
|
+
textDecorationStyle: 'solid'
|
|
57
|
+
},
|
|
58
|
+
vertical: {}
|
|
59
|
+
},
|
|
60
|
+
sourceType: text
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
exports.PersonalInfoGroupSourceJSON = PersonalInfoGroupSourceJSON;
|
|
65
|
+
|
|
66
|
+
var getDefaultJSON = function getDefaultJSON() {
|
|
67
|
+
return {
|
|
68
|
+
id: (0, _uuid.v4)(),
|
|
69
|
+
type: 'PERSONAL_INFOMATION',
|
|
70
|
+
login: {
|
|
71
|
+
open: true
|
|
72
|
+
},
|
|
73
|
+
groupSource: [PersonalInfoGroupSourceJSON('Wishlist'), PersonalInfoGroupSourceJSON('Stores'), PersonalInfoGroupSourceJSON('Coupons'), PersonalInfoGroupSourceJSON('Recently Viewed')],
|
|
74
|
+
spacing: {
|
|
75
|
+
pc: {
|
|
76
|
+
paddingTop: 0,
|
|
77
|
+
paddingBottom: 0,
|
|
78
|
+
marginBottom: 0
|
|
79
|
+
},
|
|
80
|
+
mobile: {
|
|
81
|
+
paddingTop: 0,
|
|
82
|
+
paddingBottom: 0,
|
|
83
|
+
marginBottom: 0
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
background: {
|
|
87
|
+
opacity: 100,
|
|
88
|
+
color: '#3d5fa4',
|
|
89
|
+
image: '',
|
|
90
|
+
bgType: 'color'
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
exports.getDefaultJSON = getDefaultJSON;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _mobile = _interopRequireDefault(require("./mobile"));
|
|
11
|
+
|
|
12
|
+
var _defaultJSON = require("./defaultJSON");
|
|
13
|
+
|
|
14
|
+
var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
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
|
+
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); }
|
|
23
|
+
|
|
24
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
25
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
26
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
27
|
+
__proto__: []
|
|
28
|
+
} instanceof Array && function (d, b) {
|
|
29
|
+
d.__proto__ = b;
|
|
30
|
+
} || function (d, b) {
|
|
31
|
+
for (var p in b) {
|
|
32
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return _extendStatics(d, b);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return function (d, b) {
|
|
40
|
+
_extendStatics(d, b);
|
|
41
|
+
|
|
42
|
+
function __() {
|
|
43
|
+
this.constructor = d;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
47
|
+
};
|
|
48
|
+
}();
|
|
49
|
+
|
|
50
|
+
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
51
|
+
var c = arguments.length,
|
|
52
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
53
|
+
d;
|
|
54
|
+
if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
|
|
55
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
56
|
+
}
|
|
57
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var PersonalInformation =
|
|
61
|
+
/** @class */
|
|
62
|
+
function (_super) {
|
|
63
|
+
__extends(PersonalInformation, _super);
|
|
64
|
+
|
|
65
|
+
function PersonalInformation() {
|
|
66
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
PersonalInformation.prototype.render = function () {
|
|
70
|
+
var nodeData = this.props.nodeData;
|
|
71
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, window.magicDesign.device === 'pc' ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null) : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
|
|
72
|
+
data: nodeData
|
|
73
|
+
}));
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
PersonalInformation.defaultProps = {};
|
|
77
|
+
PersonalInformation.type = 'PERSONAL_INFOMATION';
|
|
78
|
+
PersonalInformation.getDefaultJSON = _defaultJSON.getDefaultJSON;
|
|
79
|
+
PersonalInformation = __decorate([_compositeDecorator["default"]], PersonalInformation);
|
|
80
|
+
return PersonalInformation;
|
|
81
|
+
}(_react.Component);
|
|
82
|
+
|
|
83
|
+
var _default = PersonalInformation;
|
|
84
|
+
exports["default"] = _default;
|