Commit 8ca9a996 authored by wykolor's avatar wykolor

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

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