设置交易密码页面样式优化
This commit is contained in:
@@ -49,7 +49,7 @@ const Withdrawal: React.FC = () => {
|
||||
}, [initializeKeyboardListener, addListener]);
|
||||
const [showTips, setShowTips] = useState(false);
|
||||
const [tipsText, setTipsText] = useState<string>("");
|
||||
const [inputValue, setInputValue] = useState<string>("0.00");
|
||||
const [inputValue, setInputValue] = useState<string>("");
|
||||
const [walletInfo, setWalletInfo] = useState<WalletInfo>({
|
||||
balance: "0.00",
|
||||
});
|
||||
@@ -65,8 +65,8 @@ const Withdrawal: React.FC = () => {
|
||||
|
||||
const [inputValueObj, setInputValueObj] = useState({
|
||||
integer: "0",
|
||||
decimal: "00"
|
||||
})
|
||||
decimal: "00",
|
||||
});
|
||||
|
||||
useDidShow(() => {
|
||||
load_wallet_data();
|
||||
@@ -87,11 +87,11 @@ const Withdrawal: React.FC = () => {
|
||||
}, [show_withdraw_popup]);
|
||||
|
||||
useEffect(() => {
|
||||
const value = Number(inputValue).toFixed(2).split(".")
|
||||
const integer = value[0]
|
||||
const decimal = value[1]
|
||||
setInputValueObj({ integer, decimal })
|
||||
}, [inputValue])
|
||||
const value = Number(inputValue).toFixed(2).split(".");
|
||||
const integer = value[0];
|
||||
const decimal = value[1];
|
||||
setInputValueObj({ integer, decimal });
|
||||
}, [inputValue]);
|
||||
|
||||
const validateWithdrawAmount = (amount: string) => {
|
||||
if (Number(amount) > Number(walletInfo.balance)) {
|
||||
@@ -307,15 +307,15 @@ const Withdrawal: React.FC = () => {
|
||||
showBack={true}
|
||||
showAvatar={false}
|
||||
onBack={() => {
|
||||
const pages = Taro.getCurrentPages()
|
||||
const prevPage = pages[pages.length - 2]
|
||||
const pages = Taro.getCurrentPages();
|
||||
const prevPage = pages[pages.length - 2];
|
||||
prevPage.setData({
|
||||
updateList: withdrawSuccess
|
||||
})
|
||||
updateList: withdrawSuccess,
|
||||
});
|
||||
Taro.navigateBack();
|
||||
}}
|
||||
/>
|
||||
<View
|
||||
<View
|
||||
className="withdrawal-container"
|
||||
style={{ marginTop: `${totalHeight}px` }}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user