设置交易密码页面样式优化
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
|
padding: 0 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-navigator {
|
.detail-navigator {
|
||||||
@@ -48,18 +49,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.form-item {
|
.form-item {
|
||||||
padding: 20px;
|
padding: 16px 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 20px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-bottom: 1px solid #0000000d;
|
border-bottom: 1px solid #0000000d;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
||||||
.form-label {
|
.form-label {
|
||||||
width: 56px;
|
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
Input {
|
||||||
|
flex: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
|
padding: 0 20px;
|
||||||
.custom-navbar {
|
.custom-navbar {
|
||||||
height: 56px;
|
height: 56px;
|
||||||
/* 通常与原生导航栏高度一致 */
|
/* 通常与原生导航栏高度一致 */
|
||||||
@@ -48,18 +49,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.form-item {
|
.form-item {
|
||||||
padding: 20px;
|
padding: 16px 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 20px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-bottom: 1px solid #0000000d;
|
border-bottom: 1px solid #0000000d;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
||||||
.form-label {
|
.form-label {
|
||||||
width: 56px;
|
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
Input {
|
||||||
|
flex: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ const Withdrawal: React.FC = () => {
|
|||||||
}, [initializeKeyboardListener, addListener]);
|
}, [initializeKeyboardListener, addListener]);
|
||||||
const [showTips, setShowTips] = useState(false);
|
const [showTips, setShowTips] = useState(false);
|
||||||
const [tipsText, setTipsText] = useState<string>("");
|
const [tipsText, setTipsText] = useState<string>("");
|
||||||
const [inputValue, setInputValue] = useState<string>("0.00");
|
const [inputValue, setInputValue] = useState<string>("");
|
||||||
const [walletInfo, setWalletInfo] = useState<WalletInfo>({
|
const [walletInfo, setWalletInfo] = useState<WalletInfo>({
|
||||||
balance: "0.00",
|
balance: "0.00",
|
||||||
});
|
});
|
||||||
@@ -65,8 +65,8 @@ const Withdrawal: React.FC = () => {
|
|||||||
|
|
||||||
const [inputValueObj, setInputValueObj] = useState({
|
const [inputValueObj, setInputValueObj] = useState({
|
||||||
integer: "0",
|
integer: "0",
|
||||||
decimal: "00"
|
decimal: "00",
|
||||||
})
|
});
|
||||||
|
|
||||||
useDidShow(() => {
|
useDidShow(() => {
|
||||||
load_wallet_data();
|
load_wallet_data();
|
||||||
@@ -87,11 +87,11 @@ const Withdrawal: React.FC = () => {
|
|||||||
}, [show_withdraw_popup]);
|
}, [show_withdraw_popup]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const value = Number(inputValue).toFixed(2).split(".")
|
const value = Number(inputValue).toFixed(2).split(".");
|
||||||
const integer = value[0]
|
const integer = value[0];
|
||||||
const decimal = value[1]
|
const decimal = value[1];
|
||||||
setInputValueObj({ integer, decimal })
|
setInputValueObj({ integer, decimal });
|
||||||
}, [inputValue])
|
}, [inputValue]);
|
||||||
|
|
||||||
const validateWithdrawAmount = (amount: string) => {
|
const validateWithdrawAmount = (amount: string) => {
|
||||||
if (Number(amount) > Number(walletInfo.balance)) {
|
if (Number(amount) > Number(walletInfo.balance)) {
|
||||||
@@ -307,11 +307,11 @@ const Withdrawal: React.FC = () => {
|
|||||||
showBack={true}
|
showBack={true}
|
||||||
showAvatar={false}
|
showAvatar={false}
|
||||||
onBack={() => {
|
onBack={() => {
|
||||||
const pages = Taro.getCurrentPages()
|
const pages = Taro.getCurrentPages();
|
||||||
const prevPage = pages[pages.length - 2]
|
const prevPage = pages[pages.length - 2];
|
||||||
prevPage.setData({
|
prevPage.setData({
|
||||||
updateList: withdrawSuccess
|
updateList: withdrawSuccess,
|
||||||
})
|
});
|
||||||
Taro.navigateBack();
|
Taro.navigateBack();
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user