@fle-ui/plus-choose-mall-goods 1.1.2 → 1.1.3
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/index.js +17 -10
- package/lib/index.js +17 -10
- package/package.json +2 -2
package/es/index.js
CHANGED
|
@@ -52,10 +52,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
52
52
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
53
53
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
54
54
|
import React, { useEffect, useState, useRef } from 'react';
|
|
55
|
+
import PlusConfigProvider from '@fle-ui/plus-config-provider';
|
|
55
56
|
import AddressSelection from '@fle-ui/plus-address-selection';
|
|
56
57
|
import ProImage from '@fle-ui/plus-image';
|
|
57
58
|
import { QuestionCircleOutlined, LoadingOutlined } from '@ant-design/icons';
|
|
58
|
-
import PlusConfigProvider from '@fle-ui/plus-config-provider';
|
|
59
59
|
import Icon from './components/icon';
|
|
60
60
|
import ChangePrice from './components/changePrice';
|
|
61
61
|
import { tabs, tabsSearchParamsMap, priceRangeForOnce, priceRangeForPurchase, profitRangeForOnce, profitRangeForPurchase, sortOptions } from './utils/options';
|
|
@@ -202,7 +202,7 @@ var ChooseMallGoods = function ChooseMallGoods(props) {
|
|
|
202
202
|
setLoading = _useState14[1];
|
|
203
203
|
var getGoodsList = /*#__PURE__*/function () {
|
|
204
204
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
205
|
-
var _searchParams$flagCat, _searchParams$saleabl, params, text, apiKey, res, _res$data, _res$data2, list, jdGoods;
|
|
205
|
+
var _searchParams$flagCat, _searchParams$priceTy, _searchParams$priceTy2, _searchParams$saleabl, params, text, apiKey, res, _res$data, _res$data2, list, jdGoods;
|
|
206
206
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
207
207
|
while (1) switch (_context.prev = _context.next) {
|
|
208
208
|
case 0:
|
|
@@ -222,7 +222,14 @@ var ChooseMallGoods = function ChooseMallGoods(props) {
|
|
|
222
222
|
flagTags: searchParams.flagTags,
|
|
223
223
|
flagIndustry: searchParams.flagIndustry,
|
|
224
224
|
flagCategory: ((_searchParams$flagCat = searchParams.flagCategory) === null || _searchParams$flagCat === void 0 ? void 0 : _searchParams$flagCat.length) ? searchParams.flagCategory[searchParams.flagCategory.length - 1] : undefined
|
|
225
|
-
});
|
|
225
|
+
});
|
|
226
|
+
if ((_searchParams$priceTy = searchParams.priceType) === null || _searchParams$priceTy === void 0 ? void 0 : _searchParams$priceTy.includes('once')) {
|
|
227
|
+
params['isOnce'] = 1;
|
|
228
|
+
}
|
|
229
|
+
if ((_searchParams$priceTy2 = searchParams.priceType) === null || _searchParams$priceTy2 === void 0 ? void 0 : _searchParams$priceTy2.includes('purchase')) {
|
|
230
|
+
params['isPurchase'] = 1;
|
|
231
|
+
}
|
|
232
|
+
// 价格区间
|
|
226
233
|
if (searchParams.priceRangeMin !== undefined) {
|
|
227
234
|
params[searchParams.priceType + 'Min'] = Number(searchParams.priceRangeMin * 100);
|
|
228
235
|
}
|
|
@@ -258,9 +265,9 @@ var ChooseMallGoods = function ChooseMallGoods(props) {
|
|
|
258
265
|
apiKey = '';
|
|
259
266
|
if (mode === 1) apiKey = 'getGoodsList';
|
|
260
267
|
if (mode === 2) apiKey = 'getGoodsListForTemplate';
|
|
261
|
-
_context.next =
|
|
268
|
+
_context.next = 16;
|
|
262
269
|
return $http.post(api[apiKey], params);
|
|
263
|
-
case
|
|
270
|
+
case 16:
|
|
264
271
|
res = _context.sent;
|
|
265
272
|
if (res === null || res === void 0 ? void 0 : res.success) {
|
|
266
273
|
list = (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list) || [];
|
|
@@ -276,15 +283,15 @@ var ChooseMallGoods = function ChooseMallGoods(props) {
|
|
|
276
283
|
getJdStock(list, jdGoods);
|
|
277
284
|
}
|
|
278
285
|
}
|
|
279
|
-
case
|
|
280
|
-
_context.prev =
|
|
286
|
+
case 18:
|
|
287
|
+
_context.prev = 18;
|
|
281
288
|
setLoading(false);
|
|
282
|
-
return _context.finish(
|
|
283
|
-
case
|
|
289
|
+
return _context.finish(18);
|
|
290
|
+
case 21:
|
|
284
291
|
case "end":
|
|
285
292
|
return _context.stop();
|
|
286
293
|
}
|
|
287
|
-
}, _callee, null, [[0,,
|
|
294
|
+
}, _callee, null, [[0,, 18, 21]]);
|
|
288
295
|
}));
|
|
289
296
|
return function getGoodsList() {
|
|
290
297
|
return _ref.apply(this, arguments);
|
package/lib/index.js
CHANGED
|
@@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _antd = require("antd");
|
|
10
|
+
var _plusConfigProvider = _interopRequireDefault(require("@fle-ui/plus-config-provider"));
|
|
10
11
|
var _plusAddressSelection = _interopRequireDefault(require("@fle-ui/plus-address-selection"));
|
|
11
12
|
var _plusImage = _interopRequireDefault(require("@fle-ui/plus-image"));
|
|
12
13
|
var _icons = require("@ant-design/icons");
|
|
13
|
-
var _plusConfigProvider = _interopRequireDefault(require("@fle-ui/plus-config-provider"));
|
|
14
14
|
var _icon = _interopRequireDefault(require("./components/icon"));
|
|
15
15
|
var _changePrice = _interopRequireDefault(require("./components/changePrice"));
|
|
16
16
|
var _options = require("./utils/options");
|
|
@@ -182,7 +182,7 @@ var ChooseMallGoods = function ChooseMallGoods(props) {
|
|
|
182
182
|
setLoading = _useState14[1];
|
|
183
183
|
var getGoodsList = /*#__PURE__*/function () {
|
|
184
184
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
185
|
-
var _searchParams$flagCat, _searchParams$saleabl, params, text, apiKey, res, _res$data, _res$data2, list, jdGoods;
|
|
185
|
+
var _searchParams$flagCat, _searchParams$priceTy, _searchParams$priceTy2, _searchParams$saleabl, params, text, apiKey, res, _res$data, _res$data2, list, jdGoods;
|
|
186
186
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
187
187
|
while (1) switch (_context.prev = _context.next) {
|
|
188
188
|
case 0:
|
|
@@ -202,7 +202,14 @@ var ChooseMallGoods = function ChooseMallGoods(props) {
|
|
|
202
202
|
flagTags: searchParams.flagTags,
|
|
203
203
|
flagIndustry: searchParams.flagIndustry,
|
|
204
204
|
flagCategory: ((_searchParams$flagCat = searchParams.flagCategory) === null || _searchParams$flagCat === void 0 ? void 0 : _searchParams$flagCat.length) ? searchParams.flagCategory[searchParams.flagCategory.length - 1] : undefined
|
|
205
|
-
});
|
|
205
|
+
});
|
|
206
|
+
if ((_searchParams$priceTy = searchParams.priceType) === null || _searchParams$priceTy === void 0 ? void 0 : _searchParams$priceTy.includes('once')) {
|
|
207
|
+
params['isOnce'] = 1;
|
|
208
|
+
}
|
|
209
|
+
if ((_searchParams$priceTy2 = searchParams.priceType) === null || _searchParams$priceTy2 === void 0 ? void 0 : _searchParams$priceTy2.includes('purchase')) {
|
|
210
|
+
params['isPurchase'] = 1;
|
|
211
|
+
}
|
|
212
|
+
// 价格区间
|
|
206
213
|
if (searchParams.priceRangeMin !== undefined) {
|
|
207
214
|
params[searchParams.priceType + 'Min'] = Number(searchParams.priceRangeMin * 100);
|
|
208
215
|
}
|
|
@@ -238,9 +245,9 @@ var ChooseMallGoods = function ChooseMallGoods(props) {
|
|
|
238
245
|
apiKey = '';
|
|
239
246
|
if (mode === 1) apiKey = 'getGoodsList';
|
|
240
247
|
if (mode === 2) apiKey = 'getGoodsListForTemplate';
|
|
241
|
-
_context.next =
|
|
248
|
+
_context.next = 16;
|
|
242
249
|
return $http.post(_api.default[apiKey], params);
|
|
243
|
-
case
|
|
250
|
+
case 16:
|
|
244
251
|
res = _context.sent;
|
|
245
252
|
if (res === null || res === void 0 ? void 0 : res.success) {
|
|
246
253
|
list = (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list) || [];
|
|
@@ -256,15 +263,15 @@ var ChooseMallGoods = function ChooseMallGoods(props) {
|
|
|
256
263
|
getJdStock(list, jdGoods);
|
|
257
264
|
}
|
|
258
265
|
}
|
|
259
|
-
case
|
|
260
|
-
_context.prev =
|
|
266
|
+
case 18:
|
|
267
|
+
_context.prev = 18;
|
|
261
268
|
setLoading(false);
|
|
262
|
-
return _context.finish(
|
|
263
|
-
case
|
|
269
|
+
return _context.finish(18);
|
|
270
|
+
case 21:
|
|
264
271
|
case "end":
|
|
265
272
|
return _context.stop();
|
|
266
273
|
}
|
|
267
|
-
}, _callee, null, [[0,,
|
|
274
|
+
}, _callee, null, [[0,, 18, 21]]);
|
|
268
275
|
}));
|
|
269
276
|
return function getGoodsList() {
|
|
270
277
|
return _ref.apply(this, arguments);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fle-ui/plus-choose-mall-goods",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "@fle-ui/plus-choose-mall-goods",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fle-ui",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "961fbbdd6c0cbc39663350a77a01bd9b7131f246"
|
|
48
48
|
}
|