细节优化
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
margin: 40px 0;
|
margin: 40px 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
.button_text {
|
.button_text {
|
||||||
color: #007aff;
|
color: #007aff;
|
||||||
}
|
}
|
||||||
@@ -21,6 +22,7 @@
|
|||||||
|
|
||||||
.form_container {
|
.form_container {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
|
||||||
.form_item {
|
.form_item {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
||||||
@@ -50,6 +52,7 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&::before,
|
&::before,
|
||||||
&::after {
|
&::after {
|
||||||
content: "";
|
content: "";
|
||||||
@@ -78,7 +81,7 @@
|
|||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
|
|
||||||
& + .option_button {
|
&+.option_button {
|
||||||
margin-left: 12px;
|
margin-left: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,9 +109,11 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.button_text {
|
.button_text {
|
||||||
color: #007aff;
|
color: #007aff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.download_button {
|
.download_button {
|
||||||
width: 345px;
|
width: 345px;
|
||||||
height: 54px;
|
height: 54px;
|
||||||
@@ -129,9 +134,14 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|
||||||
|
&.disabled {
|
||||||
|
color: rgba(255, 255, 255, 0.30);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 过滤弹窗
|
// 过滤弹窗
|
||||||
.filter_popup {
|
.filter_popup {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
@@ -140,6 +150,7 @@
|
|||||||
.form_section {
|
.form_section {
|
||||||
.form_item {
|
.form_item {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
|
||||||
.form_label {
|
.form_label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-family: PingFang SC;
|
font-family: PingFang SC;
|
||||||
@@ -153,11 +164,13 @@
|
|||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, 1fr);
|
grid-template-columns: repeat(3, 1fr);
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
|
||||||
.option_item {
|
.option_item {
|
||||||
background-color: #0000000D;
|
background-color: #0000000D;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
background-color: #000000;
|
background-color: #000000;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|||||||
@@ -174,9 +174,10 @@ const DownloadBill: React.FC = () => {
|
|||||||
setShowFilterPopup(false);
|
setShowFilterPopup(false);
|
||||||
};
|
};
|
||||||
const handleDownloadBill = async () => {
|
const handleDownloadBill = async () => {
|
||||||
|
const { start, end } = dateRange;
|
||||||
|
if (!start || !end) return;
|
||||||
try {
|
try {
|
||||||
const { transaction_sub_type } = load_transactions_params;
|
const { transaction_sub_type } = load_transactions_params;
|
||||||
const { start, end } = dateRange;
|
|
||||||
const date_range = [start, end];
|
const date_range = [start, end];
|
||||||
const res = await httpService.post("/wallet/download_bill", { transaction_sub_type, date_range });
|
const res = await httpService.post("/wallet/download_bill", { transaction_sub_type, date_range });
|
||||||
const { fileUrl, fileName } = res.data;
|
const { fileUrl, fileName } = res.data;
|
||||||
@@ -297,7 +298,7 @@ const DownloadBill: React.FC = () => {
|
|||||||
>
|
>
|
||||||
下载记录
|
下载记录
|
||||||
</Text>
|
</Text>
|
||||||
<Button className="download_button" onClick={handleDownloadBill}>
|
<Button className={`download_button ${!dateRange.start ? 'disabled' : ''}`} onClick={handleDownloadBill}>
|
||||||
下载
|
下载
|
||||||
</Button>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -44,9 +44,6 @@ const QueryTransactions = () => {
|
|||||||
const [totalpages, setTotalpages] = useState(1);
|
const [totalpages, setTotalpages] = useState(1);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getSearchHistory();
|
getSearchHistory();
|
||||||
// return () => {
|
|
||||||
// handleClear();
|
|
||||||
// };
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -69,6 +66,7 @@ const QueryTransactions = () => {
|
|||||||
if (isInitialMount.current) {
|
if (isInitialMount.current) {
|
||||||
isInitialMount.current = false;
|
isInitialMount.current = false;
|
||||||
} else {
|
} else {
|
||||||
|
if (load_transactions_params.keyword === "") return;
|
||||||
handleSearch();
|
handleSearch();
|
||||||
}
|
}
|
||||||
}, [load_transactions_params]);
|
}, [load_transactions_params]);
|
||||||
@@ -102,6 +100,7 @@ const QueryTransactions = () => {
|
|||||||
* @description 点击清空输入内容
|
* @description 点击清空输入内容
|
||||||
*/
|
*/
|
||||||
const handleClear = () => {
|
const handleClear = () => {
|
||||||
|
setKeyword("");
|
||||||
setTransactions([]);
|
setTransactions([]);
|
||||||
set_load_transactions_params((prev) => {
|
set_load_transactions_params((prev) => {
|
||||||
return { ...prev, page: 1, keyword: "" };
|
return { ...prev, page: 1, keyword: "" };
|
||||||
@@ -113,6 +112,7 @@ const QueryTransactions = () => {
|
|||||||
* @param value
|
* @param value
|
||||||
*/
|
*/
|
||||||
const handleHistoryClick = (item: { id: number; keyword: string }) => {
|
const handleHistoryClick = (item: { id: number; keyword: string }) => {
|
||||||
|
setKeyword(item?.keyword);
|
||||||
set_load_transactions_params((prev) => {
|
set_load_transactions_params((prev) => {
|
||||||
return { ...prev, page: 1, keyword: item?.keyword };
|
return { ...prev, page: 1, keyword: item?.keyword };
|
||||||
});
|
});
|
||||||
@@ -126,6 +126,11 @@ const QueryTransactions = () => {
|
|||||||
setSearchHistory([]);
|
setSearchHistory([]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (load_transactions_params.keyword === "") return;
|
||||||
|
getSearchHistory();
|
||||||
|
}, [load_transactions_params.keyword])
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 点击搜索
|
* @description 点击搜索
|
||||||
*/
|
*/
|
||||||
@@ -135,9 +140,6 @@ const QueryTransactions = () => {
|
|||||||
const response = await httpService.post("/wallet/transactions", {
|
const response = await httpService.post("/wallet/transactions", {
|
||||||
...load_transactions_params
|
...load_transactions_params
|
||||||
});
|
});
|
||||||
if (load_transactions_params.keyword !== "") {
|
|
||||||
getSearchHistory();
|
|
||||||
}
|
|
||||||
if (response && response.data && response.data.list.length) {
|
if (response && response.data && response.data.list.length) {
|
||||||
setTransactions([...transactions, ...response.data.list]);
|
setTransactions([...transactions, ...response.data.list]);
|
||||||
setTotalpages(response.data.totalPages);
|
setTotalpages(response.data.totalPages);
|
||||||
|
|||||||
@@ -45,5 +45,9 @@
|
|||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
|
||||||
|
&.disabled {
|
||||||
|
color: rgba(255, 255, 255, 0.30);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -86,7 +86,7 @@ const ValidPhone: React.FC = () => {
|
|||||||
<Input placeholder="请输入验证码" type="number" onInput={(e) => { handleInput(e, "sms_code") }}></Input>
|
<Input placeholder="请输入验证码" type="number" onInput={(e) => { handleInput(e, "sms_code") }}></Input>
|
||||||
<Button className="btn" onClick={getSMSCode}>获取验证码</Button>
|
<Button className="btn" onClick={getSMSCode}>获取验证码</Button>
|
||||||
</View>
|
</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>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -161,6 +161,7 @@ const WalletPage: React.FC = () => {
|
|||||||
set_load_transactions_params((prev) => {
|
set_load_transactions_params((prev) => {
|
||||||
return {
|
return {
|
||||||
...prev,
|
...prev,
|
||||||
|
page: 1,
|
||||||
type,
|
type,
|
||||||
transaction_sub_type,
|
transaction_sub_type,
|
||||||
};
|
};
|
||||||
@@ -628,6 +629,7 @@ const WalletPage: React.FC = () => {
|
|||||||
const [year, month] = e;
|
const [year, month] = e;
|
||||||
set_load_transactions_params({
|
set_load_transactions_params({
|
||||||
...load_transactions_params,
|
...load_transactions_params,
|
||||||
|
page: 1,
|
||||||
date: `${year}-${String(month).padStart(2, "0")}`,
|
date: `${year}-${String(month).padStart(2, "0")}`,
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
color: #000;
|
color: #000;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
|
overflow: hidden;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
border-bottom: 0.5px solid var(--Fills-Tertiary, #7878801F);
|
border-bottom: 0.5px solid var(--Fills-Tertiary, #7878801F);
|
||||||
margin: 12px 0;
|
margin: 12px 0;
|
||||||
@@ -38,17 +39,14 @@
|
|||||||
|
|
||||||
Input {
|
Input {
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
overflow: unset;
|
height: 36px;
|
||||||
text-overflow: unset;
|
min-height: 0;
|
||||||
height: 32px;
|
|
||||||
line-height: 32px;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: none;
|
border: none;
|
||||||
background: none;
|
background: none;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
outline: none;
|
outline: none;
|
||||||
box-sizing: border-box;
|
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
-moz-appearance: none;
|
-moz-appearance: none;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ const Withdrawal: React.FC = () => {
|
|||||||
<Text className="title-text">提现金额</Text>
|
<Text className="title-text">提现金额</Text>
|
||||||
<View className="input-container">
|
<View className="input-container">
|
||||||
<Text className="symbol">¥</Text>
|
<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) && (
|
!showTips && (Number(inputValue) !== 0) && (
|
||||||
<Button className="btn" onClick={handleWithdraw}>提现</Button>
|
<Button className="btn" onClick={handleWithdraw}>提现</Button>
|
||||||
@@ -255,7 +255,7 @@ const Withdrawal: React.FC = () => {
|
|||||||
<View className="btn-container">
|
<View className="btn-container">
|
||||||
<View>
|
<View>
|
||||||
<Text>{`我的余额:¥${walletInfo.balance}`}</Text>
|
<Text>{`我的余额:¥${walletInfo.balance}`}</Text>
|
||||||
<Text>(可提现余额:¥5000.00)</Text>
|
{/* <Text>(可提现余额:¥5000.00)</Text> */}
|
||||||
</View>
|
</View>
|
||||||
<Text className="btn" onClick={withdrawAll}>全部提现</Text>
|
<Text className="btn" onClick={withdrawAll}>全部提现</Text>
|
||||||
</View>
|
</View>
|
||||||
@@ -297,7 +297,7 @@ const Withdrawal: React.FC = () => {
|
|||||||
hideFooter={true}
|
hideFooter={true}
|
||||||
style={{ bottom: isKeyboardVisible ? `${keyboardHeight}px` : undefined }}
|
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="popup_text">{`¥${inputValue}`}</View>
|
||||||
<View className="password_container">
|
<View className="password_container">
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user