细节优化

This commit is contained in:
2025-10-02 21:35:00 +08:00
parent 8f676b1c38
commit 33f436ea77
8 changed files with 38 additions and 18 deletions

View File

@@ -14,6 +14,7 @@
font-size: 16px;
margin: 40px 0;
text-align: center;
.button_text {
color: #007aff;
}
@@ -21,6 +22,7 @@
.form_container {
padding: 20px;
.form_item {
height: 50px;
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
@@ -50,6 +52,7 @@
justify-content: space-between;
align-items: center;
position: relative;
&::before,
&::after {
content: "";
@@ -78,7 +81,7 @@
border-radius: 20px;
padding: 4px 8px;
& + .option_button {
&+.option_button {
margin-left: 12px;
}
@@ -106,9 +109,11 @@
display: flex;
flex-direction: column;
align-items: center;
.button_text {
color: #007aff;
}
.download_button {
width: 345px;
height: 54px;
@@ -129,9 +134,14 @@
font-style: normal;
font-weight: 600;
line-height: normal;
&.disabled {
color: rgba(255, 255, 255, 0.30);
}
}
}
}
// 过滤弹窗
.filter_popup {
padding: 20px;
@@ -140,6 +150,7 @@
.form_section {
.form_item {
margin-bottom: 20px;
.form_label {
display: inline-block;
font-family: PingFang SC;
@@ -153,11 +164,13 @@
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 8px;
.option_item {
background-color: #0000000D;
text-align: center;
padding: 8px;
border-radius: 4px;
&.active {
background-color: #000000;
color: #fff;

View File

@@ -174,9 +174,10 @@ const DownloadBill: React.FC = () => {
setShowFilterPopup(false);
};
const handleDownloadBill = async () => {
const { start, end } = dateRange;
if (!start || !end) return;
try {
const { transaction_sub_type } = load_transactions_params;
const { start, end } = dateRange;
const date_range = [start, end];
const res = await httpService.post("/wallet/download_bill", { transaction_sub_type, date_range });
const { fileUrl, fileName } = res.data;
@@ -297,7 +298,7 @@ const DownloadBill: React.FC = () => {
>
</Text>
<Button className="download_button" onClick={handleDownloadBill}>
<Button className={`download_button ${!dateRange.start ? 'disabled' : ''}`} onClick={handleDownloadBill}>
</Button>
</View>

View File

@@ -44,9 +44,6 @@ const QueryTransactions = () => {
const [totalpages, setTotalpages] = useState(1);
useEffect(() => {
getSearchHistory();
// return () => {
// handleClear();
// };
}, []);
useEffect(() => {
@@ -69,6 +66,7 @@ const QueryTransactions = () => {
if (isInitialMount.current) {
isInitialMount.current = false;
} else {
if (load_transactions_params.keyword === "") return;
handleSearch();
}
}, [load_transactions_params]);
@@ -102,6 +100,7 @@ const QueryTransactions = () => {
* @description 点击清空输入内容
*/
const handleClear = () => {
setKeyword("");
setTransactions([]);
set_load_transactions_params((prev) => {
return { ...prev, page: 1, keyword: "" };
@@ -113,6 +112,7 @@ const QueryTransactions = () => {
* @param value
*/
const handleHistoryClick = (item: { id: number; keyword: string }) => {
setKeyword(item?.keyword);
set_load_transactions_params((prev) => {
return { ...prev, page: 1, keyword: item?.keyword };
});
@@ -126,6 +126,11 @@ const QueryTransactions = () => {
setSearchHistory([]);
};
useEffect(() => {
if (load_transactions_params.keyword === "") return;
getSearchHistory();
}, [load_transactions_params.keyword])
/**
* @description 点击搜索
*/
@@ -135,9 +140,6 @@ const QueryTransactions = () => {
const response = await httpService.post("/wallet/transactions", {
...load_transactions_params
});
if (load_transactions_params.keyword !== "") {
getSearchHistory();
}
if (response && response.data && response.data.list.length) {
setTransactions([...transactions, ...response.data.list]);
setTotalpages(response.data.totalPages);

View File

@@ -45,5 +45,9 @@
border-radius: 16px;
font-size: 16px;
font-weight: 600;
&.disabled {
color: rgba(255, 255, 255, 0.30);
}
}
}

View File

@@ -86,7 +86,7 @@ const ValidPhone: React.FC = () => {
<Input placeholder="请输入验证码" type="number" onInput={(e) => { handleInput(e, "sms_code") }}></Input>
<Button className="btn" onClick={getSMSCode}></Button>
</View>
<Button className="btn bottom-btn" disabled={!formData.sms_code} onClick={handleConfirm} style={{ bottom: isKeyboardVisible ? `${keyboardHeight + 20}px` : undefined }}></Button>
<Button className={`btn bottom-btn ${formData.sms_code === "" ? 'disabled' : ''}`} onClick={handleConfirm} style={{ bottom: isKeyboardVisible ? `${keyboardHeight + 20}px` : undefined }}></Button>
</View>
);
};

View File

@@ -161,6 +161,7 @@ const WalletPage: React.FC = () => {
set_load_transactions_params((prev) => {
return {
...prev,
page: 1,
type,
transaction_sub_type,
};
@@ -628,6 +629,7 @@ const WalletPage: React.FC = () => {
const [year, month] = e;
set_load_transactions_params({
...load_transactions_params,
page: 1,
date: `${year}-${String(month).padStart(2, "0")}`,
});
}}

View File

@@ -27,6 +27,7 @@
color: #000;
display: flex;
align-items: flex-end;
overflow: hidden;
gap: 8px;
border-bottom: 0.5px solid var(--Fills-Tertiary, #7878801F);
margin: 12px 0;
@@ -38,17 +39,14 @@
Input {
font-size: 32px;
overflow: unset;
text-overflow: unset;
height: 32px;
line-height: 32px;
height: 36px;
min-height: 0;
margin: 0;
padding: 0;
border: none;
background: none;
color: inherit;
outline: none;
box-sizing: border-box;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;

View File

@@ -245,7 +245,7 @@ const Withdrawal: React.FC = () => {
<Text className="title-text"></Text>
<View className="input-container">
<Text className="symbol">¥</Text>
<Input type="digit" placeholder="0.00" cursorColor="#000" value={inputValue} onInput={handleInput} />
<Input type="digit" placeholder="0.00" cursorColor="#000" adjustPosition={false} value={inputValue} onInput={handleInput} />
{
!showTips && (Number(inputValue) !== 0) && (
<Button className="btn" onClick={handleWithdraw}></Button>
@@ -255,7 +255,7 @@ const Withdrawal: React.FC = () => {
<View className="btn-container">
<View>
<Text>{`我的余额:¥${walletInfo.balance}`}</Text>
<Text>¥5000.00</Text>
{/* <Text>可提现余额¥5000.00</Text> */}
</View>
<Text className="btn" onClick={withdrawAll}></Text>
</View>
@@ -297,7 +297,7 @@ const Withdrawal: React.FC = () => {
hideFooter={true}
style={{ bottom: isKeyboardVisible ? `${keyboardHeight}px` : undefined }}
>
<View className="popup_content" onTouchStart={handlePopupClick} onTouchMove={handlePopupClick} onTouchEnd={handlePopupClick}>
<View className="popup_content" onTouchForceChange={handlePopupClick} onTouchStart={handlePopupClick} onTouchMove={handlePopupClick} onTouchEnd={handlePopupClick}>
<View className="popup_text">{`¥${inputValue}`}</View>
<View className="password_container">
{