Commit 06c62d01 authored by wykolor's avatar wykolor

feat: 优化-拆分部分组件

parent 2052cad8
......@@ -27,8 +27,8 @@ export const getBonusAccount = (studentId: string) => {
};
// 提现记录列表
export const getWithdrawList = (params: WithdrawListParams) => {
return get<Paging<WithdrawListResponse>>(`/api-jksxb-app/v1/withdraw/query`, params);
export const getWithdrawList = async (params: Partial<WithdrawListParams>) => {
return await get<Paging<WithdrawListResponse>>(`/api-jksxb-app/v1/withdraw/query`, params);
};
// 检验图形验证码
......
......@@ -101,7 +101,7 @@ function usePaging<T = object, P = any>(
const { total, isLoad, error } = paging;
if (!isLoad || error) return "";
if (total < 1) return "暂无相关数据";
if (total > 10) {
if (total > 1) {
return "没有更多了";
}
return "";
......
<template>
<div class="bonus-detail">
<van-tabs
color="#027AFF"
title-active-color="#027AFF"
title-inactive-color="#4C4E4F"
line-width="150"
:sticky="true"
v-model:active="active"
@change="changeTabs"
>
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-list
v-model:loading="loading"
:finished="finished"
finished-text="~暂无更多数据~"
@load="onLoad"
:immediate-check="false"
>
<van-tab name="REDUCE" title="支出" class="bonus-detail-pay-list">
<template v-if="reduceList.length">
<div v-for="item in reduceList" :key="item.id" class="bonus-detail-pay-item">
<ul>
<li style="color: #000">{{ item.bizTypeName }}</li>
<li class="flex gray">
<span>{{ item.creationTime }}</span>
<label
>{{ item.bizType === BizType.WITHDRAW ? "流水号:" : "订单号:"
}}{{ item.relationNo }}</label
>
</li>
</ul>
<ul class="bonus-detail-pay-item-desc">
<li
v-if="item.bizType === BizType.WITHDRAW"
class="bonus-detail-pay-item-desc-money flex"
>
<span>申请时间:{{ item.withdrawApplyTime }}</span>
<label v-if="!item.withdrawPayTime">-¥{{ item.amountChange }}</label>
</li>
<li
v-if="item.bizType === BizType.WITHDRAW && item.withdrawPayTime"
class="bonus-detail-pay-item-desc-money flex"
>
<span>到账时间: {{ item.withdrawPayTime }}</span>
<label>-¥{{ item.amountChange }}</label>
</li>
<li v-if="item.bizType === BizType.ORDER">
<div v-for="(className, index) in item.className" :key="className + index">
{{ className }}
</div>
</li>
<li
v-if="item.bizType === BizType.ORDER"
class="bonus-detail-pay-item-desc-money flex"
>
<span>{{ item.schoolAreaName }}</span
><label v-if="item.bizType === BizType.ORDER">-¥{{ item.amountChange }}</label>
</li>
</ul>
</div>
</template>
<van-empty v-else />
</van-tab>
<van-tab name="ADD" title="收入" class="bonus-detail-income-list">
<template v-if="addList.length">
<div class="bonus-detail-income-item" v-for="item in addList" :key="item.id">
<ul>
<li class="flex ">
<span>{{ item.bizTypeName }}</span>
<label class="gray" v-if="item.bizType === BizType.ORDER_RETURN"
>订单号:{{ item.relationNo }}</label
>
</li>
<li class="flex bonus-detail-pay-item-desc-money">
<span class="gray">{{ item.creationTime }}</span>
<label>+¥{{ item.amountChange }}</label>
</li>
</ul>
</div>
</template>
<van-empty v-else />
</van-tab>
</van-list>
</van-pull-refresh>
</van-tabs>
</div>
</template>
<script lang="ts">
import { BonusListResponse } from "@/model/bonus";
import { FlowType, BizType } from "@/model/bonus/constant";
import { NavBar, Tab, Tabs, Cell, Empty, List, PullRefresh } from "vant";
import { computed, defineComponent, onMounted, reactive, toRefs } from "vue";
import { getBonusList } from "@/server/api/bonus";
import { useStore } from "vuex";
import { sendNativeMessage } from "@/util/use-native-bridge";
import { useRoute } from "vue-router";
interface BonusList {
addList: BonusListResponse[];
reduceList: BonusListResponse[];
}
const BonusDetail = defineComponent({
setup() {
const store = useStore();
const route = useRoute();
const bonusStoreState = computed(() => store.state.bonus);
const pageAdd = reactive({
pageSize: 10,
pageNum: 1,
finished: false
});
const pageReduce = reactive({
pageSize: 10,
pageNum: 1,
finished: false
});
const state = reactive({
active: route.query.active || "REDUCE",
loading: false,
finished: false,
refreshing: false,
BizType
});
const bonusList = reactive<BonusList>({
addList: [],
reduceList: []
});
const onLoad = async () => {
state.loading = true;
if (state.refreshing) {
if (state.active === FlowType.ADD) {
pageAdd.pageNum = 1;
bonusList.addList = [];
} else {
pageReduce.pageNum = 1;
bonusList.reduceList = [];
}
state.refreshing = false;
}
const params = {
studentId: route.query.studentId || bonusStoreState.value.studentId,
flowType: state.active === FlowType.ADD ? "ADD" : "REDUCE",
pageSize: state.active === FlowType.ADD ? pageAdd.pageSize : pageReduce.pageSize,
pageNum: state.active === FlowType.ADD ? pageAdd.pageNum : pageReduce.pageNum
};
try {
const { total, list } = await getBonusList(params);
if (!list || total === 0) {
state.finished = true;
return;
}
state.loading = false;
if (state.active === FlowType.REDUCE) {
bonusList.reduceList = bonusList.reduceList.concat(list);
pageReduce.finished = bonusList.reduceList.length === total;
state.finished = pageReduce.finished;
pageReduce.pageNum++;
} else {
bonusList.addList = bonusList.addList.concat(list);
pageAdd.finished = bonusList.addList.length === total;
state.finished = pageAdd.finished;
pageAdd.pageNum++;
}
} catch {
state.finished = true;
}
};
const onRefresh = () => {
// 清空列表数据
state.finished = false;
// 重新加载数据
state.loading = true;
onLoad();
};
const changeTabs = name => {
state.finished = name === FlowType.ADD ? pageAdd.finished : pageReduce.finished;
if (name === FlowType.ADD && pageAdd.pageNum === 1) {
state.loading = true;
onLoad();
} else if (name === FlowType.REDUCE && pageReduce.pageNum === 1) {
state.loading = true;
onLoad();
}
};
onMounted(() => {
sendNativeMessage({
type: "title",
data: "奖励金明细"
});
onLoad();
});
return {
...toRefs(state),
...toRefs(bonusList),
onLoad,
onRefresh,
changeTabs
};
},
components: {
[NavBar.name]: NavBar,
[Tab.name]: Tab,
[Tabs.name]: Tabs,
[Cell.name]: Cell,
[Empty.name]: Empty,
[List.name]: List,
[PullRefresh.name]: PullRefresh
}
});
export default BonusDetail;
</script>
<style lang="scss" scoped>
.bonus-detail {
.bonus-detail-pay-list,
.bonus-detail-income-list {
padding: 30px;
.bonus-detail-pay-item,
.bonus-detail-income-item {
background: #fff;
margin-bottom: 26px;
padding: 20px;
border-radius: 10px;
box-shadow: 0px 10px 20px 0px rgba(221, 221, 221, 0.3);
ul {
li {
line-height: 47px;
}
}
.flex {
display: flex;
justify-content: space-between;
}
.gray {
color: #bdc4d1;
font-size: 24px;
}
.bonus-detail-pay-item-desc {
background: #f5faff;
padding: 20px;
color: #606263;
}
.bonus-detail-pay-item-desc-money {
label {
color: #f1551e;
font-size: 28px;
font-weight: 600;
}
}
}
}
}
</style>
.bonus {
padding: 30px;
:deep(.van-button) {
&.withdraw-detail-btn {
height: 48px;
line-height: 48px;
background-color: inherit;
padding: 0 24px;
color: rgba(255, 255, 255, 0.8);
border: 2px solid rgba(255, 255, 255, 0.5);
}
}
&-account {
padding: 30px;
color: #fff;
background: url("~@/assets/images/bonus/account-bg.png") no-repeat;
background-size: 100% 100%;
margin-bottom: 16px;
&-money {
margin: 28px 0 70px;
.money-desc {
font-size: 72px;
font-weight: 600;
.frozen {
background: url("~@/assets/images/bonus/frozen.png") no-repeat;
background-size: 100% 100%;
font-size: 26px;
display: inline-block;
width: 117px;
height: 88px;
line-height: 76px;
text-align: center;
position: absolute;
top: -40px;
right: -100px;
}
}
}
&-status {
text-align: center;
.van-col {
display: flex;
flex-direction: column;
justify-content: center;
label {
opacity: 0.5;
}
span {
font-size: 32px;
}
}
}
}
.bind-wechat {
margin-bottom: 16px;
border-radius: 9px;
justify-content: space-between;
:deep(.van-cell__title),
:deep(.van-cell__value) {
flex: initial;
}
.van-button {
height: 56px;
width: 160px;
}
}
.withdrawable-money {
border-radius: 9px;
justify-content: space-between;
:deep(.van-cell__title),
:deep(.van-cell__value) {
flex: initial;
}
.van-button {
height: 56px;
width: 120px;
}
}
.bonus-record {
margin-top: 40px;
color: #484c4f;
.van-row {
padding: 0 20px;
margin-bottom: 24px;
.tip {
position: relative;
font-weight: 550;
font-size: 30px;
&::after {
content: "";
display: block;
height: 32px;
width: 7px;
background: #027aff;
position: absolute;
border-radius: 2px;
left: 6px;
top: 3px;
}
}
.tip-money {
font-size: 28px;
}
}
}
:deep(.bonus-rule-dialog),
:deep(.bind-wechat-dialog) {
overflow: initial;
.close {
width: 44px;
height: 44px;
display: inline-block;
background: url("~@/assets/images/bonus/close.png") no-repeat;
background-size: 100% 100%;
position: absolute;
right: 2px;
top: -78px;
}
.van-dialog__header {
background: linear-gradient(213deg, #05b2ff 0%, #027aff 100%);
padding: 23px 0;
color: #fff;
font-weight: bold;
font-size: 36px;
border-top-left-radius: 16px;
border-top-right-radius: 16px;
}
}
:deep(.bonus-rule-dialog) {
&.van-dialog {
top: 50%;
width: 622px;
}
.bonus-rule-list {
padding: 42px 51px 0 51px;
color: #565858;
li {
line-height: 48px;
margin: 10px 0;
font-size: 26px;
}
}
}
.dialog-handle-btns {
display: flex;
margin-top: 48px;
padding: 30px;
margin-bottom: 30px;
justify-content: space-between;
.van-button {
flex: 0.47;
font-size: 28px;
}
}
.dangerous-dialog-tip {
padding: 0 48px;
text-align: center;
line-height: 44px;
}
}
\ No newline at end of file
This diff is collapsed.
.bonus-withdraw {
padding: 146px 32px 0;
background: #fff;
min-height: 100vh;
&-info {
text-align: center;
}
&-input {
display: flex;
align-items: center;
justify-content: center;
height: 84px;
line-height: 84px;
position: relative;
&::after {
width: 430px;
height: 2px;
background: #f1f4f9;
content: "";
display: block;
position: absolute;
bottom: 0;
}
.label-money-symbol {
width: 62px;
font-size: 60px;
font-weight: 600;
display: inline-block;
margin-right: 30px;
color: #191919;
}
&-field {
width: 328px;
display: flex;
justify-content: center;
display: inline-block;
padding: 0;
position: relative;
right: 40px;
:deep(.van-field__body) {
font-size: 60px;
font-weight: 600;
color: #191919;
}
::-webkit-input-placeholder {
/* Chrome/Opera/Safari */
font-size: 30px;
color: #9fa1a3;
// opacity: 0.5;
}
::-moz-placeholder {
/* Firefox 19+ */
font-size: 30px;
color: #9fa1a3;
}
:-ms-input-placeholder {
/* IE 10+ */
font-size: 30px;
color: #9fa1a3;
}
:-moz-placeholder {
/* Firefox 18- */
font-size: 30px;
color: #9fa1a3;
}
}
&-valid {
font-size: 24px;
height: 33px;
line-height: 33px;
color: #484c4f;
margin-top: 19px;
margin-bottom: 56px;
}
&-tip {
display: inline-block;
align-items: center;
background: #f7f7f7;
font-size: 22px;
border-radius: 18px;
vertical-align: middle;
height: 36px;
margin-bottom: 80px;
vertical-align: middle;
color: #9fa1a3;
vertical-align: middle;
line-height: 36px;
text-align: left;
padding: 0 8px;
align-items: center;
i {
margin-right: 8px;
}
}
.all {
width: 107px;
height: 56px;
line-height: 56px;
position: absolute;
right: 0;
}
}
.van-cell.van-cell-tip {
padding-left: 2px;
padding-right: 2px;
border-top: 1px solid #ececec;
border-bottom: 1px solid #ececec;
justify-content: space-between;
:deep(.van-cell__title),
:deep(.van-cell__value) {
flex: initial;
}
.slot-value {
display: flex;
align-items: center;
.wechat {
width: 52px;
height: 52px;
margin-right: 3px;
}
}
}
.handle-btn {
padding: 0 72px;
margin-top: 107px;
.withdraw-title {
font-size: 36px;
line-height: 50px;
}
.withdraw-tips {
opacity: 0.5;
line-height: 32px;
}
.van-button {
height: 100px;
border-radius: 51px;
}
}
:deep .withdraw-dialog,
:deep .withdraw-success-dialog {
overflow: initial;
.close {
width: 44px;
height: 44px;
display: inline-block;
background: url("~@/assets/images/bonus/close.png") no-repeat;
background-size: 100% 100%;
position: absolute;
right: 2px;
top: -78px;
}
}
:deep .withdraw-dialog {
padding: 48px;
color: #fff;
width: 622px;
&-header {
background: url("~@/assets/images/bonus/withdraw-bg.png") no-repeat;
background-size: 100%;
padding: 32px 30px;
&-money {
font-size: 60px;
font-weight: 600;
margin: 40px 0 47px;
}
}
&-field {
margin-top: 80px;
&-input {
display: flex;
align-items: center;
.van-cell {
flex: 1;
padding: 0;
.van-field__control {
padding: 22px 0 22px 45px;
border: 2px solid #dcdee0;
border-right: none;
border-radius: 8px 0px 0px 8px;
height: 80px;
width: 306px;
}
}
.van-button {
width: 220px;
height: 80px;
background: #027aff;
border-radius: 0px 8px 8px 0px;
font-size: 26px;
box-sizing: border-box;
}
}
&-tip {
text-align: center;
color: #484c4f;
font-size: 24px;
margin-top: 24px;
}
}
.handle-btns {
margin-top: 64px;
.van-button {
height: 100px;
}
}
}
:deep .withdraw-success-dialog {
padding: 60px 51px 35px;
background: url("~@/assets/images/bonus/withdraw-success.png") no-repeat;
background-size: 100% 100%;
height: 785px;
box-sizing: border-box;
font-size: 26px;
&-text {
line-height: 50px;
text-align: center;
li {
&:nth-of-type(1) {
font-size: 55px;
background: linear-gradient(360deg, #ef1237 0%, #fd7940 100%);
-webkit-background-clip: text;
color: transparent;
font-style: italic;
position: relative;
font-weight: bold;
margin-bottom: 24px;
line-height: 63px;
height: 63px;
&::after,
&::before {
content: "";
display: inline-block;
width: 63px;
height: 5px;
background: linear-gradient(270deg, #fdbd99 0%, rgba(255, 255, 255, 0) 100%);
position: absolute;
top: 50%;
}
&::before {
left: 0;
}
&::after {
background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, #fdbd99 100%);
right: 0;
}
}
&:nth-of-type(2) {
font-size: 32px;
font-weight: 500;
margin-bottom: 16px;
}
&:nth-of-type(3) {
font-size: 64px;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #1a1a1a;
line-height: 63px;
background: linear-gradient(360deg, #ef1237 0%, #fd7940 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 39px;
}
&:nth-of-type(4),
&:nth-of-type(5) {
margin-bottom: 11px;
}
&:nth-of-type(4),
&:nth-of-type(6) {
font-size: 28px;
}
&:nth-of-type(6) {
margin-bottom: 7px;
}
&:nth-of-type(5),
&:nth-of-type(7) {
opacity: 0.8;
}
}
}
&-btns {
text-align: center;
.van-button {
margin-top: 100px;
padding: 0 100px;
height: 100px;
line-height: 100px;
width: 380px;
color: #f03d04;
border: none;
background: linear-gradient(to bottom, #ffeb8c, #fe9f56);
}
}
}
}
\ No newline at end of file
......@@ -321,304 +321,5 @@ export default Withdraw;
</script>
<style lang="scss" scoped>
.bonus-withdraw {
padding: 146px 32px 0;
background: #fff;
min-height: 100vh;
.bonus-withdraw-info {
text-align: center;
.bonus-withdraw-input {
display: flex;
align-items: center;
justify-content: center;
height: 84px;
line-height: 84px;
position: relative;
&::after {
width: 430px;
height: 2px;
background: #f1f4f9;
content: "";
display: block;
position: absolute;
bottom: 0;
}
.label-money-symbol {
width: 62px;
font-size: 60px;
font-weight: 600;
display: inline-block;
margin-right: 30px;
color: #191919;
}
.bonus-withdraw-input-field {
width: 328px;
display: flex;
justify-content: center;
display: inline-block;
padding: 0;
position: relative;
right: 40px;
:deep(.van-field__body) {
font-size: 60px;
font-weight: 600;
color: #191919;
}
::-webkit-input-placeholder {
/* Chrome/Opera/Safari */
font-size: 30px;
color: #9fa1a3;
// opacity: 0.5;
}
::-moz-placeholder {
/* Firefox 19+ */
font-size: 30px;
color: #9fa1a3;
}
:-ms-input-placeholder {
/* IE 10+ */
font-size: 30px;
color: #9fa1a3;
}
:-moz-placeholder {
/* Firefox 18- */
font-size: 30px;
color: #9fa1a3;
}
}
.all {
width: 107px;
height: 56px;
line-height: 56px;
position: absolute;
right: 0;
}
}
.bonus-withdraw-input-valid {
font-size: 24px;
height: 33px;
line-height: 33px;
color: #484c4f;
margin-top: 19px;
margin-bottom: 56px;
}
.bonus-withdraw-input-tip {
display: inline-block;
align-items: center;
background: #f7f7f7;
font-size: 22px;
border-radius: 18px;
vertical-align: middle;
height: 36px;
margin-bottom: 80px;
vertical-align: middle;
color: #9fa1a3;
vertical-align: middle;
line-height: 36px;
text-align: left;
padding: 0 8px;
align-items: center;
i {
margin-right: 8px;
}
}
}
.van-cell.van-cell-tip {
padding-left: 2px;
padding-right: 2px;
border-top: 1px solid #ececec;
border-bottom: 1px solid #ececec;
justify-content: space-between;
:deep(.van-cell__title),
:deep(.van-cell__value) {
flex: initial;
}
.slot-value {
display: flex;
align-items: center;
.wechat {
width: 52px;
height: 52px;
margin-right: 3px;
}
}
}
.handle-btn {
padding: 0 72px;
margin-top: 107px;
.withdraw-title {
font-size: 36px;
line-height: 50px;
}
.withdraw-tips {
opacity: 0.5;
line-height: 32px;
}
.van-button {
height: 100px;
border-radius: 51px;
}
}
:deep .withdraw-dialog,
:deep .withdraw-success-dialog {
overflow: initial;
.close {
width: 44px;
height: 44px;
display: inline-block;
background: url("~@/assets/images/bonus/close.png") no-repeat;
background-size: 100% 100%;
position: absolute;
right: 2px;
top: -78px;
}
}
:deep .withdraw-dialog {
padding: 48px;
color: #fff;
width: 622px;
.withdraw-dialog-header {
background: url("~@/assets/images/bonus/withdraw-bg.png") no-repeat;
background-size: 100%;
padding: 32px 30px;
.withdraw-dialog-header-money {
font-size: 60px;
font-weight: 600;
margin: 40px 0 47px;
}
}
.withdraw-dialog-field {
margin-top: 80px;
.withdraw-dialog-field-input {
display: flex;
align-items: center;
.van-cell {
flex: 1;
padding: 0;
.van-field__control {
padding: 22px 0 22px 45px;
border: 2px solid #dcdee0;
border-right: none;
border-radius: 8px 0px 0px 8px;
height: 80px;
width: 306px;
}
}
.van-button {
width: 220px;
height: 80px;
background: #027aff;
border-radius: 0px 8px 8px 0px;
font-size: 26px;
box-sizing: border-box;
}
}
.withdraw-dialog-field-tip {
text-align: center;
color: #484c4f;
font-size: 24px;
margin-top: 24px;
}
}
.handle-btns {
margin-top: 64px;
.van-button {
height: 100px;
}
}
}
:deep .withdraw-success-dialog {
padding: 60px 51px 35px;
background: url("~@/assets/images/bonus/withdraw-success.png") no-repeat;
background-size: 100% 100%;
height: 785px;
box-sizing: border-box;
font-size: 26px;
.withdraw-success-dialog-text {
line-height: 50px;
text-align: center;
li {
&:nth-of-type(1) {
font-size: 55px;
background: linear-gradient(360deg, #ef1237 0%, #fd7940 100%);
-webkit-background-clip: text;
color: transparent;
font-style: italic;
position: relative;
font-weight: bold;
margin-bottom: 24px;
line-height: 63px;
height: 63px;
&::after,
&::before {
content: "";
display: inline-block;
width: 63px;
height: 5px;
background: linear-gradient(270deg, #fdbd99 0%, rgba(255, 255, 255, 0) 100%);
position: absolute;
top: 50%;
}
&::before {
left: 0;
}
&::after {
background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, #fdbd99 100%);
right: 0;
}
}
&:nth-of-type(2) {
font-size: 32px;
font-weight: 500;
margin-bottom: 16px;
}
&:nth-of-type(3) {
font-size: 64px;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #1a1a1a;
line-height: 63px;
background: linear-gradient(360deg, #ef1237 0%, #fd7940 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 39px;
}
&:nth-of-type(4),
&:nth-of-type(5) {
margin-bottom: 11px;
}
&:nth-of-type(4),
&:nth-of-type(6) {
font-size: 28px;
}
&:nth-of-type(6) {
margin-bottom: 7px;
}
&:nth-of-type(5),
&:nth-of-type(7) {
opacity: 0.8;
}
}
}
.withdraw-success-dialog-btns {
text-align: center;
.van-button {
margin-top: 100px;
padding: 0 100px;
height: 100px;
line-height: 100px;
width: 380px;
color: #f03d04;
border: none;
background: linear-gradient(to bottom, #ffeb8c, #fe9f56);
}
}
}
}
@import "./index.scss";
</style>
<template>
<van-list
:modelValue="paging.loading"
:finished="isFinished"
:finished-text="finishText"
@load="loadMore"
>
<template v-if="paging.list.length">
<div class="withdraw-list" v-for="item in paging.list" :key="item.id">
<div class="withdraw-list-header">
<div class="withdraw-list-header-status">
<i
class="iconfont"
:class="
item.status === WithdrawStatus.WITHDRAWING
? 'icon-shijian'
: item.status === WithdrawStatus.RECEIVED
? 'icon-jindutiaoqiandai'
: 'icon-xiazaishibai'
"
:style="{
color:
item.status === WithdrawStatus.WITHDRAWING
? '#46BB36'
: item.status === WithdrawStatus.RECEIVED
? '#027AFF'
: '#F1551E'
}"
></i>
<span>{{
item.status === WithdrawStatus.WITHDRAWING
? "提现中"
: item.status === WithdrawStatus.RECEIVED
? "提现成功"
: "提现失败"
}}</span>
<label v-if="item.status === WithdrawStatus.WITHDRAWING">请耐心等候~</label>
</div>
<p class="apply-money">
{{ item.status === WithdrawStatus.RECEIVED ? "-" : "" }}¥{{
item.withdrawAmount.toFixed(2)
}}
</p>
</div>
<ul class="withdraw-list-detail">
<li>微信提现:{{ item.accountName }}</li>
<li>申请时间:{{ item.withdrawApplyTime }}</li>
<li v-if="item.status === WithdrawStatus.WITHDRAWING">
预计时间:{{ item.expectedPayTime }}
</li>
<li v-if="item.status === WithdrawStatus.RECEIVED">
到账时间:{{ item.withdrawPayTime }}
</li>
<li v-if="item.status === WithdrawStatus.FAILED">失败时间:{{ item.failTime }}</li>
<li v-if="item.status === WithdrawStatus.FAILED">失败原因:{{ item.reason }}</li>
</ul>
</div>
</template>
<van-empty key="2" image="search" v-if="paging.error" :description="paging.error" />
<van-empty v-else-if="paging.isLoad && paging.total < 1" />
</van-list>
</template>
<script lang="ts">
import { defineComponent, computed, onMounted } from "vue";
import { List, PullRefresh, Empty, Loading } from "vant";
import { usePaging } from "@/util/use-paging";
import { getWithdrawList } from "@/server/api/bonus";
import { useStore } from "vuex";
import { WithdrawStatus } from "@/model/bonus/constant";
export default defineComponent({
components: {
[List.name]: List,
[PullRefresh.name]: PullRefresh,
[Empty.name]: Empty,
[Loading.name]: Loading
},
setup() {
const store = useStore();
const bonusStoreState = computed(() => store.state.bonus);
const [paging, loadMore, refresh, helpers] = usePaging(getWithdrawList, () => ({
studentId: bonusStoreState.value.studentId
}));
onMounted(refresh);
return { ...helpers, paging, loadMore, refresh, WithdrawStatus };
}
});
</script>
<style lang="scss" scoped>
.withdraw-list {
background: #fff;
margin-bottom: 16px;
padding: 20px 19px;
border-radius: 10px;
box-shadow: 0px 10px 20px 0px rgba(221, 221, 221, 0.3);
&-header {
display: flex;
justify-content: space-between;
align-items: center;
&-status {
display: flex;
align-items: center;
i {
font-size: 54px;
margin-right: 20px;
}
span {
margin-right: 30px;
font-weight: 600;
}
label {
color: #a6a8aa;
font-size: 28px;
}
}
.apply-money {
color: #f1551e;
font-weight: 550;
}
}
&-detail {
background: #f5faff;
opacity: 0.9;
padding: 20px;
border-radius: 10px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #484c4f;
li {
line-height: 1.6em;
}
}
}
</style>
<template>
<van-dialog
v-model:show="showDialog"
title="提现规则说明"
:show-cancel-button="false"
:show-confirm-button="false"
class="bonus-rule-dialog"
>
<i class="close" @click="$emit('update:show', false)"></i>
<ul class="bonus-rule-list">
<li>1.当前只有转介绍收入可以在线提现;</li>
<li>2.提现前,确保已经绑定了微信,且微信已经实名认证;</li>
<li>3.每个学生,单日累计提现金额不超过500.00元;</li>
<li>4.每个家长,单日累计提现金额不超过1000.00元;</li>
<li>5.系统一般都是“秒到账”,具体到账时间, 请以系统提示为准;</li>
<li>6.如需帮助请联系:400—8777389!</li>
</ul>
<div class="dialog-handle-btns">
<van-button type="default" round @click="phoneCall">电话咨询</van-button
><van-button type="primary" round @click="$emit('update:show', false)">我知道了</van-button>
</div>
</van-dialog>
</template>
<script lang="ts">
import { defineComponent, ref, watchEffect } from "vue";
import { Dialog, Button } from "vant";
import { makeCall } from "@/util/use-native-bridge";
export default defineComponent({
components: {
[Dialog.Component.name]: Dialog.Component,
[Button.name]: Button
},
props: {
show: Boolean
},
setup(props) {
const showDialog = ref(false);
watchEffect(() => {
showDialog.value = props.show;
});
const phoneCall = () => {
makeCall("400—8777389");
};
return { showDialog, phoneCall };
}
});
</script>
<style lang="scss" scoped>
.bonus-rule-dialog {
&.van-dialog {
top: 50%;
width: 622px;
}
.bonus-rule-list {
padding: 42px 51px 0 51px;
color: #565858;
li {
line-height: 48px;
margin: 10px 0;
font-size: 26px;
}
}
}
.dialog-handle-btns {
display: flex;
margin-top: 48px;
padding: 30px;
margin-bottom: 30px;
justify-content: space-between;
.van-button {
flex: 0.47;
font-size: 28px;
}
}
.dangerous-dialog-tip {
padding: 0 48px;
text-align: center;
line-height: 44px;
}
</style>
<template>
<van-dialog v-model:show="showDialog" :show-cancel-button="false" :show-confirm-button="false">
<p class="dangerous-dialog-tip">
{{ formatBonusTipTxt(errCode) }}
</p>
<div class="dialog-handle-btns">
<van-button type="default" round @click="$emit('update:show', false)">确定</van-button
><van-button type="primary" round @click="phoneCall">电话咨询</van-button>
</div>
</van-dialog>
</template>
<script lang="ts">
import { defineComponent, ref, watchEffect } from "vue";
import { Dialog, Button } from "vant";
import { makeCall } from "@/util/use-native-bridge";
import { formatBonusTipTxt } from "@/util/formatBonusTipTxt";
export default defineComponent({
components: {
[Dialog.Component.name]: Dialog.Component,
[Button.name]: Button
},
props: {
show: Boolean,
errCode: String
},
setup(props) {
const showDialog = ref(false);
watchEffect(() => {
showDialog.value = props.show;
});
const phoneCall = () => {
makeCall("400—8777389");
};
return { showDialog, phoneCall, formatBonusTipTxt };
}
});
</script>
<style lang="scss" scoped>
.dialog-handle-btns {
display: flex;
margin-top: 48px;
padding: 30px;
margin-bottom: 30px;
justify-content: space-between;
.van-button {
flex: 0.47;
font-size: 28px;
}
}
.dangerous-dialog-tip {
padding: 0 48px;
text-align: center;
line-height: 44px;
}
</style>
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