@fonixtree/magic-design 2.0.120 → 2.0.122
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 +11 -3
- 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/assets/images/layout-icon/monpaySignBoardLayout1.png +0 -0
- package/es/common/Iconfont/index.js +5 -2
- package/es/composite-comp/dito/components/Bargain/defaultJSON.js +3 -3
- package/es/composite-comp/dito/components/Bargain/index.js +10 -10
- package/es/composite-comp/dito/components/Bargain/mobile/index.js +16 -13
- package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +3 -3
- package/es/composite-comp/monpay/components/MonpaySignBoard/defaultJSON.js +111 -0
- package/es/composite-comp/monpay/components/MonpaySignBoard/index.js +86 -0
- package/es/composite-comp/monpay/components/MonpaySignBoard/mobile/index.js +446 -0
- package/es/composite-comp/monpay/components/MonpaySignBoard/mobile/index.less +107 -0
- package/es/composite-comp/monpay/config-panels/MonpaySignBoardConfig/ConfigContent/index.js +155 -0
- package/es/composite-comp/monpay/config-panels/MonpaySignBoardConfig/index.js +104 -0
- package/es/constants/component-types.js +6 -2
- package/es/constants/index.js +4 -0
- package/es/constants/layout.js +10 -2
- package/es/core/Designer/ConfigPanel/TerminalSelect/index.js +3 -1
- package/es/core/Designer/QuickMenuBar/index.js +3 -3
- package/es/locale/en/en.json +11 -1
- package/es/locale/es/es.json +11 -1
- package/es/locale/id/id.json +11 -1
- package/es/utils/commonUtil.js +28 -1
- package/lib/assets/fonts/magic-box-iconfont.css +11 -3
- 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/assets/images/layout-icon/monpaySignBoardLayout1.png +0 -0
- package/lib/common/Iconfont/index.js +5 -2
- package/lib/composite-comp/dito/components/Bargain/defaultJSON.js +3 -3
- package/lib/composite-comp/dito/components/Bargain/index.js +10 -10
- package/lib/composite-comp/dito/components/Bargain/mobile/index.js +16 -13
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +3 -3
- package/lib/composite-comp/monpay/components/MonpaySignBoard/defaultJSON.js +111 -0
- package/lib/composite-comp/monpay/components/MonpaySignBoard/index.js +86 -0
- package/lib/composite-comp/monpay/components/MonpaySignBoard/mobile/index.js +446 -0
- package/lib/composite-comp/monpay/components/MonpaySignBoard/mobile/index.less +107 -0
- package/lib/composite-comp/monpay/config-panels/MonpaySignBoardConfig/ConfigContent/index.js +155 -0
- package/lib/composite-comp/monpay/config-panels/MonpaySignBoardConfig/index.js +104 -0
- package/lib/constants/component-types.js +6 -2
- package/lib/constants/index.js +4 -0
- package/lib/constants/layout.js +10 -2
- package/lib/core/Designer/ConfigPanel/TerminalSelect/index.js +3 -1
- package/lib/core/Designer/QuickMenuBar/index.js +3 -3
- package/lib/locale/en/en.json +11 -1
- package/lib/locale/es/es.json +11 -1
- package/lib/locale/id/id.json +11 -1
- package/lib/utils/commonUtil.js +28 -1
- package/package.json +1 -1
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
require("./index.less");
|
|
11
|
+
|
|
12
|
+
var _antd = require("antd4");
|
|
13
|
+
|
|
14
|
+
var _common = require("../../../../../common");
|
|
15
|
+
|
|
16
|
+
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
17
|
+
|
|
18
|
+
var _locale = require("../../../../../locale");
|
|
19
|
+
|
|
20
|
+
var _components = require("../../../../../meta-comp/components");
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": 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 __assign = void 0 && (void 0).__assign || function () {
|
|
51
|
+
__assign = Object.assign || function (t) {
|
|
52
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
53
|
+
s = arguments[i];
|
|
54
|
+
|
|
55
|
+
for (var p in s) {
|
|
56
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return t;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return __assign.apply(this, arguments);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
67
|
+
function adopt(value) {
|
|
68
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
69
|
+
resolve(value);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
74
|
+
function fulfilled(value) {
|
|
75
|
+
try {
|
|
76
|
+
step(generator.next(value));
|
|
77
|
+
} catch (e) {
|
|
78
|
+
reject(e);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function rejected(value) {
|
|
83
|
+
try {
|
|
84
|
+
step(generator["throw"](value));
|
|
85
|
+
} catch (e) {
|
|
86
|
+
reject(e);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function step(result) {
|
|
91
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
99
|
+
var _ = {
|
|
100
|
+
label: 0,
|
|
101
|
+
sent: function sent() {
|
|
102
|
+
if (t[0] & 1) throw t[1];
|
|
103
|
+
return t[1];
|
|
104
|
+
},
|
|
105
|
+
trys: [],
|
|
106
|
+
ops: []
|
|
107
|
+
},
|
|
108
|
+
f,
|
|
109
|
+
y,
|
|
110
|
+
t,
|
|
111
|
+
g;
|
|
112
|
+
return g = {
|
|
113
|
+
next: verb(0),
|
|
114
|
+
"throw": verb(1),
|
|
115
|
+
"return": verb(2)
|
|
116
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
117
|
+
return this;
|
|
118
|
+
}), g;
|
|
119
|
+
|
|
120
|
+
function verb(n) {
|
|
121
|
+
return function (v) {
|
|
122
|
+
return step([n, v]);
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function step(op) {
|
|
127
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
128
|
+
|
|
129
|
+
while (_) {
|
|
130
|
+
try {
|
|
131
|
+
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;
|
|
132
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
133
|
+
|
|
134
|
+
switch (op[0]) {
|
|
135
|
+
case 0:
|
|
136
|
+
case 1:
|
|
137
|
+
t = op;
|
|
138
|
+
break;
|
|
139
|
+
|
|
140
|
+
case 4:
|
|
141
|
+
_.label++;
|
|
142
|
+
return {
|
|
143
|
+
value: op[1],
|
|
144
|
+
done: false
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
case 5:
|
|
148
|
+
_.label++;
|
|
149
|
+
y = op[1];
|
|
150
|
+
op = [0];
|
|
151
|
+
continue;
|
|
152
|
+
|
|
153
|
+
case 7:
|
|
154
|
+
op = _.ops.pop();
|
|
155
|
+
|
|
156
|
+
_.trys.pop();
|
|
157
|
+
|
|
158
|
+
continue;
|
|
159
|
+
|
|
160
|
+
default:
|
|
161
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
162
|
+
_ = 0;
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
167
|
+
_.label = op[1];
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
172
|
+
_.label = t[1];
|
|
173
|
+
t = op;
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (t && _.label < t[2]) {
|
|
178
|
+
_.label = t[2];
|
|
179
|
+
|
|
180
|
+
_.ops.push(op);
|
|
181
|
+
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if (t[2]) _.ops.pop();
|
|
186
|
+
|
|
187
|
+
_.trys.pop();
|
|
188
|
+
|
|
189
|
+
continue;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
op = body.call(thisArg, _);
|
|
193
|
+
} catch (e) {
|
|
194
|
+
op = [6, e];
|
|
195
|
+
y = 0;
|
|
196
|
+
} finally {
|
|
197
|
+
f = t = 0;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
if (op[0] & 5) throw op[1];
|
|
202
|
+
return {
|
|
203
|
+
value: op[0] ? op[1] : void 0,
|
|
204
|
+
done: true
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
var SignBoardMobile =
|
|
210
|
+
/** @class */
|
|
211
|
+
function (_super) {
|
|
212
|
+
__extends(SignBoardMobile, _super);
|
|
213
|
+
|
|
214
|
+
function SignBoardMobile() {
|
|
215
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
216
|
+
|
|
217
|
+
_this.state = {
|
|
218
|
+
storeInfo: {},
|
|
219
|
+
isFollow: false,
|
|
220
|
+
inputVal: ''
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
_this.getStoreInfo = function () {
|
|
224
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
225
|
+
var storeId, storeDetailInfo;
|
|
226
|
+
return __generator(this, function (_a) {
|
|
227
|
+
switch (_a.label) {
|
|
228
|
+
case 0:
|
|
229
|
+
storeId = window.magicDesign.storeId;
|
|
230
|
+
if (!storeId) return [3
|
|
231
|
+
/*break*/
|
|
232
|
+
, 2];
|
|
233
|
+
return [4
|
|
234
|
+
/*yield*/
|
|
235
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET')];
|
|
236
|
+
|
|
237
|
+
case 1:
|
|
238
|
+
storeDetailInfo = _a.sent();
|
|
239
|
+
this.setState({
|
|
240
|
+
storeInfo: storeDetailInfo,
|
|
241
|
+
isFollow: storeDetailInfo.userHasFollowed == 'Y'
|
|
242
|
+
});
|
|
243
|
+
_a.label = 2;
|
|
244
|
+
|
|
245
|
+
case 2:
|
|
246
|
+
return [2
|
|
247
|
+
/*return*/
|
|
248
|
+
];
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
});
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
_this.searchProduct = function () {
|
|
255
|
+
var storeId = window.magicDesign.storeId;
|
|
256
|
+
(0, _commonUtil.navigateTo)('/product/list', {
|
|
257
|
+
q: _this.state.inputVal,
|
|
258
|
+
storeId: storeId
|
|
259
|
+
});
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
_this.clickCollect = function () {
|
|
263
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
264
|
+
var storeId, isFollow, error_1;
|
|
265
|
+
return __generator(this, function (_a) {
|
|
266
|
+
switch (_a.label) {
|
|
267
|
+
case 0:
|
|
268
|
+
storeId = window.magicDesign.storeId;
|
|
269
|
+
isFollow = this.state.isFollow;
|
|
270
|
+
if (!storeId) return [3
|
|
271
|
+
/*break*/
|
|
272
|
+
, 4];
|
|
273
|
+
_a.label = 1;
|
|
274
|
+
|
|
275
|
+
case 1:
|
|
276
|
+
_a.trys.push([1, 3,, 4]);
|
|
277
|
+
|
|
278
|
+
return [4
|
|
279
|
+
/*yield*/
|
|
280
|
+
, (0, _commonUtil.commonFetch)('/designer/v1/h5/collection/store', {
|
|
281
|
+
storeId: storeId,
|
|
282
|
+
operationType: isFollow ? 'D' : 'A'
|
|
283
|
+
}, 'post')];
|
|
284
|
+
|
|
285
|
+
case 2:
|
|
286
|
+
_a.sent();
|
|
287
|
+
|
|
288
|
+
this.setState({
|
|
289
|
+
isFollow: !isFollow
|
|
290
|
+
});
|
|
291
|
+
return [3
|
|
292
|
+
/*break*/
|
|
293
|
+
, 4];
|
|
294
|
+
|
|
295
|
+
case 3:
|
|
296
|
+
error_1 = _a.sent();
|
|
297
|
+
console.log(error_1);
|
|
298
|
+
return [3
|
|
299
|
+
/*break*/
|
|
300
|
+
, 4];
|
|
301
|
+
|
|
302
|
+
case 4:
|
|
303
|
+
return [2
|
|
304
|
+
/*return*/
|
|
305
|
+
];
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
});
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
_this.onChangeVal = function (val) {
|
|
312
|
+
_this.setState({
|
|
313
|
+
inputVal: val
|
|
314
|
+
});
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
_this.keyUp = function (e) {
|
|
318
|
+
if (e.keyCode === 13) {
|
|
319
|
+
_this.searchProduct();
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
_this.onShare = function () {};
|
|
324
|
+
|
|
325
|
+
return _this;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
SignBoardMobile.prototype.componentDidMount = function () {
|
|
329
|
+
window.magicDesign.storeId = 2;
|
|
330
|
+
this.getStoreInfo();
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
SignBoardMobile.prototype.render = function () {
|
|
334
|
+
var _this = this;
|
|
335
|
+
|
|
336
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
337
|
+
|
|
338
|
+
var data = this.props.data;
|
|
339
|
+
var _o = this.state,
|
|
340
|
+
storeInfo = _o.storeInfo,
|
|
341
|
+
isFollow = _o.isFollow,
|
|
342
|
+
inputVal = _o.inputVal;
|
|
343
|
+
var ratesMap = (storeInfo.storeEvaluationRates || []).reduce(function (res, item) {
|
|
344
|
+
return res[item.servEvalType] = item.rateValue, res;
|
|
345
|
+
}, {});
|
|
346
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
347
|
+
className: "m-sign-board-wrap"
|
|
348
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
349
|
+
className: "header-wrap"
|
|
350
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
351
|
+
onClick: _commonUtil.navigateBack,
|
|
352
|
+
color: "#000",
|
|
353
|
+
size: (0, _commonUtil.convertToRem)(20),
|
|
354
|
+
type: "icon-outlined-left"
|
|
355
|
+
}), ((_b = (_a = data.content) === null || _a === void 0 ? void 0 : _a.box) === null || _b === void 0 ? void 0 : _b.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
356
|
+
className: "input-wrap",
|
|
357
|
+
style: {
|
|
358
|
+
backgroundColor: data.content.box.backgroundColor,
|
|
359
|
+
borderColor: data.content.box.color
|
|
360
|
+
}
|
|
361
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
362
|
+
onChange: function onChange(e) {
|
|
363
|
+
return _this.onChangeVal(e.target.value);
|
|
364
|
+
},
|
|
365
|
+
onKeyUp: this.keyUp,
|
|
366
|
+
placeholder: (0, _locale.i18n)('SEARCH_IN_SHOP'),
|
|
367
|
+
value: inputVal
|
|
368
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
369
|
+
className: "search-icon",
|
|
370
|
+
onClick: this.searchProduct
|
|
371
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
372
|
+
color: "#545454",
|
|
373
|
+
size: (0, _commonUtil.convertToRem)(20),
|
|
374
|
+
fontWeight: 600,
|
|
375
|
+
type: "icon-search2"
|
|
376
|
+
}))), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
377
|
+
color: "#000",
|
|
378
|
+
size: (0, _commonUtil.convertToRem)(20),
|
|
379
|
+
type: "icon-share-points",
|
|
380
|
+
onClick: this.onShare
|
|
381
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
382
|
+
className: "store-info-wrap"
|
|
383
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
384
|
+
className: "store-logo",
|
|
385
|
+
src: storeInfo.storeLogoUrl
|
|
386
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
387
|
+
className: "center"
|
|
388
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
389
|
+
className: "top"
|
|
390
|
+
}, ((_d = (_c = data.content) === null || _c === void 0 ? void 0 : _c.storeName) === null || _d === void 0 ? void 0 : _d.open) && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
391
|
+
className: "store-name",
|
|
392
|
+
data: __assign(__assign({}, data.content.storeName), {
|
|
393
|
+
text: storeInfo.storeName
|
|
394
|
+
})
|
|
395
|
+
}), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
396
|
+
color: "#00C07B",
|
|
397
|
+
size: (0, _commonUtil.convertToRem)(16),
|
|
398
|
+
type: "icon-star-check"
|
|
399
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
400
|
+
className: "store-veri"
|
|
401
|
+
}, (0, _locale.i18n)('VERIFIED')))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
402
|
+
className: "bottom"
|
|
403
|
+
}, ((_f = (_e = data.content) === null || _e === void 0 ? void 0 : _e.rating) === null || _f === void 0 ? void 0 : _f.open) && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
404
|
+
color: "#FFD704",
|
|
405
|
+
size: (0, _commonUtil.convertToRem)(12),
|
|
406
|
+
type: "icon-star"
|
|
407
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
408
|
+
className: "rate"
|
|
409
|
+
}, storeInfo.storeEvalValue ? Number(storeInfo.storeEvalValue / 100).toFixed(1) : '5.0')), ((_h = (_g = data.content) === null || _g === void 0 ? void 0 : _g.followers) === null || _h === void 0 ? void 0 : _h.open) && /*#__PURE__*/_react["default"].createElement("span", {
|
|
410
|
+
className: "followers"
|
|
411
|
+
}, storeInfo.userCollectionNum || 0, " ", (0, _locale.i18n)('FOLLOWERS')))), ((_k = (_j = data.content) === null || _j === void 0 ? void 0 : _j.followButton) === null || _k === void 0 ? void 0 : _k.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
412
|
+
onClick: this.clickCollect
|
|
413
|
+
}, isFollow ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
414
|
+
className: "btn-follow"
|
|
415
|
+
}, (0, _locale.i18n)('FOLLOWED')) : /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
416
|
+
style: {
|
|
417
|
+
pointerEvents: 'none'
|
|
418
|
+
},
|
|
419
|
+
data: __assign(__assign({}, data.content.followButton), {
|
|
420
|
+
text: 'Follow'
|
|
421
|
+
})
|
|
422
|
+
}))), ((_m = (_l = data.content) === null || _l === void 0 ? void 0 : _l.ratingDetails) === null || _m === void 0 ? void 0 : _m.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
423
|
+
className: "rates-list"
|
|
424
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
425
|
+
className: "item"
|
|
426
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
427
|
+
className: "num"
|
|
428
|
+
}, ratesMap[1] ? Number(ratesMap[1] / 100).toFixed(1) : '5.0'), /*#__PURE__*/_react["default"].createElement("span", null, (0, _locale.i18n)('COMMODITY_QUALITY'))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
429
|
+
className: "item"
|
|
430
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
431
|
+
className: "num"
|
|
432
|
+
}, ratesMap[3] ? Number(ratesMap[3] / 100).toFixed(1) : '5.0'), /*#__PURE__*/_react["default"].createElement("span", null, (0, _locale.i18n)('SHIP_ON_TIME'))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
433
|
+
className: "item"
|
|
434
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
435
|
+
className: "num"
|
|
436
|
+
}, ratesMap[2] ? Number(ratesMap[2] / 100).toFixed(1) : '5.0'), /*#__PURE__*/_react["default"].createElement("span", null, (0, _locale.i18n)('STORE_SERVICES')))));
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
SignBoardMobile.defaultProps = {
|
|
440
|
+
data: {}
|
|
441
|
+
};
|
|
442
|
+
return SignBoardMobile;
|
|
443
|
+
}(_react["default"].Component);
|
|
444
|
+
|
|
445
|
+
var _default = SignBoardMobile;
|
|
446
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
.m-sign-board-wrap .header-wrap {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
background-color: #fff;
|
|
6
|
+
padding: 0.16rem 0.4rem;
|
|
7
|
+
height: 1.14rem;
|
|
8
|
+
}
|
|
9
|
+
.m-sign-board-wrap .header-wrap .input-wrap {
|
|
10
|
+
border: 0.02rem solid #F2F2F2;
|
|
11
|
+
background-color: #F2F2F2;
|
|
12
|
+
border-radius: 0.16rem;
|
|
13
|
+
padding: 0.16rem 0.24rem;
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
align-items: center;
|
|
17
|
+
}
|
|
18
|
+
.m-sign-board-wrap .header-wrap .input-wrap input {
|
|
19
|
+
width: 3.7rem;
|
|
20
|
+
margin-right: 0.3rem;
|
|
21
|
+
height: 0.44rem;
|
|
22
|
+
font-weight: 400;
|
|
23
|
+
font-size: 0.32rem;
|
|
24
|
+
line-height: 0.4rem;
|
|
25
|
+
background-color: transparent;
|
|
26
|
+
border: none;
|
|
27
|
+
outline: none;
|
|
28
|
+
padding: 0;
|
|
29
|
+
}
|
|
30
|
+
.m-sign-board-wrap .header-wrap .input-wrap input:focus {
|
|
31
|
+
outline: none;
|
|
32
|
+
box-shadow: none;
|
|
33
|
+
}
|
|
34
|
+
.m-sign-board-wrap .store-info-wrap {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
margin-top: 0.4rem;
|
|
38
|
+
padding: 0.24rem 0.4rem;
|
|
39
|
+
}
|
|
40
|
+
.m-sign-board-wrap .store-info-wrap .store-logo {
|
|
41
|
+
width: 0.8rem;
|
|
42
|
+
height: 0.8rem;
|
|
43
|
+
border-radius: 50%;
|
|
44
|
+
margin-right: 0.2rem;
|
|
45
|
+
}
|
|
46
|
+
.m-sign-board-wrap .store-info-wrap .center {
|
|
47
|
+
flex: auto;
|
|
48
|
+
}
|
|
49
|
+
.m-sign-board-wrap .store-info-wrap .center .top {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
}
|
|
53
|
+
.m-sign-board-wrap .store-info-wrap .center .top .store-name {
|
|
54
|
+
margin-right: 0.2rem;
|
|
55
|
+
width: fit-content !important;
|
|
56
|
+
}
|
|
57
|
+
.m-sign-board-wrap .store-info-wrap .center .top .store-veri {
|
|
58
|
+
color: #00C07B;
|
|
59
|
+
font-size: 0.16rem;
|
|
60
|
+
font-weight: 400;
|
|
61
|
+
margin-left: 0.04rem;
|
|
62
|
+
}
|
|
63
|
+
.m-sign-board-wrap .store-info-wrap .center .bottom {
|
|
64
|
+
margin-top: 0.1rem;
|
|
65
|
+
font-size: 0.2rem;
|
|
66
|
+
font-weight: 400;
|
|
67
|
+
color: #545454;
|
|
68
|
+
}
|
|
69
|
+
.m-sign-board-wrap .store-info-wrap .center .bottom .rate {
|
|
70
|
+
margin-left: 0.08rem;
|
|
71
|
+
}
|
|
72
|
+
.m-sign-board-wrap .store-info-wrap .center .bottom .followers:before {
|
|
73
|
+
display: inline-block;
|
|
74
|
+
content: '';
|
|
75
|
+
width: 0.02rem;
|
|
76
|
+
height: 0.24rem;
|
|
77
|
+
background-color: #545454;
|
|
78
|
+
margin: 0 0.12rem;
|
|
79
|
+
vertical-align: sub;
|
|
80
|
+
}
|
|
81
|
+
.m-sign-board-wrap .store-info-wrap .btn-follow {
|
|
82
|
+
padding: 0.24rem 0.48rem;
|
|
83
|
+
background-color: #E4E4E4;
|
|
84
|
+
color: #232323;
|
|
85
|
+
border-radius: 0.16rem;
|
|
86
|
+
font-weight: 400;
|
|
87
|
+
font-size: 0.24rem;
|
|
88
|
+
}
|
|
89
|
+
.m-sign-board-wrap .rates-list {
|
|
90
|
+
display: flex;
|
|
91
|
+
justify-content: space-between;
|
|
92
|
+
padding: 0.24rem 0.4rem;
|
|
93
|
+
}
|
|
94
|
+
.m-sign-board-wrap .rates-list .item {
|
|
95
|
+
font-weight: 400;
|
|
96
|
+
font-size: 0.24rem;
|
|
97
|
+
color: #7B7B7B;
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
flex-direction: column;
|
|
101
|
+
}
|
|
102
|
+
.m-sign-board-wrap .rates-list .item .num {
|
|
103
|
+
color: #262626;
|
|
104
|
+
font-size: 0.32rem;
|
|
105
|
+
font-weight: 600;
|
|
106
|
+
margin-bottom: 0.08rem;
|
|
107
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
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"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _common = require("../../../../../common");
|
|
13
|
+
|
|
14
|
+
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
15
|
+
|
|
16
|
+
var _TextConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/TextConfig"));
|
|
17
|
+
|
|
18
|
+
var _ButtonConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/ButtonConfig"));
|
|
19
|
+
|
|
20
|
+
var _locale = require("../../../../../locale");
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
+
|
|
24
|
+
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); }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
29
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
30
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
31
|
+
__proto__: []
|
|
32
|
+
} instanceof Array && function (d, b) {
|
|
33
|
+
d.__proto__ = b;
|
|
34
|
+
} || function (d, b) {
|
|
35
|
+
for (var p in b) {
|
|
36
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return _extendStatics(d, b);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return function (d, b) {
|
|
44
|
+
_extendStatics(d, b);
|
|
45
|
+
|
|
46
|
+
function __() {
|
|
47
|
+
this.constructor = d;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
51
|
+
};
|
|
52
|
+
}();
|
|
53
|
+
|
|
54
|
+
var SignBoardConfigContent =
|
|
55
|
+
/** @class */
|
|
56
|
+
function (_super) {
|
|
57
|
+
__extends(SignBoardConfigContent, _super);
|
|
58
|
+
|
|
59
|
+
function SignBoardConfigContent() {
|
|
60
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
61
|
+
|
|
62
|
+
_this.selfRender = function () {
|
|
63
|
+
(0, _coreUtil.renderPreview)();
|
|
64
|
+
|
|
65
|
+
_this.setState({});
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
return _this;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
SignBoardConfigContent.prototype.render = function () {
|
|
72
|
+
var _this = this;
|
|
73
|
+
|
|
74
|
+
var panelProps = this.props.panelProps;
|
|
75
|
+
var source = [{
|
|
76
|
+
key: '1',
|
|
77
|
+
name: (0, _locale.i18n)('IN_STORE_SEARCH_BOX'),
|
|
78
|
+
value: /*#__PURE__*/_react["default"].createElement("div", {
|
|
79
|
+
className: "input_box"
|
|
80
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
81
|
+
title: (0, _locale.i18n)('BOX_COLOR')
|
|
82
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
|
|
83
|
+
colorType: "rgba",
|
|
84
|
+
onChange: function onChange(v) {
|
|
85
|
+
panelProps.box.color = v;
|
|
86
|
+
|
|
87
|
+
_this.selfRender();
|
|
88
|
+
},
|
|
89
|
+
value: panelProps.box.color
|
|
90
|
+
})), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
91
|
+
style: {
|
|
92
|
+
marginTop: 16
|
|
93
|
+
},
|
|
94
|
+
title: (0, _locale.i18n)('BOX_BACKGROUND')
|
|
95
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
|
|
96
|
+
colorType: "rgba",
|
|
97
|
+
onChange: function onChange(v) {
|
|
98
|
+
panelProps.box.backgroundColor = v;
|
|
99
|
+
|
|
100
|
+
_this.selfRender();
|
|
101
|
+
},
|
|
102
|
+
value: panelProps.box.backgroundColor
|
|
103
|
+
}))),
|
|
104
|
+
metaOption: panelProps.box,
|
|
105
|
+
toggleType: 'switch'
|
|
106
|
+
}, {
|
|
107
|
+
key: '2',
|
|
108
|
+
name: (0, _locale.i18n)('STORE_NAME'),
|
|
109
|
+
value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
|
|
110
|
+
data: panelProps.storeName
|
|
111
|
+
}),
|
|
112
|
+
metaOption: panelProps.storeName,
|
|
113
|
+
toggleType: 'switch'
|
|
114
|
+
}, {
|
|
115
|
+
key: '3',
|
|
116
|
+
name: (0, _locale.i18n)('FOLLOW_BUTTON'),
|
|
117
|
+
value: /*#__PURE__*/_react["default"].createElement(_ButtonConfig["default"], {
|
|
118
|
+
data: panelProps.followButton
|
|
119
|
+
}),
|
|
120
|
+
metaOption: panelProps.followButton,
|
|
121
|
+
toggleType: 'switch'
|
|
122
|
+
}, {
|
|
123
|
+
key: '4',
|
|
124
|
+
name: (0, _locale.i18n)('RATING'),
|
|
125
|
+
value: null,
|
|
126
|
+
metaOption: panelProps.rating,
|
|
127
|
+
toggleType: 'switch'
|
|
128
|
+
}, {
|
|
129
|
+
key: '5',
|
|
130
|
+
name: (0, _locale.i18n)('FOLLOWERS'),
|
|
131
|
+
value: null,
|
|
132
|
+
metaOption: panelProps.followers,
|
|
133
|
+
toggleType: 'switch'
|
|
134
|
+
}, {
|
|
135
|
+
key: '6',
|
|
136
|
+
name: (0, _locale.i18n)('RATING_DETAILS'),
|
|
137
|
+
value: null,
|
|
138
|
+
metaOption: panelProps.ratingDetails,
|
|
139
|
+
toggleType: 'switch'
|
|
140
|
+
}];
|
|
141
|
+
return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
142
|
+
headerSize: "middle",
|
|
143
|
+
noChange: true,
|
|
144
|
+
onRefresh: this.selfRender,
|
|
145
|
+
showActiveColor: true,
|
|
146
|
+
source: source,
|
|
147
|
+
type: "switch"
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
return SignBoardConfigContent;
|
|
152
|
+
}(_react.Component);
|
|
153
|
+
|
|
154
|
+
var _default = SignBoardConfigContent;
|
|
155
|
+
exports["default"] = _default;
|