@fonixtree/magic-design 2.0.114 → 2.0.115

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.
@@ -188,18 +188,18 @@ function InterestedMerchants(props) {
188
188
  _fetch = props._fetch;
189
189
 
190
190
  var _a = (0, _react.useState)([]),
191
- platformList = _a[0],
192
- setPlatformList = _a[1];
191
+ list = _a[0],
192
+ setList = _a[1];
193
193
 
194
194
  var _b = (0, _react.useState)(false),
195
195
  loading = _b[0],
196
196
  setLoading = _b[1];
197
197
 
198
198
  var _c = (0, _react.useState)(''),
199
- platformName = _c[0],
200
- setPlatformName = _c[1];
199
+ interestName = _c[0],
200
+ setInterestName = _c[1];
201
201
 
202
- var queryPlatform = function queryPlatform(params) {
202
+ var queryData = function queryData(params) {
203
203
  return __awaiter(_this, void 0, void 0, function () {
204
204
  var res;
205
205
  return __generator(this, function (_a) {
@@ -208,12 +208,12 @@ function InterestedMerchants(props) {
208
208
  setLoading(true);
209
209
  return [4
210
210
  /*yield*/
211
- , _fetch("/designer/v1/" + window.magicDesign.MBaseUrl + "/distribution/platform/page", params, 'GET')];
211
+ , _fetch("/designer/v1/" + window.magicDesign.MBaseUrl + "/interest/page", params, 'GET')];
212
212
 
213
213
  case 1:
214
214
  res = _a.sent();
215
215
  paginationParams.total = res.total;
216
- setPlatformList(res.list);
216
+ setList(res.list);
217
217
  setLoading(false);
218
218
  return [2
219
219
  /*return*/
@@ -224,11 +224,11 @@ function InterestedMerchants(props) {
224
224
  };
225
225
 
226
226
  (0, _react.useEffect)(function () {
227
- queryPlatform(paginationParams);
227
+ queryData(paginationParams);
228
228
  }, []);
229
229
  var columns = [{
230
- title: 'Platform Name',
231
- dataIndex: 'platformName'
230
+ title: 'InterestName',
231
+ dataIndex: 'interestName'
232
232
  }, {
233
233
  title: 'Logo',
234
234
  dataIndex: 'logo',
@@ -246,17 +246,17 @@ function InterestedMerchants(props) {
246
246
  var rowSelection = {
247
247
  onChange: function onChange(selectedRowKeys, selectedRow) {
248
248
  _onChange({
249
- value: selectedRow[0].distributionPlatformId,
250
- name: selectedRow[0].platformName
249
+ value: selectedRow[0].interestId,
250
+ name: selectedRow[0].interestName
251
251
  });
252
252
  },
253
253
  type: 'radio'
254
254
  };
255
255
 
256
256
  var reset = function reset() {
257
- setPlatformName('');
258
- queryPlatform(__assign({
259
- platformName: ''
257
+ setInterestName('');
258
+ queryData(__assign({
259
+ interestName: ''
260
260
  }, paginationParams));
261
261
  };
262
262
 
@@ -274,21 +274,21 @@ function InterestedMerchants(props) {
274
274
  }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
275
275
  span: 16
276
276
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
277
- label: "Platform Name"
277
+ label: "Interest Name"
278
278
  }, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
279
279
  onChange: function onChange(e) {
280
- return setPlatformName(e.target.value);
280
+ return setInterestName(e.target.value);
281
281
  },
282
282
  size: "small",
283
- value: platformName
283
+ value: interestName
284
284
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
285
285
  span: 6
286
286
  }, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
287
287
  onClick: function onClick() {
288
288
  setLoading(true);
289
289
  paginationParams.pageIndex = 1;
290
- queryPlatform(__assign({
291
- platformName: platformName
290
+ queryData(__assign({
291
+ interestName: interestName
292
292
  }, paginationParams));
293
293
  },
294
294
  size: "small",
@@ -304,19 +304,19 @@ function InterestedMerchants(props) {
304
304
  }, (0, _locale.i18n)('CANCEL'))))), /*#__PURE__*/_react["default"].createElement(_antd.Table, {
305
305
  bordered: false,
306
306
  columns: columns,
307
- dataSource: platformList,
307
+ dataSource: list,
308
308
  defaultExpandAllRows: true,
309
309
  loading: loading,
310
310
  pagination: __assign(__assign({}, paginationParams), {
311
311
  onChange: function onChange(page) {
312
312
  paginationParams.pageIndex = page;
313
- queryPlatform(__assign(__assign({}, paginationParams), {
314
- platformName: platformName
313
+ queryData(__assign(__assign({}, paginationParams), {
314
+ interestName: interestName
315
315
  }));
316
316
  },
317
317
  showSizeChanger: false
318
318
  }),
319
- rowKey: "distributionPlatformId",
319
+ rowKey: "interestId",
320
320
  rowSelection: rowSelection,
321
321
  scroll: {
322
322
  y: 400
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports["default"] = InterestedProducts;
8
+ exports["default"] = InterestedMerchants;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
@@ -181,25 +181,25 @@ var paginationParams = {
181
181
  pageIndex: 1
182
182
  };
183
183
 
184
- function InterestedProducts(props) {
184
+ function InterestedMerchants(props) {
185
185
  var _this = this;
186
186
 
187
187
  var _onChange = props.onChange,
188
188
  _fetch = props._fetch;
189
189
 
190
190
  var _a = (0, _react.useState)([]),
191
- platformList = _a[0],
192
- setPlatformList = _a[1];
191
+ list = _a[0],
192
+ setList = _a[1];
193
193
 
194
194
  var _b = (0, _react.useState)(false),
195
195
  loading = _b[0],
196
196
  setLoading = _b[1];
197
197
 
198
198
  var _c = (0, _react.useState)(''),
199
- platformName = _c[0],
200
- setPlatformName = _c[1];
199
+ interestName = _c[0],
200
+ setInterestName = _c[1];
201
201
 
202
- var queryPlatform = function queryPlatform(params) {
202
+ var queryData = function queryData(params) {
203
203
  return __awaiter(_this, void 0, void 0, function () {
204
204
  var res;
205
205
  return __generator(this, function (_a) {
@@ -208,12 +208,12 @@ function InterestedProducts(props) {
208
208
  setLoading(true);
209
209
  return [4
210
210
  /*yield*/
211
- , _fetch("/designer/v1/" + window.magicDesign.MBaseUrl + "/distribution/platform/page", params, 'GET')];
211
+ , _fetch("/designer/v1/" + window.magicDesign.MBaseUrl + "/interest/page", params, 'GET')];
212
212
 
213
213
  case 1:
214
214
  res = _a.sent();
215
215
  paginationParams.total = res.total;
216
- setPlatformList(res.list);
216
+ setList(res.list);
217
217
  setLoading(false);
218
218
  return [2
219
219
  /*return*/
@@ -224,11 +224,11 @@ function InterestedProducts(props) {
224
224
  };
225
225
 
226
226
  (0, _react.useEffect)(function () {
227
- queryPlatform(paginationParams);
227
+ queryData(paginationParams);
228
228
  }, []);
229
229
  var columns = [{
230
- title: 'Platform Name',
231
- dataIndex: 'platformName'
230
+ title: 'InterestName',
231
+ dataIndex: 'interestName'
232
232
  }, {
233
233
  title: 'Logo',
234
234
  dataIndex: 'logo',
@@ -246,17 +246,17 @@ function InterestedProducts(props) {
246
246
  var rowSelection = {
247
247
  onChange: function onChange(selectedRowKeys, selectedRow) {
248
248
  _onChange({
249
- value: selectedRow[0].distributionPlatformId,
250
- name: selectedRow[0].platformName
249
+ value: selectedRow[0].interestId,
250
+ name: selectedRow[0].interestName
251
251
  });
252
252
  },
253
253
  type: 'radio'
254
254
  };
255
255
 
256
256
  var reset = function reset() {
257
- setPlatformName('');
258
- queryPlatform(__assign({
259
- platformName: ''
257
+ setInterestName('');
258
+ queryData(__assign({
259
+ interestName: ''
260
260
  }, paginationParams));
261
261
  };
262
262
 
@@ -274,21 +274,21 @@ function InterestedProducts(props) {
274
274
  }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
275
275
  span: 16
276
276
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
277
- label: "Platform Name"
277
+ label: "Interest Name"
278
278
  }, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
279
279
  onChange: function onChange(e) {
280
- return setPlatformName(e.target.value);
280
+ return setInterestName(e.target.value);
281
281
  },
282
282
  size: "small",
283
- value: platformName
283
+ value: interestName
284
284
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
285
285
  span: 6
286
286
  }, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
287
287
  onClick: function onClick() {
288
288
  setLoading(true);
289
289
  paginationParams.pageIndex = 1;
290
- queryPlatform(__assign({
291
- platformName: platformName
290
+ queryData(__assign({
291
+ interestName: interestName
292
292
  }, paginationParams));
293
293
  },
294
294
  size: "small",
@@ -304,19 +304,19 @@ function InterestedProducts(props) {
304
304
  }, (0, _locale.i18n)('CANCEL'))))), /*#__PURE__*/_react["default"].createElement(_antd.Table, {
305
305
  bordered: false,
306
306
  columns: columns,
307
- dataSource: platformList,
307
+ dataSource: list,
308
308
  defaultExpandAllRows: true,
309
309
  loading: loading,
310
310
  pagination: __assign(__assign({}, paginationParams), {
311
311
  onChange: function onChange(page) {
312
312
  paginationParams.pageIndex = page;
313
- queryPlatform(__assign(__assign({}, paginationParams), {
314
- platformName: platformName
313
+ queryData(__assign(__assign({}, paginationParams), {
314
+ interestName: interestName
315
315
  }));
316
316
  },
317
317
  showSizeChanger: false
318
318
  }),
319
- rowKey: "distributionPlatformId",
319
+ rowKey: "interestId",
320
320
  rowSelection: rowSelection,
321
321
  scroll: {
322
322
  y: 400
@@ -229,7 +229,7 @@ function MerchantStory(props) {
229
229
  queryData(paginationParams);
230
230
  }, []);
231
231
  var columns = [{
232
- title: 'store Name',
232
+ title: 'StoreName',
233
233
  dataIndex: 'storeName'
234
234
  }, {
235
235
  title: 'Logo',
@@ -129,10 +129,11 @@ function (_super) {
129
129
 
130
130
  _this.isShowSetTemplate = function () {
131
131
  return _constants.pageStateMap.DRAFT === _this.props.pageState;
132
- };
132
+ }; // 拒绝审核 和 草稿状态展示保存按钮
133
+
133
134
 
134
135
  _this.isShowSave = function () {
135
- return !(0, _coreUtil.isAutoAudit)() && [_constants.pageStateMap.REJECTED, _constants.pageStateMap.DRAFT].includes(_this.props.pageState);
136
+ return [_constants.pageStateMap.REJECTED, _constants.pageStateMap.DRAFT].includes(_this.props.pageState);
136
137
  };
137
138
 
138
139
  return _this;
@@ -188,18 +188,18 @@ function InterestedMerchants(props) {
188
188
  _fetch = props._fetch;
189
189
 
190
190
  var _a = (0, _react.useState)([]),
191
- platformList = _a[0],
192
- setPlatformList = _a[1];
191
+ list = _a[0],
192
+ setList = _a[1];
193
193
 
194
194
  var _b = (0, _react.useState)(false),
195
195
  loading = _b[0],
196
196
  setLoading = _b[1];
197
197
 
198
198
  var _c = (0, _react.useState)(''),
199
- platformName = _c[0],
200
- setPlatformName = _c[1];
199
+ interestName = _c[0],
200
+ setInterestName = _c[1];
201
201
 
202
- var queryPlatform = function queryPlatform(params) {
202
+ var queryData = function queryData(params) {
203
203
  return __awaiter(_this, void 0, void 0, function () {
204
204
  var res;
205
205
  return __generator(this, function (_a) {
@@ -208,12 +208,12 @@ function InterestedMerchants(props) {
208
208
  setLoading(true);
209
209
  return [4
210
210
  /*yield*/
211
- , _fetch("/designer/v1/" + window.magicDesign.MBaseUrl + "/distribution/platform/page", params, 'GET')];
211
+ , _fetch("/designer/v1/" + window.magicDesign.MBaseUrl + "/interest/page", params, 'GET')];
212
212
 
213
213
  case 1:
214
214
  res = _a.sent();
215
215
  paginationParams.total = res.total;
216
- setPlatformList(res.list);
216
+ setList(res.list);
217
217
  setLoading(false);
218
218
  return [2
219
219
  /*return*/
@@ -224,11 +224,11 @@ function InterestedMerchants(props) {
224
224
  };
225
225
 
226
226
  (0, _react.useEffect)(function () {
227
- queryPlatform(paginationParams);
227
+ queryData(paginationParams);
228
228
  }, []);
229
229
  var columns = [{
230
- title: 'Platform Name',
231
- dataIndex: 'platformName'
230
+ title: 'InterestName',
231
+ dataIndex: 'interestName'
232
232
  }, {
233
233
  title: 'Logo',
234
234
  dataIndex: 'logo',
@@ -246,17 +246,17 @@ function InterestedMerchants(props) {
246
246
  var rowSelection = {
247
247
  onChange: function onChange(selectedRowKeys, selectedRow) {
248
248
  _onChange({
249
- value: selectedRow[0].distributionPlatformId,
250
- name: selectedRow[0].platformName
249
+ value: selectedRow[0].interestId,
250
+ name: selectedRow[0].interestName
251
251
  });
252
252
  },
253
253
  type: 'radio'
254
254
  };
255
255
 
256
256
  var reset = function reset() {
257
- setPlatformName('');
258
- queryPlatform(__assign({
259
- platformName: ''
257
+ setInterestName('');
258
+ queryData(__assign({
259
+ interestName: ''
260
260
  }, paginationParams));
261
261
  };
262
262
 
@@ -274,21 +274,21 @@ function InterestedMerchants(props) {
274
274
  }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
275
275
  span: 16
276
276
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
277
- label: "Platform Name"
277
+ label: "Interest Name"
278
278
  }, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
279
279
  onChange: function onChange(e) {
280
- return setPlatformName(e.target.value);
280
+ return setInterestName(e.target.value);
281
281
  },
282
282
  size: "small",
283
- value: platformName
283
+ value: interestName
284
284
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
285
285
  span: 6
286
286
  }, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
287
287
  onClick: function onClick() {
288
288
  setLoading(true);
289
289
  paginationParams.pageIndex = 1;
290
- queryPlatform(__assign({
291
- platformName: platformName
290
+ queryData(__assign({
291
+ interestName: interestName
292
292
  }, paginationParams));
293
293
  },
294
294
  size: "small",
@@ -304,19 +304,19 @@ function InterestedMerchants(props) {
304
304
  }, (0, _locale.i18n)('CANCEL'))))), /*#__PURE__*/_react["default"].createElement(_antd.Table, {
305
305
  bordered: false,
306
306
  columns: columns,
307
- dataSource: platformList,
307
+ dataSource: list,
308
308
  defaultExpandAllRows: true,
309
309
  loading: loading,
310
310
  pagination: __assign(__assign({}, paginationParams), {
311
311
  onChange: function onChange(page) {
312
312
  paginationParams.pageIndex = page;
313
- queryPlatform(__assign(__assign({}, paginationParams), {
314
- platformName: platformName
313
+ queryData(__assign(__assign({}, paginationParams), {
314
+ interestName: interestName
315
315
  }));
316
316
  },
317
317
  showSizeChanger: false
318
318
  }),
319
- rowKey: "distributionPlatformId",
319
+ rowKey: "interestId",
320
320
  rowSelection: rowSelection,
321
321
  scroll: {
322
322
  y: 400
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports["default"] = InterestedProducts;
8
+ exports["default"] = InterestedMerchants;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
@@ -181,25 +181,25 @@ var paginationParams = {
181
181
  pageIndex: 1
182
182
  };
183
183
 
184
- function InterestedProducts(props) {
184
+ function InterestedMerchants(props) {
185
185
  var _this = this;
186
186
 
187
187
  var _onChange = props.onChange,
188
188
  _fetch = props._fetch;
189
189
 
190
190
  var _a = (0, _react.useState)([]),
191
- platformList = _a[0],
192
- setPlatformList = _a[1];
191
+ list = _a[0],
192
+ setList = _a[1];
193
193
 
194
194
  var _b = (0, _react.useState)(false),
195
195
  loading = _b[0],
196
196
  setLoading = _b[1];
197
197
 
198
198
  var _c = (0, _react.useState)(''),
199
- platformName = _c[0],
200
- setPlatformName = _c[1];
199
+ interestName = _c[0],
200
+ setInterestName = _c[1];
201
201
 
202
- var queryPlatform = function queryPlatform(params) {
202
+ var queryData = function queryData(params) {
203
203
  return __awaiter(_this, void 0, void 0, function () {
204
204
  var res;
205
205
  return __generator(this, function (_a) {
@@ -208,12 +208,12 @@ function InterestedProducts(props) {
208
208
  setLoading(true);
209
209
  return [4
210
210
  /*yield*/
211
- , _fetch("/designer/v1/" + window.magicDesign.MBaseUrl + "/distribution/platform/page", params, 'GET')];
211
+ , _fetch("/designer/v1/" + window.magicDesign.MBaseUrl + "/interest/page", params, 'GET')];
212
212
 
213
213
  case 1:
214
214
  res = _a.sent();
215
215
  paginationParams.total = res.total;
216
- setPlatformList(res.list);
216
+ setList(res.list);
217
217
  setLoading(false);
218
218
  return [2
219
219
  /*return*/
@@ -224,11 +224,11 @@ function InterestedProducts(props) {
224
224
  };
225
225
 
226
226
  (0, _react.useEffect)(function () {
227
- queryPlatform(paginationParams);
227
+ queryData(paginationParams);
228
228
  }, []);
229
229
  var columns = [{
230
- title: 'Platform Name',
231
- dataIndex: 'platformName'
230
+ title: 'InterestName',
231
+ dataIndex: 'interestName'
232
232
  }, {
233
233
  title: 'Logo',
234
234
  dataIndex: 'logo',
@@ -246,17 +246,17 @@ function InterestedProducts(props) {
246
246
  var rowSelection = {
247
247
  onChange: function onChange(selectedRowKeys, selectedRow) {
248
248
  _onChange({
249
- value: selectedRow[0].distributionPlatformId,
250
- name: selectedRow[0].platformName
249
+ value: selectedRow[0].interestId,
250
+ name: selectedRow[0].interestName
251
251
  });
252
252
  },
253
253
  type: 'radio'
254
254
  };
255
255
 
256
256
  var reset = function reset() {
257
- setPlatformName('');
258
- queryPlatform(__assign({
259
- platformName: ''
257
+ setInterestName('');
258
+ queryData(__assign({
259
+ interestName: ''
260
260
  }, paginationParams));
261
261
  };
262
262
 
@@ -274,21 +274,21 @@ function InterestedProducts(props) {
274
274
  }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
275
275
  span: 16
276
276
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
277
- label: "Platform Name"
277
+ label: "Interest Name"
278
278
  }, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
279
279
  onChange: function onChange(e) {
280
- return setPlatformName(e.target.value);
280
+ return setInterestName(e.target.value);
281
281
  },
282
282
  size: "small",
283
- value: platformName
283
+ value: interestName
284
284
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
285
285
  span: 6
286
286
  }, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
287
287
  onClick: function onClick() {
288
288
  setLoading(true);
289
289
  paginationParams.pageIndex = 1;
290
- queryPlatform(__assign({
291
- platformName: platformName
290
+ queryData(__assign({
291
+ interestName: interestName
292
292
  }, paginationParams));
293
293
  },
294
294
  size: "small",
@@ -304,19 +304,19 @@ function InterestedProducts(props) {
304
304
  }, (0, _locale.i18n)('CANCEL'))))), /*#__PURE__*/_react["default"].createElement(_antd.Table, {
305
305
  bordered: false,
306
306
  columns: columns,
307
- dataSource: platformList,
307
+ dataSource: list,
308
308
  defaultExpandAllRows: true,
309
309
  loading: loading,
310
310
  pagination: __assign(__assign({}, paginationParams), {
311
311
  onChange: function onChange(page) {
312
312
  paginationParams.pageIndex = page;
313
- queryPlatform(__assign(__assign({}, paginationParams), {
314
- platformName: platformName
313
+ queryData(__assign(__assign({}, paginationParams), {
314
+ interestName: interestName
315
315
  }));
316
316
  },
317
317
  showSizeChanger: false
318
318
  }),
319
- rowKey: "distributionPlatformId",
319
+ rowKey: "interestId",
320
320
  rowSelection: rowSelection,
321
321
  scroll: {
322
322
  y: 400
@@ -229,7 +229,7 @@ function MerchantStory(props) {
229
229
  queryData(paginationParams);
230
230
  }, []);
231
231
  var columns = [{
232
- title: 'store Name',
232
+ title: 'StoreName',
233
233
  dataIndex: 'storeName'
234
234
  }, {
235
235
  title: 'Logo',
@@ -129,10 +129,11 @@ function (_super) {
129
129
 
130
130
  _this.isShowSetTemplate = function () {
131
131
  return _constants.pageStateMap.DRAFT === _this.props.pageState;
132
- };
132
+ }; // 拒绝审核 和 草稿状态展示保存按钮
133
+
133
134
 
134
135
  _this.isShowSave = function () {
135
- return !(0, _coreUtil.isAutoAudit)() && [_constants.pageStateMap.REJECTED, _constants.pageStateMap.DRAFT].includes(_this.props.pageState);
136
+ return [_constants.pageStateMap.REJECTED, _constants.pageStateMap.DRAFT].includes(_this.props.pageState);
136
137
  };
137
138
 
138
139
  return _this;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "2.0.114",
4
+ "version": "2.0.115",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",
Binary file
Binary file