@fonixtree/magic-design 2.0.191 → 2.0.193
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/SelectStoreModal/SortableImageList/index.js +118 -0
- package/es/common/SelectStoreModal/SortableImageList/index.less +3 -0
- package/es/common/SelectStoreModal/index.js +497 -0
- package/es/common/SelectStoreModal/index.less +152 -0
- package/es/common/StoreSource/index.js +255 -0
- package/es/common/StoreSource/index.less +14 -0
- package/es/common/index.js +8 -0
- package/es/composite-comp/public/components/Stores/defaultJSON.js +2 -1
- package/es/composite-comp/public/components/Stores/mobile/StoreItem/img/defaultHImg.png +0 -0
- package/es/composite-comp/public/components/Stores/mobile/StoreItem/img/defaultImg.png +0 -0
- package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.js +18 -6
- package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.less +15 -1
- package/es/composite-comp/public/components/Stores/mobile/index.js +11 -10
- package/es/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.js +16 -3
- package/es/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.less +14 -0
- package/es/locale/ar/ar.json +10 -1
- package/es/locale/en/en.json +10 -1
- package/es/locale/es/es.json +10 -1
- package/es/locale/mn/mn.json +10 -1
- package/es/utils/commonUtil.js +11 -1
- package/lib/common/SelectStoreModal/SortableImageList/index.js +118 -0
- package/lib/common/SelectStoreModal/SortableImageList/index.less +3 -0
- package/lib/common/SelectStoreModal/index.js +497 -0
- package/lib/common/SelectStoreModal/index.less +152 -0
- package/lib/common/StoreSource/index.js +255 -0
- package/lib/common/StoreSource/index.less +14 -0
- package/lib/common/index.js +8 -0
- package/lib/composite-comp/public/components/Stores/defaultJSON.js +2 -1
- package/lib/composite-comp/public/components/Stores/mobile/StoreItem/img/defaultHImg.png +0 -0
- package/lib/composite-comp/public/components/Stores/mobile/StoreItem/img/defaultImg.png +0 -0
- package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.js +18 -6
- package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.less +15 -1
- package/lib/composite-comp/public/components/Stores/mobile/index.js +11 -10
- package/lib/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.js +16 -3
- package/lib/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.less +14 -0
- package/lib/locale/ar/ar.json +10 -1
- package/lib/locale/en/en.json +10 -1
- package/lib/locale/es/es.json +10 -1
- package/lib/locale/mn/mn.json +10 -1
- package/lib/utils/commonUtil.js +11 -1
- package/package.json +1 -1
|
@@ -0,0 +1,255 @@
|
|
|
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"] = StoreSource;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _locale = require("../../locale");
|
|
13
|
+
|
|
14
|
+
var _commonUtil = require("../../utils/commonUtil");
|
|
15
|
+
|
|
16
|
+
var _Button = _interopRequireDefault(require("../Button"));
|
|
17
|
+
|
|
18
|
+
require("./index.less");
|
|
19
|
+
|
|
20
|
+
var _SelectStoreModal = _interopRequireDefault(require("../SelectStoreModal"));
|
|
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 __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) {
|
|
30
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
31
|
+
resolve(value);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
36
|
+
function fulfilled(value) {
|
|
37
|
+
try {
|
|
38
|
+
step(generator.next(value));
|
|
39
|
+
} catch (e) {
|
|
40
|
+
reject(e);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function rejected(value) {
|
|
45
|
+
try {
|
|
46
|
+
step(generator["throw"](value));
|
|
47
|
+
} catch (e) {
|
|
48
|
+
reject(e);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function step(result) {
|
|
53
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
61
|
+
var _ = {
|
|
62
|
+
label: 0,
|
|
63
|
+
sent: function sent() {
|
|
64
|
+
if (t[0] & 1) throw t[1];
|
|
65
|
+
return t[1];
|
|
66
|
+
},
|
|
67
|
+
trys: [],
|
|
68
|
+
ops: []
|
|
69
|
+
},
|
|
70
|
+
f,
|
|
71
|
+
y,
|
|
72
|
+
t,
|
|
73
|
+
g;
|
|
74
|
+
return g = {
|
|
75
|
+
next: verb(0),
|
|
76
|
+
"throw": verb(1),
|
|
77
|
+
"return": verb(2)
|
|
78
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
79
|
+
return this;
|
|
80
|
+
}), g;
|
|
81
|
+
|
|
82
|
+
function verb(n) {
|
|
83
|
+
return function (v) {
|
|
84
|
+
return step([n, v]);
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function step(op) {
|
|
89
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
90
|
+
|
|
91
|
+
while (_) {
|
|
92
|
+
try {
|
|
93
|
+
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;
|
|
94
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
95
|
+
|
|
96
|
+
switch (op[0]) {
|
|
97
|
+
case 0:
|
|
98
|
+
case 1:
|
|
99
|
+
t = op;
|
|
100
|
+
break;
|
|
101
|
+
|
|
102
|
+
case 4:
|
|
103
|
+
_.label++;
|
|
104
|
+
return {
|
|
105
|
+
value: op[1],
|
|
106
|
+
done: false
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
case 5:
|
|
110
|
+
_.label++;
|
|
111
|
+
y = op[1];
|
|
112
|
+
op = [0];
|
|
113
|
+
continue;
|
|
114
|
+
|
|
115
|
+
case 7:
|
|
116
|
+
op = _.ops.pop();
|
|
117
|
+
|
|
118
|
+
_.trys.pop();
|
|
119
|
+
|
|
120
|
+
continue;
|
|
121
|
+
|
|
122
|
+
default:
|
|
123
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
124
|
+
_ = 0;
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
129
|
+
_.label = op[1];
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
134
|
+
_.label = t[1];
|
|
135
|
+
t = op;
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if (t && _.label < t[2]) {
|
|
140
|
+
_.label = t[2];
|
|
141
|
+
|
|
142
|
+
_.ops.push(op);
|
|
143
|
+
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (t[2]) _.ops.pop();
|
|
148
|
+
|
|
149
|
+
_.trys.pop();
|
|
150
|
+
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
op = body.call(thisArg, _);
|
|
155
|
+
} catch (e) {
|
|
156
|
+
op = [6, e];
|
|
157
|
+
y = 0;
|
|
158
|
+
} finally {
|
|
159
|
+
f = t = 0;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
if (op[0] & 5) throw op[1];
|
|
164
|
+
return {
|
|
165
|
+
value: op[0] ? op[1] : void 0,
|
|
166
|
+
done: true
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
function StoreSource(_a) {
|
|
172
|
+
var _this = this;
|
|
173
|
+
|
|
174
|
+
var value = _a.value,
|
|
175
|
+
onChange = _a.onChange;
|
|
176
|
+
|
|
177
|
+
var _b = (0, _react.useState)([]),
|
|
178
|
+
selectedStores = _b[0],
|
|
179
|
+
setSelectedStores = _b[1];
|
|
180
|
+
|
|
181
|
+
var _c = (0, _react.useState)(false),
|
|
182
|
+
visible = _c[0],
|
|
183
|
+
setVisbile = _c[1];
|
|
184
|
+
|
|
185
|
+
var onSelectProduct = function onSelectProduct() {
|
|
186
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
187
|
+
var res;
|
|
188
|
+
return __generator(this, function (_a) {
|
|
189
|
+
switch (_a.label) {
|
|
190
|
+
case 0:
|
|
191
|
+
if (!(value && value.length > 0)) return [3
|
|
192
|
+
/*break*/
|
|
193
|
+
, 2];
|
|
194
|
+
return [4
|
|
195
|
+
/*yield*/
|
|
196
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/stores/page", {
|
|
197
|
+
storeIds: value,
|
|
198
|
+
state: 'A'
|
|
199
|
+
}, 'GET')];
|
|
200
|
+
|
|
201
|
+
case 1:
|
|
202
|
+
res = _a.sent();
|
|
203
|
+
setSelectedStores(res.list || []);
|
|
204
|
+
return [3
|
|
205
|
+
/*break*/
|
|
206
|
+
, 3];
|
|
207
|
+
|
|
208
|
+
case 2:
|
|
209
|
+
setSelectedStores([]);
|
|
210
|
+
_a.label = 3;
|
|
211
|
+
|
|
212
|
+
case 3:
|
|
213
|
+
setVisbile(true);
|
|
214
|
+
return [2
|
|
215
|
+
/*return*/
|
|
216
|
+
];
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
var handleModalSave = function handleModalSave(list) {
|
|
223
|
+
var ids = list.map(function (prod) {
|
|
224
|
+
return prod.storeId;
|
|
225
|
+
}).join(',');
|
|
226
|
+
onChange(ids);
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
var getLength = function getLength() {
|
|
230
|
+
if (!value) {
|
|
231
|
+
return 0;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
return value.split(',').length;
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
238
|
+
className: "storeSourceWrap"
|
|
239
|
+
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
240
|
+
onClick: onSelectProduct,
|
|
241
|
+
type: "primary"
|
|
242
|
+
}, (0, _locale.i18n)('SELECT_STORE')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
243
|
+
className: "total"
|
|
244
|
+
}, (0, _locale.i18n)('TOTAL_STORES', {
|
|
245
|
+
count: getLength()
|
|
246
|
+
})), visible && /*#__PURE__*/_react["default"].createElement(_SelectStoreModal["default"], {
|
|
247
|
+
closeModal: function closeModal() {
|
|
248
|
+
return setVisbile(false);
|
|
249
|
+
},
|
|
250
|
+
defaultList: selectedStores,
|
|
251
|
+
handleModalSave: handleModalSave,
|
|
252
|
+
maxSelect: 100,
|
|
253
|
+
visible: visible
|
|
254
|
+
}));
|
|
255
|
+
}
|
package/lib/common/index.js
CHANGED
|
@@ -135,6 +135,12 @@ Object.defineProperty(exports, "Slider", {
|
|
|
135
135
|
return _Slider["default"];
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
|
+
Object.defineProperty(exports, "StoreSource", {
|
|
139
|
+
enumerable: true,
|
|
140
|
+
get: function get() {
|
|
141
|
+
return _StoreSource["default"];
|
|
142
|
+
}
|
|
143
|
+
});
|
|
138
144
|
Object.defineProperty(exports, "SwiperBan", {
|
|
139
145
|
enumerable: true,
|
|
140
146
|
get: function get() {
|
|
@@ -204,6 +210,8 @@ var _ButtonIconLayout = _interopRequireDefault(require("./ButtonIconLayout"));
|
|
|
204
210
|
|
|
205
211
|
var _ProductSource = _interopRequireDefault(require("./ProductSource"));
|
|
206
212
|
|
|
213
|
+
var _StoreSource = _interopRequireDefault(require("./StoreSource"));
|
|
214
|
+
|
|
207
215
|
var _ImgArea = _interopRequireDefault(require("./ImgArea"));
|
|
208
216
|
|
|
209
217
|
var _SystemNotification = _interopRequireDefault(require("./SystemNotification"));
|
|
Binary file
|
|
Binary file
|
|
@@ -9,6 +9,10 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
|
|
12
|
+
var _defaultImg = _interopRequireDefault(require("./img/defaultImg.png"));
|
|
13
|
+
|
|
14
|
+
var _defaultHImg = _interopRequireDefault(require("./img/defaultHImg.png"));
|
|
15
|
+
|
|
12
16
|
var _commonUtil = require("../../../../../../utils/commonUtil");
|
|
13
17
|
|
|
14
18
|
var _currencyUtil = require("../../../../../../utils/currencyUtil");
|
|
@@ -121,19 +125,23 @@ function (_super) {
|
|
|
121
125
|
}, /*#__PURE__*/_react["default"].createElement(_common.NewImg, {
|
|
122
126
|
className: "product-img",
|
|
123
127
|
lazy: true,
|
|
124
|
-
src: data.storePosterUrl ||
|
|
128
|
+
src: data.storePosterUrl || _defaultHImg["default"]
|
|
125
129
|
}), freeDeliveryLabel.open && data.freeShipping === 'Y' && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
126
130
|
className: "flag",
|
|
127
131
|
data: freeDeliveryLabel
|
|
128
132
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
129
133
|
className: "content-wrap"
|
|
130
|
-
}, storeName.open && /*#__PURE__*/_react["default"].createElement(
|
|
134
|
+
}, storeName.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
135
|
+
className: "name-row"
|
|
136
|
+
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
131
137
|
className: "name",
|
|
132
138
|
data: __assign(__assign({}, storeName), {
|
|
133
139
|
text: data.storeName
|
|
134
140
|
}),
|
|
135
141
|
readonly: true
|
|
136
|
-
}),
|
|
142
|
+
}), data.newFlag === 'Y' && /*#__PURE__*/_react["default"].createElement("span", {
|
|
143
|
+
className: "new"
|
|
144
|
+
}, (0, _locale.i18n)('NEW'))), minOrder.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
137
145
|
className: "minOrder no-reversed",
|
|
138
146
|
data: __assign(__assign({}, minOrder), {
|
|
139
147
|
text: (0, _commonUtil.reverseStrArr)([(0, _locale.i18n)('MIN_ORDER'), ':', (data.minOrderAmount || 0) + " IQD"])
|
|
@@ -177,19 +185,23 @@ function (_super) {
|
|
|
177
185
|
}, /*#__PURE__*/_react["default"].createElement(_common.NewImg, {
|
|
178
186
|
className: "product-img",
|
|
179
187
|
lazy: true,
|
|
180
|
-
src: data.
|
|
188
|
+
src: data.storeLogoUrl || _defaultImg["default"]
|
|
181
189
|
}), freeDeliveryLabel.open && data.freeShipping === 'Y' && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
182
190
|
className: "flag",
|
|
183
191
|
data: freeDeliveryLabel
|
|
184
192
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
185
193
|
className: "content-wrap"
|
|
186
|
-
}, storeName.open && /*#__PURE__*/_react["default"].createElement(
|
|
194
|
+
}, storeName.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
195
|
+
className: "name-row"
|
|
196
|
+
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
187
197
|
className: "name",
|
|
188
198
|
data: __assign(__assign({}, storeName), {
|
|
189
199
|
text: data.storeName
|
|
190
200
|
}),
|
|
191
201
|
readonly: true
|
|
192
|
-
}),
|
|
202
|
+
}), data.newFlag === 'Y' && /*#__PURE__*/_react["default"].createElement("span", {
|
|
203
|
+
className: "new"
|
|
204
|
+
}, (0, _locale.i18n)('NEW'))), storeDesc.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
193
205
|
className: "desc",
|
|
194
206
|
data: __assign(__assign({}, storeDesc), {
|
|
195
207
|
text: data.comments
|
|
@@ -24,10 +24,24 @@
|
|
|
24
24
|
padding: 0.12rem 0.2rem;
|
|
25
25
|
width: 4.4rem;
|
|
26
26
|
}
|
|
27
|
-
.m-store-item-wrap .content-wrap .name {
|
|
27
|
+
.m-store-item-wrap .content-wrap .name-row {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
}
|
|
31
|
+
.m-store-item-wrap .content-wrap .name-row .name {
|
|
28
32
|
overflow: hidden;
|
|
29
33
|
white-space: nowrap;
|
|
30
34
|
text-overflow: ellipsis;
|
|
35
|
+
width: fit-content !important;
|
|
36
|
+
}
|
|
37
|
+
.m-store-item-wrap .content-wrap .name-row .new {
|
|
38
|
+
background: rgba(110, 157, 40, 0.25);
|
|
39
|
+
color: #395212;
|
|
40
|
+
font-size: 0.24rem;
|
|
41
|
+
border-radius: 0.08rem;
|
|
42
|
+
padding: 0.1rem 0.12rem;
|
|
43
|
+
margin-left: 0.16rem;
|
|
44
|
+
line-height: 1;
|
|
31
45
|
}
|
|
32
46
|
.m-store-item-wrap .content-wrap .desc {
|
|
33
47
|
overflow: hidden;
|
|
@@ -19,6 +19,8 @@ var _commonUtil = require("../../../../../utils/commonUtil");
|
|
|
19
19
|
|
|
20
20
|
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
21
21
|
|
|
22
|
+
var _storeUtil = require("../../../../../utils/storeUtil");
|
|
23
|
+
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
25
|
|
|
24
26
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
@@ -210,8 +212,6 @@ var defaultData = [{
|
|
|
210
212
|
storeId: 1,
|
|
211
213
|
storeName: '落落彩虹的大超市',
|
|
212
214
|
comments: '没有比我面积更大、性价比更高的商品了。',
|
|
213
|
-
storeLogoUrl: '/get/resource/store6/conf/20240905/picture/3331831612826257207296_600.jpg',
|
|
214
|
-
storePosterUrl: '/get/resource/store6/conf/20240905/picture/11111831612121177927680_600.png',
|
|
215
215
|
freeShipping: null,
|
|
216
216
|
distance: '0',
|
|
217
217
|
deliveryTime: null,
|
|
@@ -222,8 +222,6 @@ var defaultData = [{
|
|
|
222
222
|
storeId: 2,
|
|
223
223
|
storeName: '落落彩虹的大超市',
|
|
224
224
|
comments: '没有比我面积更大、性价比更高的商品了。',
|
|
225
|
-
storeLogoUrl: '/get/resource/store6/conf/20240905/picture/3331831612826257207296_600.jpg',
|
|
226
|
-
storePosterUrl: '/get/resource/store6/conf/20240905/picture/11111831612121177927680_600.png',
|
|
227
225
|
freeShipping: 'Y',
|
|
228
226
|
distance: '18',
|
|
229
227
|
deliveryTime: null,
|
|
@@ -245,21 +243,21 @@ function (_super) {
|
|
|
245
243
|
};
|
|
246
244
|
_this.sourceType = '1';
|
|
247
245
|
_this.maxProdNum = 5;
|
|
246
|
+
_this.storeIds = '';
|
|
248
247
|
|
|
249
248
|
_this.getData = function () {
|
|
250
249
|
return __awaiter(_this, void 0, void 0, function () {
|
|
251
|
-
var _a, maxProdNum, sourceType, params, info, res, list;
|
|
250
|
+
var _a, maxProdNum, sourceType, storeIds, params, info, res, list;
|
|
252
251
|
|
|
253
252
|
var _b;
|
|
254
253
|
|
|
255
254
|
return __generator(this, function (_c) {
|
|
256
255
|
switch (_c.label) {
|
|
257
256
|
case 0:
|
|
258
|
-
_a = this.props.panelProps.content, maxProdNum = _a.maxProdNum, sourceType = _a.sourceType;
|
|
257
|
+
_a = this.props.panelProps.content, maxProdNum = _a.maxProdNum, sourceType = _a.sourceType, storeIds = _a.storeIds;
|
|
259
258
|
params = {
|
|
260
259
|
pageIndex: 1,
|
|
261
|
-
pageSize: maxProdNum
|
|
262
|
-
pageTotal: true
|
|
260
|
+
pageSize: maxProdNum
|
|
263
261
|
};
|
|
264
262
|
|
|
265
263
|
if (sourceType === '2') {
|
|
@@ -268,10 +266,12 @@ function (_super) {
|
|
|
268
266
|
params.newFlag = 'Y';
|
|
269
267
|
} else if (sourceType === '4') {
|
|
270
268
|
params.sortType = '1';
|
|
269
|
+
} else if (sourceType === '5') {
|
|
270
|
+
params.storeIdList = (storeIds === null || storeIds === void 0 ? void 0 : storeIds.split(',')) || [];
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
if ((0, _commonUtil.isLogin)()) {
|
|
274
|
-
info = getStore('USER_ADDRESS_INFO') || {};
|
|
274
|
+
info = (0, _storeUtil.getStore)('USER_ADDRESS_INFO') || {};
|
|
275
275
|
|
|
276
276
|
if (info.longitude && info.latitude) {
|
|
277
277
|
params.longitude = info.longitude;
|
|
@@ -305,10 +305,11 @@ function (_super) {
|
|
|
305
305
|
};
|
|
306
306
|
|
|
307
307
|
Mobile.prototype.componentWillReceiveProps = function (nextProps) {
|
|
308
|
-
if (nextProps.panelProps.content.sourceType !== this.sourceType || nextProps.panelProps.content.maxProdNum !== this.maxProdNum) {
|
|
308
|
+
if (nextProps.panelProps.content.sourceType !== this.sourceType || nextProps.panelProps.content.maxProdNum !== this.maxProdNum || nextProps.panelProps.content.storeIds !== this.storeIds) {
|
|
309
309
|
this.getData();
|
|
310
310
|
this.sourceType = nextProps.panelProps.content.sourceType;
|
|
311
311
|
this.maxProdNum = nextProps.panelProps.content.maxProdNum;
|
|
312
|
+
this.storeIds = nextProps.panelProps.content.storeIds;
|
|
312
313
|
}
|
|
313
314
|
};
|
|
314
315
|
|
|
@@ -19,6 +19,8 @@ var _common = require("../../../../../common");
|
|
|
19
19
|
|
|
20
20
|
var _locale = require("../../../../../locale");
|
|
21
21
|
|
|
22
|
+
require("./index.less");
|
|
23
|
+
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
25
|
|
|
24
26
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
@@ -127,13 +129,15 @@ function (_super) {
|
|
|
127
129
|
}, {
|
|
128
130
|
key: '8',
|
|
129
131
|
name: (0, _locale.i18n)('DISTANCE'),
|
|
130
|
-
value: /*#__PURE__*/_react["default"].createElement(
|
|
132
|
+
value: /*#__PURE__*/_react["default"].createElement(_ButtonConfig["default"], {
|
|
131
133
|
data: panelProps.distance
|
|
132
134
|
}),
|
|
133
135
|
metaOption: panelProps.distance
|
|
134
136
|
}],
|
|
135
137
|
type: "switch"
|
|
136
|
-
}), /*#__PURE__*/_react["default"].createElement(
|
|
138
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
139
|
+
className: "sourceOfProduct"
|
|
140
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
137
141
|
title: (0, _locale.i18n)('SOURCE_OF_ACTIVITY'),
|
|
138
142
|
topSplit: true
|
|
139
143
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
@@ -153,7 +157,16 @@ function (_super) {
|
|
|
153
157
|
value: "4"
|
|
154
158
|
}, (0, _locale.i18n)('HIGH_SALES_STORES')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
155
159
|
value: "5"
|
|
156
|
-
}, (0, _locale.i18n)('SELECT_STORES')))), /*#__PURE__*/_react["default"].createElement(
|
|
160
|
+
}, (0, _locale.i18n)('SELECT_STORES')))), panelProps.sourceType === '5' && /*#__PURE__*/_react["default"].createElement("div", {
|
|
161
|
+
className: "greyBg"
|
|
162
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.StoreSource, {
|
|
163
|
+
onChange: function onChange(ids) {
|
|
164
|
+
panelProps.storeIds = ids;
|
|
165
|
+
|
|
166
|
+
_this.reRender();
|
|
167
|
+
},
|
|
168
|
+
value: panelProps.storeIds
|
|
169
|
+
}))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
157
170
|
title: (0, _locale.i18n)('PRODUCT_QUANTITY'),
|
|
158
171
|
topSplit: true
|
|
159
172
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Radio.Group, {
|
package/lib/locale/ar/ar.json
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
+
"NEW": "New",
|
|
3
|
+
"ALL": "All",
|
|
4
|
+
"CLOSE": "Close",
|
|
5
|
+
"OPEN": "Open",
|
|
6
|
+
"SELECT_STORE": "Select Store",
|
|
7
|
+
"STORE_LOGO": "Store Logo",
|
|
8
|
+
"STORE_STATE": "Store State",
|
|
9
|
+
"BUSINESS_TYPE": "Business Type",
|
|
10
|
+
"STORE_SELECT": "Store Select",
|
|
2
11
|
"SELECT_STORES": "Select stores",
|
|
3
12
|
"HIGH_SALES_STORES": "High sales stores",
|
|
4
13
|
"NEW_STORES": "New stores",
|
|
@@ -44,7 +53,6 @@
|
|
|
44
53
|
"CAMPAIGN_NAME": "Campaign Name",
|
|
45
54
|
"PROCESSING": "Processing",
|
|
46
55
|
"HAS_NOT_STARTED": "Has not started",
|
|
47
|
-
"ALL": "ALL",
|
|
48
56
|
"PERIOD_OF_VAILDITY": "Period of Vaildity",
|
|
49
57
|
"COUPON_VALUE": "Coupon Value",
|
|
50
58
|
"COUPON_NAME": "Coupon Name",
|
|
@@ -348,6 +356,7 @@
|
|
|
348
356
|
"ADD_IMAGE": "Add Image",
|
|
349
357
|
"ADD_BANNER": "Add Banner",
|
|
350
358
|
"TOTAL_PRODUCTS": "Total {count} products",
|
|
359
|
+
"TOTAL_STORES": "Total {count} stores",
|
|
351
360
|
"SELECTED": "Selected",
|
|
352
361
|
"GROUP_BUY": "Group Buy",
|
|
353
362
|
"RESET": "Reset",
|
package/lib/locale/en/en.json
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
+
"NEW": "New",
|
|
3
|
+
"ALL": "All",
|
|
4
|
+
"CLOSE": "Close",
|
|
5
|
+
"OPEN": "Open",
|
|
6
|
+
"SELECT_STORE": "Select Store",
|
|
7
|
+
"STORE_LOGO": "Store Logo",
|
|
8
|
+
"STORE_STATE": "Store State",
|
|
9
|
+
"BUSINESS_TYPE": "Business Type",
|
|
10
|
+
"STORE_SELECT": "Store Select",
|
|
2
11
|
"SELECT_STORES": "Select stores",
|
|
3
12
|
"HIGH_SALES_STORES": "High sales stores",
|
|
4
13
|
"NEW_STORES": "New stores",
|
|
@@ -44,7 +53,6 @@
|
|
|
44
53
|
"CAMPAIGN_NAME": "Campaign Name",
|
|
45
54
|
"PROCESSING": "Processing",
|
|
46
55
|
"HAS_NOT_STARTED": "Has not started",
|
|
47
|
-
"ALL": "ALL",
|
|
48
56
|
"PERIOD_OF_VAILDITY": "Period of Vaildity",
|
|
49
57
|
"COUPON_VALUE": "Coupon Value",
|
|
50
58
|
"COUPON_NAME": "Coupon Name",
|
|
@@ -348,6 +356,7 @@
|
|
|
348
356
|
"ADD_IMAGE": "Add Image",
|
|
349
357
|
"ADD_BANNER": "Add Banner",
|
|
350
358
|
"TOTAL_PRODUCTS": "Total {count} products",
|
|
359
|
+
"TOTAL_STORES": "Total {count} stores",
|
|
351
360
|
"SELECTED": "Selected",
|
|
352
361
|
"GROUP_BUY": "Group Buy",
|
|
353
362
|
"RESET": "Reset",
|
package/lib/locale/es/es.json
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
+
"NEW": "New",
|
|
3
|
+
"ALL": "TODO",
|
|
4
|
+
"CLOSE": "Close",
|
|
5
|
+
"OPEN": "Open",
|
|
6
|
+
"SELECT_STORE": "Select Store",
|
|
7
|
+
"STORE_LOGO": "Store Logo",
|
|
8
|
+
"STORE_STATE": "Store State",
|
|
9
|
+
"BUSINESS_TYPE": "Business Type",
|
|
10
|
+
"STORE_SELECT": "Store Select",
|
|
2
11
|
"SELECT_STORES": "Select stores",
|
|
3
12
|
"HIGH_SALES_STORES": "High sales stores",
|
|
4
13
|
"NEW_STORES": "New stores",
|
|
@@ -44,7 +53,6 @@
|
|
|
44
53
|
"CAMPAIGN_NAME": "Campaign Name",
|
|
45
54
|
"PROCESSING": "Processing",
|
|
46
55
|
"HAS_NOT_STARTED": "Has not started",
|
|
47
|
-
"ALL": "TODO",
|
|
48
56
|
"PERIOD_OF_VAILDITY": "Period of Vaildity",
|
|
49
57
|
"COUPON_VALUE": "Coupon Value",
|
|
50
58
|
"COUPON_NAME": "Coupon Name",
|
|
@@ -348,6 +356,7 @@
|
|
|
348
356
|
"ADD_IMAGE": "Añadir Imagen",
|
|
349
357
|
"ADD_BANNER": "Agregar Banner",
|
|
350
358
|
"TOTAL_PRODUCTS": "Total {count} productos",
|
|
359
|
+
"TOTAL_STORES": "Total {count} stores",
|
|
351
360
|
"SELECTED": "Seleccionado",
|
|
352
361
|
"GROUP_BUY": "Compra en grupo",
|
|
353
362
|
"RESET": "Restablecer",
|
package/lib/locale/mn/mn.json
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
+
"NEW": "New",
|
|
3
|
+
"ALL": "БҮГД",
|
|
4
|
+
"CLOSE": "Close",
|
|
5
|
+
"OPEN": "Open",
|
|
6
|
+
"SELECT_STORE": "Select Store",
|
|
7
|
+
"STORE_LOGO": "Store Logo",
|
|
8
|
+
"STORE_STATE": "Store State",
|
|
9
|
+
"BUSINESS_TYPE": "Business Type",
|
|
10
|
+
"STORE_SELECT": "Store Select",
|
|
2
11
|
"SELECT_STORES": "Select stores",
|
|
3
12
|
"HIGH_SALES_STORES": "High sales stores",
|
|
4
13
|
"NEW_STORES": "New stores",
|
|
@@ -44,7 +53,6 @@
|
|
|
44
53
|
"CAMPAIGN_NAME": "Аяны нэр",
|
|
45
54
|
"PROCESSING": "Боловсруулж байна",
|
|
46
55
|
"HAS_NOT_STARTED": "Эхлээгүй байна",
|
|
47
|
-
"ALL": "БҮГД",
|
|
48
56
|
"PERIOD_OF_VAILDITY": "Хүчинтэй байх хугацаа",
|
|
49
57
|
"COUPON_VALUE": "Купоны үнэ цэнэ",
|
|
50
58
|
"COUPON_NAME": "Купоны нэр",
|
|
@@ -348,6 +356,7 @@
|
|
|
348
356
|
"ADD_IMAGE": "Зураг нэмэх",
|
|
349
357
|
"ADD_BANNER": "Баннер нэмэх",
|
|
350
358
|
"TOTAL_PRODUCTS": "Нийт {count} бүтээгдэхүүн",
|
|
359
|
+
"TOTAL_STORES": "Total {count} stores",
|
|
351
360
|
"SELECTED": "Сонгосон",
|
|
352
361
|
"GROUP_BUY": "Бүлгийн худалдан авалт",
|
|
353
362
|
"RESET": "Дахин тохируулах",
|