@pisell/private-materials 3.2.4 → 3.2.5
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +4 -4
- package/es/components/wallet/DiscountCard/index.js +1 -1
- package/es/components/wallet/DiscountCard/index.less +3 -4
- package/es/components/wallet/PointCard/index.js +1 -1
- package/es/components/wallet/PointCard/index.less +3 -4
- package/es/components/wallet/RechargeableCard/index.js +4 -4
- package/es/components/wallet/RechargeableCard/index.less +4 -5
- package/es/components/wallet/Voucher/index.js +1 -1
- package/es/components/wallet/Voucher/index.less +3 -4
- package/es/components/wallet/components/WalletBar/index.js +4 -2
- package/es/components/wallet/index.js +8 -4
- package/es/components/wallet/index.less +9 -3
- package/es/components/walletList/index.js +77 -85
- package/es/components/walletList/serve.d.ts +2 -6
- package/es/components/walletList/serve.js +17 -52
- package/lib/components/wallet/DiscountCard/index.js +1 -1
- package/lib/components/wallet/DiscountCard/index.less +3 -4
- package/lib/components/wallet/PointCard/index.js +1 -1
- package/lib/components/wallet/PointCard/index.less +3 -4
- package/lib/components/wallet/RechargeableCard/index.js +3 -3
- package/lib/components/wallet/RechargeableCard/index.less +4 -5
- package/lib/components/wallet/Voucher/index.js +1 -1
- package/lib/components/wallet/Voucher/index.less +3 -4
- package/lib/components/wallet/components/WalletBar/index.js +3 -2
- package/lib/components/wallet/index.js +3 -2
- package/lib/components/wallet/index.less +9 -3
- package/lib/components/walletList/index.js +42 -20
- package/lib/components/walletList/serve.d.ts +2 -6
- package/lib/components/walletList/serve.js +4 -14
- package/package.json +4 -4
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
.wallet-discountCard-title {
|
|
2
2
|
color: var(--Gray-900, #101828);
|
|
3
|
-
|
|
4
|
-
/* Text xl/Semibold */
|
|
5
3
|
font-family: Inter;
|
|
6
4
|
font-size: 20px;
|
|
7
5
|
font-style: normal;
|
|
8
6
|
font-weight: 600;
|
|
9
|
-
line-height: 30px;
|
|
10
|
-
margin: 20px
|
|
7
|
+
line-height: 30px;
|
|
8
|
+
margin-top: 20px;
|
|
9
|
+
margin-bottom: 24px;
|
|
11
10
|
}
|
|
@@ -148,7 +148,7 @@ var RechargeableCard = Provider(function (props) {
|
|
|
148
148
|
modalWrapStyle: {
|
|
149
149
|
overflowY: 'auto',
|
|
150
150
|
top: 68,
|
|
151
|
-
height: 'calc(
|
|
151
|
+
height: 'calc(100% - 68px)',
|
|
152
152
|
zIndex: 998
|
|
153
153
|
},
|
|
154
154
|
pcDetailModalDisplay: platform === 'h5' ? true : false,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
.wallet-pointCard-title {
|
|
2
2
|
color: var(--Gray-900, #101828);
|
|
3
|
-
|
|
4
|
-
/* Text xl/Semibold */
|
|
5
3
|
font-family: Inter;
|
|
6
4
|
font-size: 20px;
|
|
7
5
|
font-style: normal;
|
|
8
6
|
font-weight: 600;
|
|
9
|
-
line-height: 30px;
|
|
10
|
-
margin: 20px
|
|
7
|
+
line-height: 30px;
|
|
8
|
+
margin-top: 20px;
|
|
9
|
+
margin-bottom: 24px;
|
|
11
10
|
}
|
|
@@ -380,12 +380,12 @@ var RechargeableCard = Provider(function (props) {
|
|
|
380
380
|
// 打开详情
|
|
381
381
|
openDetail(detailWithButtons);
|
|
382
382
|
};
|
|
383
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
383
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, platform !== 'pc' && /*#__PURE__*/React.createElement("div", {
|
|
384
384
|
className: "wallet-rechargeableCard-title"
|
|
385
|
-
}, locales.getText('page.wallet.rechargeableCard')), /*#__PURE__*/React.createElement(CardMetricItem, {
|
|
385
|
+
}, locales.getText('page.wallet.rechargeableCard')), isEmpty ? /*#__PURE__*/React.createElement(PisellEmpty, null) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardMetricItem, {
|
|
386
386
|
title: locales.getText('page.wallet.cardBalance'),
|
|
387
387
|
style: {
|
|
388
|
-
|
|
388
|
+
marginBottom: 24
|
|
389
389
|
},
|
|
390
390
|
hint: false,
|
|
391
391
|
tags: false,
|
|
@@ -400,7 +400,7 @@ var RechargeableCard = Provider(function (props) {
|
|
|
400
400
|
modalWrapStyle: {
|
|
401
401
|
overflowY: 'auto',
|
|
402
402
|
top: 0,
|
|
403
|
-
height: '
|
|
403
|
+
height: '100%',
|
|
404
404
|
zIndex: 998,
|
|
405
405
|
position: 'fixed',
|
|
406
406
|
left: 0,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.wallet-
|
|
1
|
+
.wallet-rechargeableCard {
|
|
2
2
|
// 充值选项容器
|
|
3
3
|
&-options {
|
|
4
4
|
// 卡片项
|
|
@@ -78,14 +78,13 @@
|
|
|
78
78
|
// 充值卡标题
|
|
79
79
|
&-title {
|
|
80
80
|
color: var(--Gray-900, #101828);
|
|
81
|
-
|
|
82
|
-
/* Text xl/Semibold */
|
|
83
81
|
font-family: Inter;
|
|
84
82
|
font-size: 20px;
|
|
85
83
|
font-style: normal;
|
|
86
84
|
font-weight: 600;
|
|
87
|
-
line-height: 30px;
|
|
88
|
-
margin: 20px
|
|
85
|
+
line-height: 30px;
|
|
86
|
+
margin-top: 20px;
|
|
87
|
+
margin-bottom: 24px;
|
|
89
88
|
}
|
|
90
89
|
|
|
91
90
|
// 钱包卡片样式
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
.wallet-voucher-title {
|
|
2
2
|
color: var(--Gray-900, #101828);
|
|
3
|
-
|
|
4
|
-
/* Text xl/Semibold */
|
|
5
3
|
font-family: Inter;
|
|
6
4
|
font-size: 20px;
|
|
7
5
|
font-style: normal;
|
|
8
6
|
font-weight: 600;
|
|
9
|
-
line-height: 30px;
|
|
10
|
-
margin: 20px
|
|
7
|
+
line-height: 30px;
|
|
8
|
+
margin-top: 20px;
|
|
9
|
+
margin-bottom: 24px;
|
|
11
10
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { LeftOutlined } from '@ant-design/icons';
|
|
2
|
+
// import { LeftOutlined } from '@ant-design/icons';
|
|
3
|
+
import { Iconfont } from '@pisell/materials';
|
|
3
4
|
import { locales } from '@pisell/utils';
|
|
4
5
|
import "./index.less";
|
|
5
6
|
var WalletBar = function WalletBar(_ref) {
|
|
@@ -7,8 +8,9 @@ var WalletBar = function WalletBar(_ref) {
|
|
|
7
8
|
onBack = _ref.onBack;
|
|
8
9
|
return /*#__PURE__*/React.createElement("div", {
|
|
9
10
|
className: "pisell-lowcode-wallet-bar"
|
|
10
|
-
}, /*#__PURE__*/React.createElement(
|
|
11
|
+
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
11
12
|
onClick: onBack,
|
|
13
|
+
type: "pisell2-chevron-left",
|
|
12
14
|
className: "pisell-lowcode-wallet-header-bar-arrow"
|
|
13
15
|
}), /*#__PURE__*/React.createElement("span", {
|
|
14
16
|
className: "header-title"
|
|
@@ -4,7 +4,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
4
4
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
5
|
import React, { useEffect, useContext, useMemo } from 'react';
|
|
6
6
|
import { Context, Provider } from "./model";
|
|
7
|
-
import { Button, Tabs,
|
|
7
|
+
import { Button, Tabs, Badge, Typography, PisellInformationEntry, PisellModal, Menu, PisellToast, PisellWalletPassCard } from '@pisell/materials';
|
|
8
8
|
import { locales } from '@pisell/utils';
|
|
9
9
|
var Title = Typography.Title;
|
|
10
10
|
import { PlusOutlined, RightOutlined } from '@ant-design/icons';
|
|
@@ -685,10 +685,14 @@ var Wallet = Provider(function () {
|
|
|
685
685
|
return addModalOpen ? 'wallet-add-modal' : 'pisell-lowcode__wallet__addModal';
|
|
686
686
|
};
|
|
687
687
|
return /*#__PURE__*/React.createElement(DetailProvider, null, /*#__PURE__*/React.createElement("div", {
|
|
688
|
-
className: "pisell-wallet-container"
|
|
689
|
-
|
|
688
|
+
className: "pisell-wallet-container",
|
|
689
|
+
style: {
|
|
690
|
+
height: '100%'
|
|
691
|
+
}
|
|
692
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
690
693
|
className: "pisell-lowcode-wallet",
|
|
691
694
|
style: {
|
|
695
|
+
height: platform === 'pc' ? 'auto' : '100%',
|
|
692
696
|
width: platform === 'pc' ? 960 : '100vw',
|
|
693
697
|
padding: platform === 'pc' ? 20 : 0
|
|
694
698
|
}
|
|
@@ -736,6 +740,6 @@ var Wallet = Provider(function () {
|
|
|
736
740
|
}
|
|
737
741
|
}), searchList.map(function (item) {
|
|
738
742
|
return renderSearchCard(item);
|
|
739
|
-
})))))
|
|
743
|
+
})))));
|
|
740
744
|
});
|
|
741
745
|
export default Wallet;
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
.pisell-lowcode-wallet-mobile {
|
|
36
36
|
display: flex;
|
|
37
|
-
height:
|
|
37
|
+
height: 100%;
|
|
38
38
|
width: 100vw;
|
|
39
39
|
flex-direction: column;
|
|
40
40
|
background-color: #fff;
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
.pisell-lowcode-wallet-header-bar-arrow {
|
|
64
64
|
position: absolute;
|
|
65
65
|
font-size: 24px;
|
|
66
|
-
top:
|
|
67
|
-
left:
|
|
66
|
+
top: 22px;
|
|
67
|
+
left: 22px;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -88,6 +88,12 @@
|
|
|
88
88
|
border-right: none;
|
|
89
89
|
}
|
|
90
90
|
.pisell-lowcode-wallet-title {
|
|
91
|
+
color: var(--Gray-900, #101828);
|
|
92
|
+
font-family: Inter;
|
|
93
|
+
font-size: 30px;
|
|
94
|
+
font-style: normal;
|
|
95
|
+
font-weight: 600;
|
|
96
|
+
line-height: 38px;
|
|
91
97
|
margin: 20px 0;
|
|
92
98
|
}
|
|
93
99
|
|
|
@@ -26,10 +26,29 @@ import { locales } from '@pisell/utils';
|
|
|
26
26
|
import { request } from "./../../utils";
|
|
27
27
|
import "./index.less";
|
|
28
28
|
import classNames from 'classnames';
|
|
29
|
-
import { Skeleton } from 'antd';
|
|
30
29
|
// 导入所有类型
|
|
31
30
|
import { WalletCardItem, DEFAULT_CARD_CONFIG } from "./types";
|
|
32
31
|
|
|
32
|
+
// 添加 localStorage 相关的操作函数
|
|
33
|
+
var STORAGE_KEY = 'pisell_wallet_list_data';
|
|
34
|
+
var STORAGE_KEY_BALANCE = 'pisell_wallet_balance_data';
|
|
35
|
+
var saveToLocalStorage = function saveToLocalStorage(key, data) {
|
|
36
|
+
try {
|
|
37
|
+
localStorage.setItem(key, JSON.stringify(data));
|
|
38
|
+
} catch (error) {
|
|
39
|
+
console.error('Error saving to localStorage:', error);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
var getFromLocalStorage = function getFromLocalStorage(key) {
|
|
43
|
+
try {
|
|
44
|
+
var data = localStorage.getItem(key);
|
|
45
|
+
return data ? JSON.parse(data) : null;
|
|
46
|
+
} catch (error) {
|
|
47
|
+
console.error('Error reading from localStorage:', error);
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
33
52
|
// @ts-ignore
|
|
34
53
|
|
|
35
54
|
// @ts-ignore
|
|
@@ -73,7 +92,7 @@ var DEFAULT_WALLET_CARD = {
|
|
|
73
92
|
name: 'Store name'
|
|
74
93
|
},
|
|
75
94
|
isLogin: false,
|
|
76
|
-
showIcon:
|
|
95
|
+
showIcon: true,
|
|
77
96
|
icon: '',
|
|
78
97
|
wallet: {
|
|
79
98
|
name: {
|
|
@@ -321,7 +340,7 @@ var WalletList = Provider(function (props) {
|
|
|
321
340
|
};
|
|
322
341
|
var initData = /*#__PURE__*/function () {
|
|
323
342
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(requestId) {
|
|
324
|
-
var _yield$Promise$all, _yield$Promise$all2, walletListData, walletBalanceData, _message, _data, isAuthError;
|
|
343
|
+
var cachedList, cachedBalance, _yield$Promise$all, _yield$Promise$all2, walletListData, walletBalanceData, _message, _data, isAuthError;
|
|
325
344
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
326
345
|
while (1) switch (_context3.prev = _context3.next) {
|
|
327
346
|
case 0:
|
|
@@ -357,33 +376,48 @@ var WalletList = Provider(function (props) {
|
|
|
357
376
|
}
|
|
358
377
|
return _context3.abrupt("return");
|
|
359
378
|
case 9:
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
379
|
+
// 从 localStorage 获取缓存数据
|
|
380
|
+
cachedList = getFromLocalStorage(STORAGE_KEY);
|
|
381
|
+
cachedBalance = getFromLocalStorage(STORAGE_KEY_BALANCE); // 如果有缓存数据,先使用缓存数据
|
|
382
|
+
if (cachedList && cachedBalance) {
|
|
383
|
+
setState({
|
|
384
|
+
list: cachedList,
|
|
385
|
+
balance: cachedBalance,
|
|
386
|
+
loading: false,
|
|
387
|
+
hasAttempted: false
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
_context3.prev = 12;
|
|
365
391
|
if (isMountedRef.current) {
|
|
366
|
-
_context3.next =
|
|
392
|
+
_context3.next = 15;
|
|
367
393
|
break;
|
|
368
394
|
}
|
|
369
395
|
return _context3.abrupt("return");
|
|
370
|
-
case 13:
|
|
371
|
-
_context3.next = 15;
|
|
372
|
-
return Promise.all([getWalletList({}), getWalletBalance()]);
|
|
373
396
|
case 15:
|
|
397
|
+
_context3.next = 17;
|
|
398
|
+
return Promise.all([getWalletList(), getWalletBalance()]);
|
|
399
|
+
case 17:
|
|
374
400
|
_yield$Promise$all = _context3.sent;
|
|
375
401
|
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2);
|
|
376
402
|
walletListData = _yield$Promise$all2[0];
|
|
377
403
|
walletBalanceData = _yield$Promise$all2[1];
|
|
378
404
|
if (!(!isMountedRef.current || requestIdRef.current !== requestId)) {
|
|
379
|
-
_context3.next =
|
|
405
|
+
_context3.next = 23;
|
|
380
406
|
break;
|
|
381
407
|
}
|
|
382
408
|
return _context3.abrupt("return");
|
|
383
|
-
case
|
|
409
|
+
case 23:
|
|
410
|
+
// 如果获取到有效数据,保存到 localStorage
|
|
411
|
+
if (walletListData && walletListData.length > 0) {
|
|
412
|
+
saveToLocalStorage(STORAGE_KEY, walletListData);
|
|
413
|
+
}
|
|
414
|
+
if (walletBalanceData) {
|
|
415
|
+
saveToLocalStorage(STORAGE_KEY_BALANCE, walletBalanceData);
|
|
416
|
+
}
|
|
417
|
+
|
|
384
418
|
// 添加判断逻辑:如果walletBalanceData为空或walletListData为空,2秒后重试
|
|
385
419
|
if (!walletBalanceData || Array.isArray(walletListData) && walletListData.length === 0) {
|
|
386
|
-
//
|
|
420
|
+
// 2秒后重试
|
|
387
421
|
setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
388
422
|
var retryBalanceData, retryListData;
|
|
389
423
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
@@ -400,35 +434,40 @@ var WalletList = Provider(function (props) {
|
|
|
400
434
|
retryBalanceData = walletBalanceData;
|
|
401
435
|
retryListData = walletListData; // 如果余额数据为空,重试请求余额
|
|
402
436
|
if (walletBalanceData) {
|
|
403
|
-
_context2.next =
|
|
437
|
+
_context2.next = 10;
|
|
404
438
|
break;
|
|
405
439
|
}
|
|
406
440
|
_context2.next = 8;
|
|
407
441
|
return getWalletBalance();
|
|
408
442
|
case 8:
|
|
409
443
|
retryBalanceData = _context2.sent;
|
|
410
|
-
|
|
444
|
+
if (retryBalanceData) {
|
|
445
|
+
saveToLocalStorage(STORAGE_KEY_BALANCE, retryBalanceData);
|
|
446
|
+
}
|
|
447
|
+
case 10:
|
|
411
448
|
if (!(Array.isArray(walletListData) && walletListData.length === 0)) {
|
|
412
|
-
_context2.next =
|
|
449
|
+
_context2.next = 15;
|
|
413
450
|
break;
|
|
414
451
|
}
|
|
415
|
-
_context2.next =
|
|
452
|
+
_context2.next = 13;
|
|
416
453
|
return getWalletList({});
|
|
417
|
-
case 12:
|
|
418
|
-
retryListData = _context2.sent;
|
|
419
454
|
case 13:
|
|
420
|
-
|
|
455
|
+
retryListData = _context2.sent;
|
|
456
|
+
if (retryListData && retryListData.length > 0) {
|
|
457
|
+
saveToLocalStorage(STORAGE_KEY, retryListData);
|
|
458
|
+
}
|
|
459
|
+
case 15:
|
|
460
|
+
// 更新状态
|
|
421
461
|
setState({
|
|
422
462
|
list: retryListData || [],
|
|
423
463
|
balance: retryBalanceData,
|
|
424
|
-
// 使用重试后的结果
|
|
425
464
|
loading: false,
|
|
426
465
|
hasAttempted: true
|
|
427
466
|
});
|
|
428
|
-
_context2.next =
|
|
467
|
+
_context2.next = 21;
|
|
429
468
|
break;
|
|
430
|
-
case
|
|
431
|
-
_context2.prev =
|
|
469
|
+
case 18:
|
|
470
|
+
_context2.prev = 18;
|
|
432
471
|
_context2.t0 = _context2["catch"](2);
|
|
433
472
|
// 重试出错也视为最终结果
|
|
434
473
|
setState({
|
|
@@ -437,14 +476,14 @@ var WalletList = Provider(function (props) {
|
|
|
437
476
|
loading: false,
|
|
438
477
|
hasAttempted: true
|
|
439
478
|
});
|
|
440
|
-
case
|
|
479
|
+
case 21:
|
|
441
480
|
case "end":
|
|
442
481
|
return _context2.stop();
|
|
443
482
|
}
|
|
444
|
-
}, _callee2, null, [[2,
|
|
445
|
-
})), 2000);
|
|
483
|
+
}, _callee2, null, [[2, 18]]);
|
|
484
|
+
})), 2000);
|
|
446
485
|
} else {
|
|
447
|
-
//
|
|
486
|
+
// 如果两个请求都有数据,直接使用结果
|
|
448
487
|
setState({
|
|
449
488
|
list: walletListData || [],
|
|
450
489
|
balance: walletBalanceData,
|
|
@@ -452,17 +491,17 @@ var WalletList = Provider(function (props) {
|
|
|
452
491
|
hasAttempted: true
|
|
453
492
|
});
|
|
454
493
|
}
|
|
455
|
-
_context3.next =
|
|
494
|
+
_context3.next = 34;
|
|
456
495
|
break;
|
|
457
|
-
case
|
|
458
|
-
_context3.prev =
|
|
459
|
-
_context3.t0 = _context3["catch"](
|
|
496
|
+
case 28:
|
|
497
|
+
_context3.prev = 28;
|
|
498
|
+
_context3.t0 = _context3["catch"](12);
|
|
460
499
|
if (!(!isMountedRef.current || requestIdRef.current !== requestId)) {
|
|
461
|
-
_context3.next =
|
|
500
|
+
_context3.next = 32;
|
|
462
501
|
break;
|
|
463
502
|
}
|
|
464
503
|
return _context3.abrupt("return");
|
|
465
|
-
case
|
|
504
|
+
case 32:
|
|
466
505
|
// 判断是否是登录超时错误
|
|
467
506
|
isAuthError = (_context3.t0 === null || _context3.t0 === void 0 ? void 0 : _context3.t0.code) === 4001 || (_context3.t0 === null || _context3.t0 === void 0 || (_message = _context3.t0.message) === null || _message === void 0 ? void 0 : _message.includes('login time out')) || (_context3.t0 === null || _context3.t0 === void 0 || (_data = _context3.t0.data) === null || _data === void 0 ? void 0 : _data.code) === 4001;
|
|
468
507
|
setState({
|
|
@@ -471,11 +510,11 @@ var WalletList = Provider(function (props) {
|
|
|
471
510
|
authError: isAuthError,
|
|
472
511
|
hasAttempted: true
|
|
473
512
|
});
|
|
474
|
-
case
|
|
513
|
+
case 34:
|
|
475
514
|
case "end":
|
|
476
515
|
return _context3.stop();
|
|
477
516
|
}
|
|
478
|
-
}, _callee3, null, [[
|
|
517
|
+
}, _callee3, null, [[12, 28]]);
|
|
479
518
|
}));
|
|
480
519
|
return function initData(_x) {
|
|
481
520
|
return _ref3.apply(this, arguments);
|
|
@@ -632,53 +671,6 @@ var WalletList = Provider(function (props) {
|
|
|
632
671
|
|
|
633
672
|
// 确保renderContent总是返回JSX,避免返回null
|
|
634
673
|
var renderContent = function renderContent() {
|
|
635
|
-
// 如果是加载中,显示骨架屏
|
|
636
|
-
if (loading) {
|
|
637
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
638
|
-
className: "pisell-wallet-list-container pisell-wallet-skeleton"
|
|
639
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
640
|
-
className: "wallet-content"
|
|
641
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
642
|
-
className: "wallet-card-skeleton"
|
|
643
|
-
}, /*#__PURE__*/React.createElement(Skeleton, {
|
|
644
|
-
active: true,
|
|
645
|
-
paragraph: {
|
|
646
|
-
rows: 6
|
|
647
|
-
}
|
|
648
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
649
|
-
className: "wallet-card-code-skeleton"
|
|
650
|
-
}, /*#__PURE__*/React.createElement(Skeleton.Button, {
|
|
651
|
-
active: true,
|
|
652
|
-
style: {
|
|
653
|
-
width: '80%',
|
|
654
|
-
height: 50
|
|
655
|
-
}
|
|
656
|
-
})))), /*#__PURE__*/React.createElement("div", {
|
|
657
|
-
className: "wallet-navigation-skeleton"
|
|
658
|
-
}, /*#__PURE__*/React.createElement(Skeleton.Button, {
|
|
659
|
-
active: true,
|
|
660
|
-
style: {
|
|
661
|
-
width: 40,
|
|
662
|
-
height: 40,
|
|
663
|
-
borderRadius: '50%'
|
|
664
|
-
}
|
|
665
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
666
|
-
className: "wallet-dots-container-skeleton"
|
|
667
|
-
}, /*#__PURE__*/React.createElement(Skeleton.Button, {
|
|
668
|
-
active: true,
|
|
669
|
-
style: {
|
|
670
|
-
width: 80,
|
|
671
|
-
height: 20
|
|
672
|
-
}
|
|
673
|
-
})), /*#__PURE__*/React.createElement(Skeleton.Button, {
|
|
674
|
-
active: true,
|
|
675
|
-
style: {
|
|
676
|
-
width: 40,
|
|
677
|
-
height: 40,
|
|
678
|
-
borderRadius: '50%'
|
|
679
|
-
}
|
|
680
|
-
})));
|
|
681
|
-
}
|
|
682
674
|
// 如果列表为空,不显示任何内容
|
|
683
675
|
if (list.length === 0) {
|
|
684
676
|
return null;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { WalletPass, WalletBalance
|
|
1
|
+
import { WalletPass, WalletBalance } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* 获取 wallet 列表
|
|
4
4
|
* @param params
|
|
5
5
|
* @returns
|
|
6
6
|
*/
|
|
7
|
-
export declare const getWalletList: (
|
|
8
|
-
/**
|
|
9
|
-
* 获取wallet pass 余额
|
|
10
|
-
*/
|
|
11
|
-
export declare const getWalletPassBalance: (params?: Record<string, any>) => Promise<WalletBalance | null>;
|
|
7
|
+
export declare const getWalletList: () => Promise<WalletPass[]>;
|
|
12
8
|
/**
|
|
13
9
|
* 获取钱包余额
|
|
14
10
|
* @returns
|
|
@@ -9,14 +9,14 @@ import { request } from "./../../utils";
|
|
|
9
9
|
* @returns
|
|
10
10
|
*/
|
|
11
11
|
export var getWalletList = /*#__PURE__*/function () {
|
|
12
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(
|
|
12
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
13
13
|
var _yield$request$getReq, data;
|
|
14
14
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
15
15
|
while (1) switch (_context.prev = _context.next) {
|
|
16
16
|
case 0:
|
|
17
17
|
_context.prev = 0;
|
|
18
18
|
_context.next = 3;
|
|
19
|
-
return request.getRequest().get('/h5/wallet',
|
|
19
|
+
return request.getRequest().get('/h5/wallet', {});
|
|
20
20
|
case 3:
|
|
21
21
|
_yield$request$getReq = _context.sent;
|
|
22
22
|
data = _yield$request$getReq.data;
|
|
@@ -31,74 +31,39 @@ export var getWalletList = /*#__PURE__*/function () {
|
|
|
31
31
|
}
|
|
32
32
|
}, _callee, null, [[0, 8]]);
|
|
33
33
|
}));
|
|
34
|
-
return function getWalletList(
|
|
34
|
+
return function getWalletList() {
|
|
35
35
|
return _ref.apply(this, arguments);
|
|
36
36
|
};
|
|
37
37
|
}();
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* 获取钱包余额
|
|
41
|
+
* @returns
|
|
41
42
|
*/
|
|
42
|
-
export var
|
|
43
|
+
export var getWalletBalance = /*#__PURE__*/function () {
|
|
43
44
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
44
|
-
var
|
|
45
|
-
_yield$request$getReq2,
|
|
46
|
-
data,
|
|
47
|
-
_args2 = arguments;
|
|
45
|
+
var _yield$request$getReq2, data;
|
|
48
46
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
49
47
|
while (1) switch (_context2.prev = _context2.next) {
|
|
50
48
|
case 0:
|
|
51
|
-
|
|
52
|
-
_context2.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
case 4:
|
|
49
|
+
_context2.prev = 0;
|
|
50
|
+
_context2.next = 3;
|
|
51
|
+
return request.getRequest().get('/h5/wallet/wallet-pass/balance', {});
|
|
52
|
+
case 3:
|
|
56
53
|
_yield$request$getReq2 = _context2.sent;
|
|
57
54
|
data = _yield$request$getReq2.data;
|
|
58
55
|
return _context2.abrupt("return", data || null);
|
|
59
|
-
case 9:
|
|
60
|
-
_context2.prev = 9;
|
|
61
|
-
_context2.t0 = _context2["catch"](1);
|
|
62
|
-
return _context2.abrupt("return", null);
|
|
63
|
-
case 12:
|
|
64
|
-
case "end":
|
|
65
|
-
return _context2.stop();
|
|
66
|
-
}
|
|
67
|
-
}, _callee2, null, [[1, 9]]);
|
|
68
|
-
}));
|
|
69
|
-
return function getWalletPassBalance() {
|
|
70
|
-
return _ref2.apply(this, arguments);
|
|
71
|
-
};
|
|
72
|
-
}();
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* 获取钱包余额
|
|
76
|
-
* @returns
|
|
77
|
-
*/
|
|
78
|
-
export var getWalletBalance = /*#__PURE__*/function () {
|
|
79
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
80
|
-
var _yield$request$getReq3, data;
|
|
81
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
82
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
83
|
-
case 0:
|
|
84
|
-
_context3.prev = 0;
|
|
85
|
-
_context3.next = 3;
|
|
86
|
-
return request.getRequest().get('/h5/wallet/wallet-pass/balance', {});
|
|
87
|
-
case 3:
|
|
88
|
-
_yield$request$getReq3 = _context3.sent;
|
|
89
|
-
data = _yield$request$getReq3.data;
|
|
90
|
-
return _context3.abrupt("return", data || null);
|
|
91
56
|
case 8:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
return
|
|
57
|
+
_context2.prev = 8;
|
|
58
|
+
_context2.t0 = _context2["catch"](0);
|
|
59
|
+
return _context2.abrupt("return", null);
|
|
95
60
|
case 11:
|
|
96
61
|
case "end":
|
|
97
|
-
return
|
|
62
|
+
return _context2.stop();
|
|
98
63
|
}
|
|
99
|
-
},
|
|
64
|
+
}, _callee2, null, [[0, 8]]);
|
|
100
65
|
}));
|
|
101
66
|
return function getWalletBalance() {
|
|
102
|
-
return
|
|
67
|
+
return _ref2.apply(this, arguments);
|
|
103
68
|
};
|
|
104
69
|
}();
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
.wallet-discountCard-title {
|
|
2
2
|
color: var(--Gray-900, #101828);
|
|
3
|
-
|
|
4
|
-
/* Text xl/Semibold */
|
|
5
3
|
font-family: Inter;
|
|
6
4
|
font-size: 20px;
|
|
7
5
|
font-style: normal;
|
|
8
6
|
font-weight: 600;
|
|
9
|
-
line-height: 30px;
|
|
10
|
-
margin: 20px
|
|
7
|
+
line-height: 30px;
|
|
8
|
+
margin-top: 20px;
|
|
9
|
+
margin-bottom: 24px;
|
|
11
10
|
}
|
|
@@ -170,7 +170,7 @@ var RechargeableCard = (0, import_model.Provider)((props) => {
|
|
|
170
170
|
modalWrapStyle: {
|
|
171
171
|
overflowY: "auto",
|
|
172
172
|
top: 68,
|
|
173
|
-
height: "calc(
|
|
173
|
+
height: "calc(100% - 68px)",
|
|
174
174
|
zIndex: 998
|
|
175
175
|
},
|
|
176
176
|
pcDetailModalDisplay: platform === "h5" ? true : false,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
.wallet-pointCard-title {
|
|
2
2
|
color: var(--Gray-900, #101828);
|
|
3
|
-
|
|
4
|
-
/* Text xl/Semibold */
|
|
5
3
|
font-family: Inter;
|
|
6
4
|
font-size: 20px;
|
|
7
5
|
font-style: normal;
|
|
8
6
|
font-weight: 600;
|
|
9
|
-
line-height: 30px;
|
|
10
|
-
margin: 20px
|
|
7
|
+
line-height: 30px;
|
|
8
|
+
margin-top: 20px;
|
|
9
|
+
margin-bottom: 24px;
|
|
11
10
|
}
|