Commit 8ca9a996 authored by wykolor's avatar wykolor

feat: 提现规则金额改为接口获取

parent 519d18d6
<template>
<div class="tab-add">
<pull-refresh-list v-slot="{ list }" :request="getBonusList" :paramsFn="paramsFn">
<pull-refresh-list v-slot="{ list }" :request="getBonusList" :params-fn="paramsFn">
<div v-for="item in list" :key="item.id" class="add-item">
<div class="flex">
<span>{{ item.bizTypeName }}</span>
......
<template>
<div class="tab-reduce">
<pull-refresh-list v-slot="{ list }" :request="getBonusList" :paramsFn="paramsFn">
<pull-refresh-list v-slot="{ list }" :request="getBonusList" :params-fn="paramsFn">
<div v-for="item in list" :key="item.id" class="reduce-item">
<ul>
<li style="color: #000">{{ item.bizTypeName }}</li>
......
<template>
<van-pull-refresh :modelValue="paging.refreshing" @refresh="refresh">
<van-list
:modelValue="paging.loading"
:finished="isFinished"
:finished-text="finishText"
@load="loadMore"
>
<van-list :finished="isFinished" :finished-text="finishText" @load="loadMore">
<slot :list="paging.list"></slot>
<van-empty key="2" image="search" v-if="paging.error" :description="paging.error" />
<van-empty v-else-if="paging.isLoad && paging.total < 1" />
......
......@@ -85,11 +85,11 @@
<!-- 绑定微信弹窗 -->
<BindWXDialog
v-model:show="showBindWx"
:withdrawAccount="bonusAccount?.withdrawAccount"
@updateBonusAccount="getBonusAccountReq"
:withdraw-account="bonusAccount?.withdrawAccount"
@update-bonus-account="getBonusAccountReq"
/>
<!-- 奖励金账户状态弹窗 -->
<WithdrawableDialog v-model:show="showDangerous" :errCode="bonusAccount?.errCode" />
<WithdrawableDialog v-model:show="showDangerous" :err-code="bonusAccount?.errCode" />
</div>
</template>
......@@ -104,10 +104,10 @@ import { BonusAccountResponse } from "@/model/bonus";
import { BonusAccountStatus, ErrCode } from "@/model/bonus/constant";
import { bindWeChat, useNativeBridge } from "@/util/use-native-bridge";
import { bindWeiChat, getBonusAccount } from "@/server/api/bonus";
import WithdrawList from "./withdrawList.vue";
import WithdrawRulesDialog from "./withdrawRulesDialog.vue";
import WithdrawableDialog from "./withdrawableDialog.vue";
import BindWXDialog from "./bindWXDialog.vue";
import WithdrawList from "./withdraw-list.vue";
import WithdrawRulesDialog from "./withdraw-rules-dialog.vue";
import WithdrawableDialog from "./withdrawable-dialog.vue";
import BindWXDialog from "./bind-w-x-dialog.vue";
interface BonusState {
bonusAccount: BonusAccountResponse | null;
......
<template>
<pull-refresh-list v-slot="{ list }" :request="getWithdrawList" :paramsFn="paramsFn">
<pull-refresh-list v-slot="{ list }" :request="getWithdrawList" :params-fn="paramsFn">
<div class="withdraw-list" v-for="item in list" :key="item.id">
<div class="header">
<div class="header-status">
......
......@@ -10,8 +10,8 @@
<ul class="bonus-rule-list">
<li>1.当前只有转介绍收入可以在线提现;</li>
<li>2.提现前,确保已经绑定了微信,且微信已经实名认证;</li>
<li>3.每个学生,单日累计提现金额不超过500.00元;</li>
<li>4.每个家长,单日累计提现金额不超过1000.00元;</li>
<li>3.每个学生,单日累计提现金额不超过{{ studentDailyWithdrawLimit }}元;</li>
<li>4.每个家长,单日累计提现金额不超过{{ userDailyWithdrawLimit }}元;</li>
<li>5.系统一般都是“秒到账”,具体到账时间, 请以系统提示为准;</li>
<li>6.如需帮助请联系:400—8777389!</li>
</ul>
......@@ -22,11 +22,13 @@
</van-dialog>
</template>
<script lang="ts">
import { defineComponent, ref, watchEffect } from "vue";
import { defineComponent, ref, watchEffect, reactive, toRefs, computed, onMounted } from "vue";
import { useStore } from "vuex";
import { Dialog, Button } from "vant";
import { makeCall } from "@/util/use-native-bridge";
import { getWithdrawRisk } from "@/server/api/bonus";
export default defineComponent({
components: {
......@@ -37,14 +39,34 @@ export default defineComponent({
show: Boolean
},
setup(props) {
const store = useStore();
const bonusStoreState = computed(() => store.state.bonus);
const state = reactive({
studentDailyWithdrawLimit: 0,
userDailyWithdrawLimit: 0
});
const showDialog = ref(false);
watchEffect(() => {
showDialog.value = props.show;
});
const phoneCall = () => {
makeCall("400—8777389");
};
return { showDialog, phoneCall };
const getWithdrawRiskReq = async () => {
const { studentDailyWithdrawLimit, userDailyWithdrawLimit } = await getWithdrawRisk(
bonusStoreState.value.studentId
);
state.studentDailyWithdrawLimit = studentDailyWithdrawLimit;
state.userDailyWithdrawLimit = userDailyWithdrawLimit;
};
onMounted(getWithdrawRiskReq);
return { showDialog, phoneCall, ...toRefs(state) };
}
});
</script>
......
......@@ -45,14 +45,14 @@
<!-- 提现弹窗 -->
<WithdrawDialog
v-model:show="showWithdraw"
:withdrawAmount="Number(withdrawAmount)"
:withdrawAccount="withdrawAccount"
@withdrawSuccess="withdrawSuccess"
:withdraw-amount="Number(withdrawAmount)"
:withdraw-account="withdrawAccount"
@withdraw-success="withdrawSuccess"
/>
<!-- 提现成功弹窗 -->
<WithdrawSuccessDialog
v-model:show="showWithdrawSuccess"
:withdrawResponse="withdrawResponse"
:withdraw-response="withdrawResponse"
/>
</div>
</template>
......@@ -67,8 +67,8 @@ import { Button, Cell, Dialog, Field, Toast } from "vant";
import { sendNativeMessage } from "@/util/use-native-bridge";
import { getWithdrawRisk } from "@/server/api/bonus";
import { WithdrawResponse } from "@/model/bonus";
import WithdrawSuccessDialog from "./withdrawSuccessDialog.vue";
import WithdrawDialog from "./withdrawDialog.vue";
import WithdrawSuccessDialog from "./withdraw-success-dialog.vue";
import WithdrawDialog from "./withdraw-dialog.vue";
interface State {
WithdrawResponse?: WithdrawResponse | object;
......
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