@fonixtree/magic-design 0.1.29 → 0.1.30
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/composite-comp/dito/components/SignBoard/mobile/index.js +36 -6
- package/es/composite-comp/dito/components/SignBoard/pc/index.less +2 -0
- package/es/locale/en/en.json +1 -0
- package/es/locale/es/es.json +1 -0
- package/es/locale/id/id.json +1 -0
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +36 -6
- package/lib/composite-comp/dito/components/SignBoard/pc/index.less +2 -0
- package/lib/locale/en/en.json +1 -0
- package/lib/locale/es/es.json +1 -0
- package/lib/locale/id/id.json +1 -0
- package/package.json +1 -1
|
@@ -17,6 +17,8 @@ var _defaultImg = _interopRequireDefault(require("../../../../../common/GroupLis
|
|
|
17
17
|
|
|
18
18
|
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
19
19
|
|
|
20
|
+
var _locale = require("../../../../../locale");
|
|
21
|
+
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
23
|
|
|
22
24
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
@@ -198,7 +200,8 @@ function (_super) {
|
|
|
198
200
|
|
|
199
201
|
_this.state = {
|
|
200
202
|
storeInfo: null,
|
|
201
|
-
isFollow: false
|
|
203
|
+
isFollow: false,
|
|
204
|
+
inputVal: ''
|
|
202
205
|
};
|
|
203
206
|
|
|
204
207
|
_this.getStoreInfo = function () {
|
|
@@ -225,7 +228,6 @@ function (_super) {
|
|
|
225
228
|
|
|
226
229
|
case 2:
|
|
227
230
|
isFollow = _a.sent();
|
|
228
|
-
console.log('---d', res);
|
|
229
231
|
this.setState({
|
|
230
232
|
storeInfo: res,
|
|
231
233
|
isFollow: isFollow
|
|
@@ -241,6 +243,11 @@ function (_super) {
|
|
|
241
243
|
});
|
|
242
244
|
};
|
|
243
245
|
|
|
246
|
+
_this.searchProduct = function () {
|
|
247
|
+
var storeId = window.magicDesign.storeId;
|
|
248
|
+
clickUrl("/product/list?q=" + _this.state.inputVal + "&storeId=" + storeId);
|
|
249
|
+
};
|
|
250
|
+
|
|
244
251
|
_this.clickCollect = function () {
|
|
245
252
|
return __awaiter(_this, void 0, void 0, function () {
|
|
246
253
|
var storeId, isFollow, error_1;
|
|
@@ -290,6 +297,18 @@ function (_super) {
|
|
|
290
297
|
});
|
|
291
298
|
};
|
|
292
299
|
|
|
300
|
+
_this.onChangeVal = function (val) {
|
|
301
|
+
_this.setState({
|
|
302
|
+
inputVal: val
|
|
303
|
+
});
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
_this.keyUp = function (e) {
|
|
307
|
+
if (e.keyCode === 13) {
|
|
308
|
+
_this.searchProduct();
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
|
|
293
312
|
return _this;
|
|
294
313
|
}
|
|
295
314
|
|
|
@@ -298,26 +317,37 @@ function (_super) {
|
|
|
298
317
|
};
|
|
299
318
|
|
|
300
319
|
SignBoardMobile.prototype.render = function () {
|
|
320
|
+
var _this = this;
|
|
321
|
+
|
|
301
322
|
var data = this.props.data;
|
|
302
323
|
console.log('--SignBoard', data);
|
|
303
324
|
var _a = this.state,
|
|
304
325
|
storeInfo = _a.storeInfo,
|
|
305
|
-
isFollow = _a.isFollow
|
|
326
|
+
isFollow = _a.isFollow,
|
|
327
|
+
inputVal = _a.inputVal;
|
|
306
328
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
307
329
|
className: "m-sign-board-bar"
|
|
308
330
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
309
331
|
className: "search"
|
|
310
332
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
311
333
|
className: "search-input",
|
|
312
|
-
|
|
313
|
-
|
|
334
|
+
onChange: function onChange(e) {
|
|
335
|
+
return _this.onChangeVal(e.target.value);
|
|
336
|
+
},
|
|
337
|
+
onKeyUp: this.keyUp,
|
|
338
|
+
placeholder: (0, _locale.i18n)('SEARCH_IN_SHOP'),
|
|
339
|
+
value: inputVal
|
|
340
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
341
|
+
className: "search-icon",
|
|
342
|
+
onClick: this.searchProduct
|
|
343
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
314
344
|
color: "#696973",
|
|
315
345
|
size: (0, _commonUtil.convertToRem)(20),
|
|
316
346
|
style: {
|
|
317
347
|
display: 'flex'
|
|
318
348
|
},
|
|
319
349
|
type: "icon-search2"
|
|
320
|
-
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
350
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
321
351
|
className: "store-info-wrap"
|
|
322
352
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
323
353
|
className: "store-logo",
|
|
@@ -119,6 +119,7 @@
|
|
|
119
119
|
}
|
|
120
120
|
.follow {
|
|
121
121
|
width: fit-content;
|
|
122
|
+
cursor: pointer;
|
|
122
123
|
border: 1px solid #0D52D6;
|
|
123
124
|
border-radius: 4px;
|
|
124
125
|
padding: 8px 16px;
|
|
@@ -135,6 +136,7 @@
|
|
|
135
136
|
}
|
|
136
137
|
}
|
|
137
138
|
.followed {
|
|
139
|
+
cursor: pointer;
|
|
138
140
|
width: fit-content;
|
|
139
141
|
border: 1px solid #E0E0E0;
|
|
140
142
|
border-radius: 8px;
|
package/es/locale/en/en.json
CHANGED
package/es/locale/es/es.json
CHANGED
package/es/locale/id/id.json
CHANGED
|
@@ -17,6 +17,8 @@ var _defaultImg = _interopRequireDefault(require("../../../../../common/GroupLis
|
|
|
17
17
|
|
|
18
18
|
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
19
19
|
|
|
20
|
+
var _locale = require("../../../../../locale");
|
|
21
|
+
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
23
|
|
|
22
24
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
@@ -198,7 +200,8 @@ function (_super) {
|
|
|
198
200
|
|
|
199
201
|
_this.state = {
|
|
200
202
|
storeInfo: null,
|
|
201
|
-
isFollow: false
|
|
203
|
+
isFollow: false,
|
|
204
|
+
inputVal: ''
|
|
202
205
|
};
|
|
203
206
|
|
|
204
207
|
_this.getStoreInfo = function () {
|
|
@@ -225,7 +228,6 @@ function (_super) {
|
|
|
225
228
|
|
|
226
229
|
case 2:
|
|
227
230
|
isFollow = _a.sent();
|
|
228
|
-
console.log('---d', res);
|
|
229
231
|
this.setState({
|
|
230
232
|
storeInfo: res,
|
|
231
233
|
isFollow: isFollow
|
|
@@ -241,6 +243,11 @@ function (_super) {
|
|
|
241
243
|
});
|
|
242
244
|
};
|
|
243
245
|
|
|
246
|
+
_this.searchProduct = function () {
|
|
247
|
+
var storeId = window.magicDesign.storeId;
|
|
248
|
+
clickUrl("/product/list?q=" + _this.state.inputVal + "&storeId=" + storeId);
|
|
249
|
+
};
|
|
250
|
+
|
|
244
251
|
_this.clickCollect = function () {
|
|
245
252
|
return __awaiter(_this, void 0, void 0, function () {
|
|
246
253
|
var storeId, isFollow, error_1;
|
|
@@ -290,6 +297,18 @@ function (_super) {
|
|
|
290
297
|
});
|
|
291
298
|
};
|
|
292
299
|
|
|
300
|
+
_this.onChangeVal = function (val) {
|
|
301
|
+
_this.setState({
|
|
302
|
+
inputVal: val
|
|
303
|
+
});
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
_this.keyUp = function (e) {
|
|
307
|
+
if (e.keyCode === 13) {
|
|
308
|
+
_this.searchProduct();
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
|
|
293
312
|
return _this;
|
|
294
313
|
}
|
|
295
314
|
|
|
@@ -298,26 +317,37 @@ function (_super) {
|
|
|
298
317
|
};
|
|
299
318
|
|
|
300
319
|
SignBoardMobile.prototype.render = function () {
|
|
320
|
+
var _this = this;
|
|
321
|
+
|
|
301
322
|
var data = this.props.data;
|
|
302
323
|
console.log('--SignBoard', data);
|
|
303
324
|
var _a = this.state,
|
|
304
325
|
storeInfo = _a.storeInfo,
|
|
305
|
-
isFollow = _a.isFollow
|
|
326
|
+
isFollow = _a.isFollow,
|
|
327
|
+
inputVal = _a.inputVal;
|
|
306
328
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
307
329
|
className: "m-sign-board-bar"
|
|
308
330
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
309
331
|
className: "search"
|
|
310
332
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
311
333
|
className: "search-input",
|
|
312
|
-
|
|
313
|
-
|
|
334
|
+
onChange: function onChange(e) {
|
|
335
|
+
return _this.onChangeVal(e.target.value);
|
|
336
|
+
},
|
|
337
|
+
onKeyUp: this.keyUp,
|
|
338
|
+
placeholder: (0, _locale.i18n)('SEARCH_IN_SHOP'),
|
|
339
|
+
value: inputVal
|
|
340
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
341
|
+
className: "search-icon",
|
|
342
|
+
onClick: this.searchProduct
|
|
343
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
314
344
|
color: "#696973",
|
|
315
345
|
size: (0, _commonUtil.convertToRem)(20),
|
|
316
346
|
style: {
|
|
317
347
|
display: 'flex'
|
|
318
348
|
},
|
|
319
349
|
type: "icon-search2"
|
|
320
|
-
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
350
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
321
351
|
className: "store-info-wrap"
|
|
322
352
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
323
353
|
className: "store-logo",
|
|
@@ -119,6 +119,7 @@
|
|
|
119
119
|
}
|
|
120
120
|
.follow {
|
|
121
121
|
width: fit-content;
|
|
122
|
+
cursor: pointer;
|
|
122
123
|
border: 1px solid #0D52D6;
|
|
123
124
|
border-radius: 4px;
|
|
124
125
|
padding: 8px 16px;
|
|
@@ -135,6 +136,7 @@
|
|
|
135
136
|
}
|
|
136
137
|
}
|
|
137
138
|
.followed {
|
|
139
|
+
cursor: pointer;
|
|
138
140
|
width: fit-content;
|
|
139
141
|
border: 1px solid #E0E0E0;
|
|
140
142
|
border-radius: 8px;
|
package/lib/locale/en/en.json
CHANGED
package/lib/locale/es/es.json
CHANGED
package/lib/locale/id/id.json
CHANGED