提现页面加入7日前数据展示;给“保守的妻子”开始大额提现通道

This commit is contained in:
yezian 2024-05-10 17:27:05 +08:00
parent f44c660215
commit c968e5747f
1 changed files with 33 additions and 9 deletions

View File

@ -85,6 +85,9 @@ export default function WithDrawal() {
verificationStatus: verificationStatus:
verificationData.data?.realname_authentication_api_vo?.status, verificationData.data?.realname_authentication_api_vo?.status,
withdrawal_diamond: withdrawalData.data.withdraw_diamonds, withdrawal_diamond: withdrawalData.data.withdraw_diamonds,
day7_total_diamonds: withdrawalData.data.day7_total_diamonds,
day7_total_withdraw_diamonds:
withdrawalData.data.day7_total_withdraw_diamonds,
}); });
} catch (error) { } catch (error) {
console.error(error); console.error(error);
@ -114,17 +117,33 @@ export default function WithDrawal() {
// //
const handleChangeWithdrawalNum = (e) => { const handleChangeWithdrawalNum = (e) => {
const mid = getCookie("mid");
let newValue = parseInt(e.target.value, 10); let newValue = parseInt(e.target.value, 10);
// //
if ( if (
newValue >= 0 && newValue >= 0 &&
newValue <= Math.min(data?.withdrawal_diamond, 20000) newValue <=
Math.min(
data?.withdrawal_diamond,
parseInt(mid, 10) === 74 ? 200000 : 20000
)
) { ) {
setWithdrawalNum(newValue); setWithdrawalNum(newValue);
} else if (isNaN(newValue)) { } else if (isNaN(newValue)) {
setWithdrawalNum(0); setWithdrawalNum(0);
} else if (newValue > Math.min(data?.withdrawal_diamond, 20000)) { } else if (
setWithdrawalNum(Math.min(data?.withdrawal_diamond, 20000)); newValue >
Math.min(
data?.withdrawal_diamond,
parseInt(mid, 10) === 74 ? 200000 : 20000
)
) {
setWithdrawalNum(
Math.min(
data?.withdrawal_diamond,
parseInt(mid, 10) === 74 ? 200000 : 20000
)
);
} }
}; };
@ -173,12 +192,6 @@ export default function WithDrawal() {
// //
const handleSubmit = async () => { const handleSubmit = async () => {
//
// Toast.show({
// content: "220",
// });
// return;
if (!withdrawalNum || withdrawalNum < 1000) { if (!withdrawalNum || withdrawalNum < 1000) {
Toast.show({ Toast.show({
content: "提现最低金额为100元即1000钻石", content: "提现最低金额为100元即1000钻石",
@ -271,6 +284,17 @@ export default function WithDrawal() {
兑换比例10钻石=1RMB 兑换比例10钻石=1RMB
</p> </p>
</div> </div>
<div className="flex flex-col mt-2 items-center justify-around w-full h-12 rounded-2xl bg-gradient-to-r from-[#FF668B] to-[#FF66F0]">
<p className="text-sm text-white font-medium">7日前(0~24)数据</p>
<div className="flex flex-row justify-around w-full">
<p className="text-xs text-white font-medium">
当日钻石收益{data?.day7_total_diamonds}
</p>
<p className="text-xs text-white font-medium">
今日此时已结算{data?.day7_total_withdraw_diamonds}
</p>
</div>
</div>
<p className="text-white text-base mt-2"> <p className="text-white text-base mt-2">
<span className="text-error">*</span>提现数量 <span className="text-error">*</span>提现数量
</p> </p>