Commit 6b860c2a authored by wykolor's avatar wykolor

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

parent 80c7dc77
......@@ -119,8 +119,7 @@
color="linear-gradient(to bottom, #FFEB8C, #FE9F56)"
block
size="large"
to="/"
replace
@click="goBack"
>确定</van-button
>
</div>
......@@ -136,9 +135,11 @@ import { Button, Cell, Dialog, Field, Toast } from "vant";
import { useRoute } from "vue-router";
import { useStore } from "vuex";
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 { WithdrawResponse } from "@/model/bonus";
import router from "@/router";
interface TencentCaptchaResponse {
ret: number;
ticket: string;
......@@ -181,6 +182,7 @@ const Withdraw = defineComponent({
state.withdrawableTotal = Number(withdrawableTotal);
state.withdrawAccount = withdrawAccount as string;
const formatter = value => {
if (value <= 0) return "";
if (value > state.withdrawableTotal) {
return state.withdrawableTotal.toFixed(2);
}
......@@ -239,8 +241,6 @@ const Withdraw = defineComponent({
} catch (err) {
Toast(err);
}
// state.showWithdrawSuccess = true;
};
// 获取风控值
......@@ -250,6 +250,11 @@ const Withdraw = defineComponent({
} = await getWithdrawRisk(bonusStoreState.value.studentId);
state.studentDailyWithdrawLimit = studentDailyWithdrawLimit;
};
const goBack = () => {
router.back();
};
onMounted(() => {
const message = {
type: "title",
......@@ -263,7 +268,8 @@ const Withdraw = defineComponent({
formatter,
getSmsVerifyCode,
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