Commit 6b860c2a authored by wykolor's avatar wykolor

feat: 提现成功返回奖励金界面

parent 80c7dc77
...@@ -119,8 +119,7 @@ ...@@ -119,8 +119,7 @@
color="linear-gradient(to bottom, #FFEB8C, #FE9F56)" color="linear-gradient(to bottom, #FFEB8C, #FE9F56)"
block block
size="large" size="large"
to="/" @click="goBack"
replace
>确定</van-button >确定</van-button
> >
</div> </div>
...@@ -136,9 +135,11 @@ import { Button, Cell, Dialog, Field, Toast } from "vant"; ...@@ -136,9 +135,11 @@ import { Button, Cell, Dialog, Field, Toast } from "vant";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { useStore } from "vuex"; import { useStore } from "vuex";
import { useNativeBridge } from "@/util/use-native-bridge"; import { useNativeBridge } from "@/util/use-native-bridge";
import { countDown } from "../../../util/timer"; import { countDown } from "@/util/timer";
// import { debounce } from "@/util/debounce";
import { checkCaptcha, withdraw, getWithdrawRisk } from "@/server/api/bonus"; import { checkCaptcha, withdraw, getWithdrawRisk } from "@/server/api/bonus";
import { WithdrawResponse } from "@/model/bonus"; import { WithdrawResponse } from "@/model/bonus";
import router from "@/router";
interface TencentCaptchaResponse { interface TencentCaptchaResponse {
ret: number; ret: number;
ticket: string; ticket: string;
...@@ -181,6 +182,7 @@ const Withdraw = defineComponent({ ...@@ -181,6 +182,7 @@ const Withdraw = defineComponent({
state.withdrawableTotal = Number(withdrawableTotal); state.withdrawableTotal = Number(withdrawableTotal);
state.withdrawAccount = withdrawAccount as string; state.withdrawAccount = withdrawAccount as string;
const formatter = value => { const formatter = value => {
if (value <= 0) return "";
if (value > state.withdrawableTotal) { if (value > state.withdrawableTotal) {
return state.withdrawableTotal.toFixed(2); return state.withdrawableTotal.toFixed(2);
} }
...@@ -239,8 +241,6 @@ const Withdraw = defineComponent({ ...@@ -239,8 +241,6 @@ const Withdraw = defineComponent({
} catch (err) { } catch (err) {
Toast(err); Toast(err);
} }
// state.showWithdrawSuccess = true;
}; };
// 获取风控值 // 获取风控值
...@@ -250,6 +250,11 @@ const Withdraw = defineComponent({ ...@@ -250,6 +250,11 @@ const Withdraw = defineComponent({
} = await getWithdrawRisk(bonusStoreState.value.studentId); } = await getWithdrawRisk(bonusStoreState.value.studentId);
state.studentDailyWithdrawLimit = studentDailyWithdrawLimit; state.studentDailyWithdrawLimit = studentDailyWithdrawLimit;
}; };
const goBack = () => {
router.back();
};
onMounted(() => { onMounted(() => {
const message = { const message = {
type: "title", type: "title",
...@@ -263,7 +268,8 @@ const Withdraw = defineComponent({ ...@@ -263,7 +268,8 @@ const Withdraw = defineComponent({
formatter, formatter,
getSmsVerifyCode, getSmsVerifyCode,
withdrawSubmit, withdrawSubmit,
withdrawReal withdrawReal,
goBack
}; };
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment