@fonixtree/magic-design 0.1.31 → 0.1.32

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.
@@ -206,35 +206,30 @@ function (_super) {
206
206
 
207
207
  _this.getStoreInfo = function () {
208
208
  return __awaiter(_this, void 0, void 0, function () {
209
- var storeId, res, isFollow;
210
- return __generator(this, function (_a) {
211
- switch (_a.label) {
209
+ var storeId, _a, res, isFollow;
210
+
211
+ return __generator(this, function (_b) {
212
+ switch (_b.label) {
212
213
  case 0:
213
214
  storeId = window.magicDesign.storeId;
214
215
  if (!storeId) return [3
215
216
  /*break*/
216
- , 3];
217
- return [4
218
- /*yield*/
219
- , (0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET')];
220
-
221
- case 1:
222
- res = _a.sent();
217
+ , 2];
223
218
  return [4
224
219
  /*yield*/
225
- , (0, _commonUtil.commonFetch)('/designer/v1/h5/collection/store/check', {
220
+ , Promise.all([(0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET'), (0, _commonUtil.commonFetch)('/designer/v1/h5/collection/store/check', {
226
221
  storeId: storeId
227
- })];
222
+ })])];
228
223
 
229
- case 2:
230
- isFollow = _a.sent();
224
+ case 1:
225
+ _a = _b.sent(), res = _a[0], isFollow = _a[1];
231
226
  this.setState({
232
227
  storeInfo: res,
233
228
  isFollow: isFollow
234
229
  });
235
- _a.label = 3;
230
+ _b.label = 2;
236
231
 
237
- case 3:
232
+ case 2:
238
233
  return [2
239
234
  /*return*/
240
235
  ];
@@ -317,7 +312,9 @@ function (_super) {
317
312
  } else {
318
313
  window.magicDesign.history.push({
319
314
  pathname: '/sign-in',
320
- state: "/chat/" + (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.sysAccount)
315
+ state: {
316
+ redirectUrl: "/chat/" + (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.sysAccount)
317
+ }
321
318
  });
322
319
  }
323
320
  };
@@ -210,36 +210,30 @@ function (_super) {
210
210
 
211
211
  _this.getStoreInfo = function () {
212
212
  return __awaiter(_this, void 0, void 0, function () {
213
- var storeId, res, isFollow;
214
- return __generator(this, function (_a) {
215
- switch (_a.label) {
213
+ var storeId, _a, res, isFollow;
214
+
215
+ return __generator(this, function (_b) {
216
+ switch (_b.label) {
216
217
  case 0:
217
218
  storeId = window.magicDesign.storeId;
218
219
  if (!storeId) return [3
219
220
  /*break*/
220
- , 3];
221
+ , 2];
221
222
  return [4
222
223
  /*yield*/
223
- , (0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET')];
224
-
225
- case 1:
226
- res = _a.sent();
227
- return [4
228
- /*yield*/
229
- , (0, _commonUtil.commonFetch)('/designer/v1/h5/collection/store/check', {
224
+ , Promise.all([(0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET'), (0, _commonUtil.commonFetch)('/designer/v1/h5/collection/store/check', {
230
225
  storeId: storeId
231
- })];
226
+ })])];
232
227
 
233
- case 2:
234
- isFollow = _a.sent();
235
- console.log('---d', res);
228
+ case 1:
229
+ _a = _b.sent(), res = _a[0], isFollow = _a[1];
236
230
  this.setState({
237
231
  storeInfo: res,
238
232
  isFollow: isFollow
239
233
  });
240
- _a.label = 3;
234
+ _b.label = 2;
241
235
 
242
- case 3:
236
+ case 2:
243
237
  return [2
244
238
  /*return*/
245
239
  ];
@@ -206,35 +206,30 @@ function (_super) {
206
206
 
207
207
  _this.getStoreInfo = function () {
208
208
  return __awaiter(_this, void 0, void 0, function () {
209
- var storeId, res, isFollow;
210
- return __generator(this, function (_a) {
211
- switch (_a.label) {
209
+ var storeId, _a, res, isFollow;
210
+
211
+ return __generator(this, function (_b) {
212
+ switch (_b.label) {
212
213
  case 0:
213
214
  storeId = window.magicDesign.storeId;
214
215
  if (!storeId) return [3
215
216
  /*break*/
216
- , 3];
217
- return [4
218
- /*yield*/
219
- , (0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET')];
220
-
221
- case 1:
222
- res = _a.sent();
217
+ , 2];
223
218
  return [4
224
219
  /*yield*/
225
- , (0, _commonUtil.commonFetch)('/designer/v1/h5/collection/store/check', {
220
+ , Promise.all([(0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET'), (0, _commonUtil.commonFetch)('/designer/v1/h5/collection/store/check', {
226
221
  storeId: storeId
227
- })];
222
+ })])];
228
223
 
229
- case 2:
230
- isFollow = _a.sent();
224
+ case 1:
225
+ _a = _b.sent(), res = _a[0], isFollow = _a[1];
231
226
  this.setState({
232
227
  storeInfo: res,
233
228
  isFollow: isFollow
234
229
  });
235
- _a.label = 3;
230
+ _b.label = 2;
236
231
 
237
- case 3:
232
+ case 2:
238
233
  return [2
239
234
  /*return*/
240
235
  ];
@@ -317,7 +312,9 @@ function (_super) {
317
312
  } else {
318
313
  window.magicDesign.history.push({
319
314
  pathname: '/sign-in',
320
- state: "/chat/" + (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.sysAccount)
315
+ state: {
316
+ redirectUrl: "/chat/" + (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.sysAccount)
317
+ }
321
318
  });
322
319
  }
323
320
  };
@@ -210,36 +210,30 @@ function (_super) {
210
210
 
211
211
  _this.getStoreInfo = function () {
212
212
  return __awaiter(_this, void 0, void 0, function () {
213
- var storeId, res, isFollow;
214
- return __generator(this, function (_a) {
215
- switch (_a.label) {
213
+ var storeId, _a, res, isFollow;
214
+
215
+ return __generator(this, function (_b) {
216
+ switch (_b.label) {
216
217
  case 0:
217
218
  storeId = window.magicDesign.storeId;
218
219
  if (!storeId) return [3
219
220
  /*break*/
220
- , 3];
221
+ , 2];
221
222
  return [4
222
223
  /*yield*/
223
- , (0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET')];
224
-
225
- case 1:
226
- res = _a.sent();
227
- return [4
228
- /*yield*/
229
- , (0, _commonUtil.commonFetch)('/designer/v1/h5/collection/store/check', {
224
+ , Promise.all([(0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET'), (0, _commonUtil.commonFetch)('/designer/v1/h5/collection/store/check', {
230
225
  storeId: storeId
231
- })];
226
+ })])];
232
227
 
233
- case 2:
234
- isFollow = _a.sent();
235
- console.log('---d', res);
228
+ case 1:
229
+ _a = _b.sent(), res = _a[0], isFollow = _a[1];
236
230
  this.setState({
237
231
  storeInfo: res,
238
232
  isFollow: isFollow
239
233
  });
240
- _a.label = 3;
234
+ _b.label = 2;
241
235
 
242
- case 3:
236
+ case 2:
243
237
  return [2
244
238
  /*return*/
245
239
  ];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "0.1.31",
4
+ "version": "0.1.32",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",