@fonixtree/magic-design 0.1.30 → 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.
- package/es/composite-comp/dito/components/SignBoard/mobile/index.js +31 -20
- package/es/composite-comp/dito/components/SignBoard/pc/index.js +15 -21
- package/es/locale/en/en.json +5 -0
- package/es/locale/es/es.json +5 -0
- package/es/locale/id/id.json +5 -0
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +31 -20
- package/lib/composite-comp/dito/components/SignBoard/pc/index.js +15 -21
- package/lib/locale/en/en.json +5 -0
- package/lib/locale/es/es.json +5 -0
- package/lib/locale/id/id.json +5 -0
- package/package.json +1 -1
|
@@ -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
|
-
|
|
211
|
-
|
|
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
|
-
,
|
|
217
|
+
, 2];
|
|
217
218
|
return [4
|
|
218
219
|
/*yield*/
|
|
219
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET')
|
|
220
|
-
|
|
221
|
-
case 1:
|
|
222
|
-
res = _a.sent();
|
|
223
|
-
return [4
|
|
224
|
-
/*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
|
|
230
|
-
|
|
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
|
-
|
|
230
|
+
_b.label = 2;
|
|
236
231
|
|
|
237
|
-
case
|
|
232
|
+
case 2:
|
|
238
233
|
return [2
|
|
239
234
|
/*return*/
|
|
240
235
|
];
|
|
@@ -309,6 +304,21 @@ function (_super) {
|
|
|
309
304
|
}
|
|
310
305
|
};
|
|
311
306
|
|
|
307
|
+
_this.toChat = function () {
|
|
308
|
+
var storeInfo = _this.state.storeInfo; // 登录情况下,直接跳聊天页
|
|
309
|
+
|
|
310
|
+
if (localStorage.getItem('isLogin') === 'Y') {
|
|
311
|
+
(0, _commonUtil.navigateTo)("/chat/" + (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.sysAccount));
|
|
312
|
+
} else {
|
|
313
|
+
window.magicDesign.history.push({
|
|
314
|
+
pathname: '/sign-in',
|
|
315
|
+
state: {
|
|
316
|
+
redirectUrl: "/chat/" + (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.sysAccount)
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
|
|
312
322
|
return _this;
|
|
313
323
|
}
|
|
314
324
|
|
|
@@ -364,11 +374,12 @@ function (_super) {
|
|
|
364
374
|
className: "store-info-wrap"
|
|
365
375
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
366
376
|
className: "number"
|
|
367
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) || '
|
|
377
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, Number((storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) / 100).toFixed(1) || '5', " "), " ", (0, _locale.i18n)('Positive')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
368
378
|
className: "number"
|
|
369
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.userCollectionNum) || '1000+', " "), "
|
|
370
|
-
className: "chat-btn"
|
|
371
|
-
|
|
379
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.userCollectionNum) || '1000+', " "), " ", (0, _locale.i18n)('FOLLOWERS')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
380
|
+
className: "chat-btn",
|
|
381
|
+
onClick: this.toChat
|
|
382
|
+
}, (0, _locale.i18n)('CHAT'))));
|
|
372
383
|
};
|
|
373
384
|
|
|
374
385
|
SignBoardMobile.defaultProps = {
|
|
@@ -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
|
-
|
|
215
|
-
|
|
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
|
-
,
|
|
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
|
|
234
|
-
|
|
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
|
-
|
|
234
|
+
_b.label = 2;
|
|
241
235
|
|
|
242
|
-
case
|
|
236
|
+
case 2:
|
|
243
237
|
return [2
|
|
244
238
|
/*return*/
|
|
245
239
|
];
|
|
@@ -390,13 +384,13 @@ function (_super) {
|
|
|
390
384
|
className: "store-number"
|
|
391
385
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
392
386
|
className: "store-number-item"
|
|
393
|
-
}, "
|
|
387
|
+
}, (0, _locale.i18n)('Positive'), ":", /*#__PURE__*/_react["default"].createElement("span", null, Number((storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) / 100).toFixed(1) || '5')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
394
388
|
className: "store-number-item"
|
|
395
|
-
}, "
|
|
389
|
+
}, (0, _locale.i18n)('FOLLOWERS'), ":", /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.userCollectionNum) || '1000+')))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
396
390
|
onClick: this.clickCollect
|
|
397
391
|
}, isFollow ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
398
392
|
className: "followed"
|
|
399
|
-
},
|
|
393
|
+
}, (0, _locale.i18n)('FOLLOWING')) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
400
394
|
className: "follow"
|
|
401
395
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
402
396
|
color: "#0D52D6",
|
|
@@ -404,7 +398,7 @@ function (_super) {
|
|
|
404
398
|
type: "icon-add"
|
|
405
399
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
406
400
|
className: "txt"
|
|
407
|
-
},
|
|
401
|
+
}, (0, _locale.i18n)('FOLLOW')))))));
|
|
408
402
|
};
|
|
409
403
|
|
|
410
404
|
SignBoardPc.defaultProps = {
|
package/es/locale/en/en.json
CHANGED
package/es/locale/es/es.json
CHANGED
package/es/locale/id/id.json
CHANGED
|
@@ -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
|
-
|
|
211
|
-
|
|
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
|
-
,
|
|
217
|
+
, 2];
|
|
217
218
|
return [4
|
|
218
219
|
/*yield*/
|
|
219
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET')
|
|
220
|
-
|
|
221
|
-
case 1:
|
|
222
|
-
res = _a.sent();
|
|
223
|
-
return [4
|
|
224
|
-
/*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
|
|
230
|
-
|
|
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
|
-
|
|
230
|
+
_b.label = 2;
|
|
236
231
|
|
|
237
|
-
case
|
|
232
|
+
case 2:
|
|
238
233
|
return [2
|
|
239
234
|
/*return*/
|
|
240
235
|
];
|
|
@@ -309,6 +304,21 @@ function (_super) {
|
|
|
309
304
|
}
|
|
310
305
|
};
|
|
311
306
|
|
|
307
|
+
_this.toChat = function () {
|
|
308
|
+
var storeInfo = _this.state.storeInfo; // 登录情况下,直接跳聊天页
|
|
309
|
+
|
|
310
|
+
if (localStorage.getItem('isLogin') === 'Y') {
|
|
311
|
+
(0, _commonUtil.navigateTo)("/chat/" + (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.sysAccount));
|
|
312
|
+
} else {
|
|
313
|
+
window.magicDesign.history.push({
|
|
314
|
+
pathname: '/sign-in',
|
|
315
|
+
state: {
|
|
316
|
+
redirectUrl: "/chat/" + (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.sysAccount)
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
|
|
312
322
|
return _this;
|
|
313
323
|
}
|
|
314
324
|
|
|
@@ -364,11 +374,12 @@ function (_super) {
|
|
|
364
374
|
className: "store-info-wrap"
|
|
365
375
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
366
376
|
className: "number"
|
|
367
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) || '
|
|
377
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, Number((storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) / 100).toFixed(1) || '5', " "), " ", (0, _locale.i18n)('Positive')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
368
378
|
className: "number"
|
|
369
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.userCollectionNum) || '1000+', " "), "
|
|
370
|
-
className: "chat-btn"
|
|
371
|
-
|
|
379
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.userCollectionNum) || '1000+', " "), " ", (0, _locale.i18n)('FOLLOWERS')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
380
|
+
className: "chat-btn",
|
|
381
|
+
onClick: this.toChat
|
|
382
|
+
}, (0, _locale.i18n)('CHAT'))));
|
|
372
383
|
};
|
|
373
384
|
|
|
374
385
|
SignBoardMobile.defaultProps = {
|
|
@@ -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
|
-
|
|
215
|
-
|
|
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
|
-
,
|
|
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
|
|
234
|
-
|
|
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
|
-
|
|
234
|
+
_b.label = 2;
|
|
241
235
|
|
|
242
|
-
case
|
|
236
|
+
case 2:
|
|
243
237
|
return [2
|
|
244
238
|
/*return*/
|
|
245
239
|
];
|
|
@@ -390,13 +384,13 @@ function (_super) {
|
|
|
390
384
|
className: "store-number"
|
|
391
385
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
392
386
|
className: "store-number-item"
|
|
393
|
-
}, "
|
|
387
|
+
}, (0, _locale.i18n)('Positive'), ":", /*#__PURE__*/_react["default"].createElement("span", null, Number((storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) / 100).toFixed(1) || '5')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
394
388
|
className: "store-number-item"
|
|
395
|
-
}, "
|
|
389
|
+
}, (0, _locale.i18n)('FOLLOWERS'), ":", /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.userCollectionNum) || '1000+')))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
396
390
|
onClick: this.clickCollect
|
|
397
391
|
}, isFollow ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
398
392
|
className: "followed"
|
|
399
|
-
},
|
|
393
|
+
}, (0, _locale.i18n)('FOLLOWING')) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
400
394
|
className: "follow"
|
|
401
395
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
402
396
|
color: "#0D52D6",
|
|
@@ -404,7 +398,7 @@ function (_super) {
|
|
|
404
398
|
type: "icon-add"
|
|
405
399
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
406
400
|
className: "txt"
|
|
407
|
-
},
|
|
401
|
+
}, (0, _locale.i18n)('FOLLOW')))))));
|
|
408
402
|
};
|
|
409
403
|
|
|
410
404
|
SignBoardPc.defaultProps = {
|
package/lib/locale/en/en.json
CHANGED
package/lib/locale/es/es.json
CHANGED
package/lib/locale/id/id.json
CHANGED