Commit 6977ae15 authored by wykolor's avatar wykolor

feat: mock数据对接

parent 48e03072
...@@ -5,7 +5,7 @@ import store from "./store"; ...@@ -5,7 +5,7 @@ import store from "./store";
import './assets/style/normalize.css'; import './assets/style/normalize.css';
import 'vant/lib/index.css'; import 'vant/lib/index.css';
import 'amfe-flexible'; import 'amfe-flexible';
createApp(App) createApp(App)
.use(store) .use(store)
.use(router) .use(router)
.mount("#app"); .mount("#app");
\ No newline at end of file
/*
* @Author: wykolor
* @Date: 2021-03-23 10:36:45
* @Last Modified by: wykolor
* @Last Modified time: 2021-03-23 10:36:45
*/
// 流水类型
export enum FlowType {
ADD = 'ADD', // 收入
REDUCE = 'REDUCE' // 支出
}
// 业务类型
export enum BizType {
WITHDRAW = 'WITHDRAW', // 提现
ORDER = 'ORDER', // 订单支付
ORDER_RETURN = 'ORDER_RETURN', // 订单返还
INTRODUCE = 'INTRODUCE', // 转介绍
WITHDRAW_RETURN = 'WITHDRAW_RETURN', // 提现返还
}
// 奖励金账户状态
export enum BonusAccountStatus {
ACTIVE = 'ACTIVE', // 正常
FREEZE = 'FREEZE', // 冻结
}
\ No newline at end of file
/*
* @Author: wykolor
* @Date: 2021-03-23 11:44:35
* @Last Modified by: wykolor
* @Last Modified time: 2021-03-23 17:00:17
*/
export interface PageParams {
pageSize?: number
pageNum?: number
}
export interface baseResponse<T = object> {
code: number;
msg: string;
data: T
}
export interface Paging<T = object> {
total: number;
pageNum: number;
pageSize: number;
hasNextPage: boolean;
list: Array<T>
}
export interface BonusListResponse {
creationTime: string;
flowType: string;
amountChange: number;
bizType: string;
bizTypeName: string;
relationNo: string;
withdrawApplyTime: string;
withdrawPayTime: string;
className: string;
schoolAreaName: string;
}
export interface BonusListParams extends PageParams{
studentId: number;
flowType: string;
}
export interface BonusAccountResponse {
status: string;
balance: number;
sumAdd: number;
sumWithdraw: number;
withdrawing: number;
}
export interface WithdrawListParams extends PageParams {
studentId: number;
}
export interface WithdrawListResponse {
accountName: string ;
withdrawApplyTime: string;
withdrawAmount: number;
withdrawPayTime: string ;
status: string;
expectedPayTime: string ;
failTime: string;
reason: string;
}
export interface CheckCaptchaParams {
userId: string;
ticket: string;
randStr: string;
}
export interface WithdrawParams {
withdrawAmount: number;
userId: number;
studentId: number;
smsVerifyCode: string;
}
\ No newline at end of file
import { BonusAccountResponse, BonusListParams, BonusListResponse, CheckCaptchaParams, Paging, WithdrawListParams, WithdrawListResponse, WithdrawParams } from '@/model/bonus';
import { get, post } from '../../request';
const bonusUrl = '/v1/marketingAccount/';
const withdrawUrl = '/v1/withdraw/'
// 奖励金收支列表
export const getBonusList = (params: BonusListParams) => {
return post<Paging<BonusListResponse>>(`${bonusUrl}bonus/flow/list`, params )
}
// 奖励金账户信息
export const getBonusAccount = (studentId: string) => {
return get<BonusAccountResponse>(`${bonusUrl}bonus/count`, { studentId })
}
// 提现记录列表
export const getWithdrawList = (params: WithdrawListParams) => {
return post<Paging<WithdrawListResponse>>(`${withdrawUrl}query`, params)
}
// 检验图形验证码
export const checkCaptcha = (params: CheckCaptchaParams) => {
return get<string>(`${withdrawUrl}checkCaptcha`, params);
}
// 提现
export const withdraw = (params: WithdrawParams) => {
return post<string>('', params);
}
\ No newline at end of file
import * as bonusModel from "./bonus/index";
export {
bonusModel
}
\ No newline at end of file
import axios from "./http" import axios from "./http"
import { baseResponse } from '../model/bonus/index'
/** /**
* 封装的get请求 * 封装的get请求
* @param {*} url 请求路径 * @param {*} url 请求路径
* @param {*} params 请求参数 * @param {*} params 请求参数
* @returns * @returns
*/ */
export function get(url: string, params?: object) { export function get<T=any>(url: string, params?: object) {
return axios({ return axios.get<baseResponse<T>>(url, params)
method: "get",
url: url,
params: params
});
} }
/** /**
...@@ -20,11 +16,6 @@ import axios from "./http" ...@@ -20,11 +16,6 @@ import axios from "./http"
* @param {*} params 请求参数 * @param {*} params 请求参数
* @returns * @returns
*/ */
export function post(url: string, params?: object, headers?: object) { export function post<T=any>(url: string, params?: object) {
return axios({ return axios.post<baseResponse<T>>(url, params)
method: "post",
url: url,
data: params,
headers
});
} }
\ No newline at end of file
...@@ -7,163 +7,270 @@ ...@@ -7,163 +7,270 @@
line-width="150" line-width="150"
:sticky="true" :sticky="true"
v-model:active="active" v-model:active="active"
@change="changeTabs"
> >
<van-tab title="支出" class="bonus-detail-pay-list"> <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<template v-if="payList.length"> <van-list
<div v-for="item in payList" :key="item.id" class="bonus-detail-pay-item"> v-model:loading="loading"
<ul> v-model:error="error"
<li style="color: #000">{{ item.title }}</li> :finished="finished"
<li class="flex gray"> finished-text="没有更多了"
<span>{{ item.handleTime }}</span> @load="onLoad"
<label >
>{{ item.status === 0 ? "流水号:" : "订单号:" }}{{ item.handleNumber }}</label <van-tab name="REDUCE" title="支出" class="bonus-detail-pay-list">
> <template v-if="reduceList.length">
</li> <div v-for="item in reduceList" :key="item.bizTypeName" class="bonus-detail-pay-item">
</ul> <ul>
<ul class="bonus-detail-pay-item-desc"> <li style="color: #000">{{ item.bizTypeName }}</li>
<li v-if="item.status === 0">申请时间:{{ item.applyTime }}</li> <li class="flex gray">
<li v-if="item.status === 0" class="bonus-detail-pay-item-desc-money flex"> <span>{{ item.creationTime }}</span>
<span>到账时间: {{ item.arrivalTime }}</span> <label
<label>¥{{ item.money }}</label> >{{ item.bizType === BizType.WITHDRAW ? "流水号:" : "订单号:"
</li> }}{{ item.relationNo }}</label
<li v-if="item.status === 1">{{ item.className }}</li> >
<li v-if="item.status === 1" class="bonus-detail-pay-item-desc-money flex"> </li>
<span>{{ item.schoolName }}</span </ul>
><label>¥{{ item.money }}</label> <ul class="bonus-detail-pay-item-desc">
</li> <li v-if="item.bizType === BizType.WITHDRAW">
</ul> 申请时间:{{ item.withdrawApplyTime }}
</div> </li>
</template> <li
v-if="item.bizType === BizType.WITHDRAW"
<van-empty description="暂无数据~" v-else /> class="bonus-detail-pay-item-desc-money flex"
</van-tab> >
<van-tab title="收入" class="bonus-detail-income-list"> <span>到账时间: {{ item.withdrawPayTime }}</span>
<template v-if="incomeList.length"> <label>-¥{{ item.amountChange }}</label>
<div class="bonus-detail-income-item" v-for="item in incomeList" :key="item.id"> </li>
<ul> <li v-if="item.bizType === BizType.ORDER">{{ item.className }}</li>
<li>{{ item.title }}</li> <li
<li class="flex bonus-detail-pay-item-desc-money"> v-if="item.bizType === BizType.ORDER"
<span class="gray">{{ item.handleTime }}</span> class="bonus-detail-pay-item-desc-money flex"
<label>¥{{ item.money }}</label> >
</li> <span>{{ item.schoolAreaName }}</span
</ul> ><label v-if="item.bizType === BizType.ORDER">-¥{{ item.amountChange }}</label>
</div> </li>
</template> </ul>
<van-empty description="暂无数据~" v-else /> </div>
</van-tab> </template>
<!-- <van-empty description="暂无数据~" 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.bizTypeName">
<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.withdrawPayTime }}</span>
<label>+¥{{ item.amountChange }}</label>
</li>
</ul>
</div>
</template>
<!-- <van-empty description="暂无数据~" v-else /> -->
</van-tab>
</van-list>
</van-pull-refresh>
</van-tabs> </van-tabs>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { NavBar, Tab, Tabs, Cell, Empty } from "vant"; import { BonusListResponse, PageParams } from "@/model/bonus";
import { defineComponent } from "vue"; import { FlowType, BizType } from "@/model/bonus/constant";
import { NavBar, Tab, Tabs, Cell, Empty, List, PullRefresh } from "vant";
import { defineComponent, reactive, toRefs } from "vue";
// import { bonusModel } from "@/server/api";
const BonusDetail = defineComponent({ const BonusDetail = defineComponent({
data() { setup() {
return { const pageAdd = reactive<PageParams>({
active: 0, pageSize: 10,
incomeList: [ pageNum: 1
// { });
// title: "转介绍转入", const pageReduce = reactive<PageParams>({
// money: 3000.06, pageSize: 10,
// handleTime: "2020.10.12 12:10", pageNum: 1
// status: 0 });
// }, const state = reactive({
// { active: "REDUCE",
// title: "被介绍转入", loading: false,
// money: 3000.05, finished: false,
// handleTime: "2020.10.12 12:10", error: false,
// status: 1 refreshing: false,
// }, BizType
// { });
// title: "订单返回", const addList = reactive<BonusListResponse[]>([]);
// money: 3000.05, const reduceList = reactive<BonusListResponse[]>([]);
// handleTime: "2020.10.12 12:10", const onLoad = () => {
// status: 2 if (state.refreshing) {
// } state.refreshing = false;
], }
payList: [ // const params = {
{ // studentId: 123,
title: "微信提现至 - 渣画化", // flowType: state.active === FlowType.ADD ? "ADD" : "REDUCE",
applyTime: "2020.10.12 12:10", // pageSize: state.active === FlowType.ADD ? pageAdd.pageSize : pageReduce.pageSize,
arrivalTime: "2020.10.12 12:10", // pageNum: state.active === FlowType.ADD ? pageAdd.pageNum : pageReduce.pageNum
money: 3000.05, // };
handleTime: "2020.10.12 12:10", // console.log(params);
handleNumber: "AAAA8888",
status: 0 setTimeout(() => {
}, if (state.active === FlowType.REDUCE) {
{ reduceList.push(
title: "支付", ...[
applyTime: "2020.10.12 12:10", {
arrivalTime: "2020.10.12 12:10", withdrawApplyTime: "2020.10.12 12:10",
money: 3000, withdrawPayTime: "2020.10.12 12:10",
handleTime: "2020.10.12 12:10", amountChange: 200.89,
handleNumber: "AAAA8888", creationTime: "2020.10.12 12:10",
status: 1, relationNo: "AAAA8888",
className: "清水河18寒春5年级数学极智1班", bizType: "INTRODUCE",
schoolName: "清华坊校区" flowType: "ADD",
}, className: "清水河18寒春5年级数学极智1班",
{ schoolAreaName: "清华坊校区",
title: "微信提现至 - 渣画化", bizTypeName: "转介绍"
applyTime: "2020.10.12 12:10", },
arrivalTime: "2020.10.12 12:10", {
money: 3000.05, withdrawApplyTime: "2020.10.12 12:10",
handleTime: "2020.10.12 12:10", withdrawPayTime: "2020.10.12 12:10",
handleNumber: "AAAA8888", amountChange: 200.89,
status: 0 creationTime: "2020.10.12 12:10",
}, relationNo: "AAAA8888",
{ bizType: "WITHDRAW_RETURN",
title: "支付", flowType: "ADD",
applyTime: "2020.10.12 12:10", className: "清水河18寒春5年级数学极智1班",
arrivalTime: "2020.10.12 12:10", schoolAreaName: "清华坊校区",
money: 3000.05, bizTypeName: "提现返回"
handleTime: "2020.10.12 12:10", },
handleNumber: "AAAA8888", {
status: 1, withdrawApplyTime: "2020.10.12 12:10",
className: "清水河18寒春5年级数学极智1班", withdrawPayTime: "2020.10.12 12:10",
schoolName: "清华坊校区" amountChange: 3000,
}, creationTime: "2020.10.12 12:10",
{ relationNo: "AAAA8888",
title: "微信提现至 - 渣画化", bizType: "WITHDRAW",
applyTime: "2020.10.12 12:10", flowType: "REDUCE",
arrivalTime: "2020.10.12 12:10", className: "清水河18寒春5年级数学极智1班",
money: 3000.05, schoolAreaName: "清华坊校区",
handleTime: "2020.10.12 12:10", bizTypeName: "提现至微信"
handleNumber: "AAAA8888", },
status: 0 {
}, withdrawApplyTime: "2020.10.12 12:10",
{ withdrawPayTime: "2020.10.12 12:10",
title: "支付", amountChange: 400,
applyTime: "2020.10.12 12:10", creationTime: "2020.10.12 12:10",
arrivalTime: "2020.10.12 12:10", relationNo: "AAAA8888",
money: 3000, bizType: "ORDER",
handleTime: "2020.10.12 12:10", flowType: "REDUCE",
handleNumber: "AAAA8888", className: "清水河18寒春5年级数学极智1班",
status: 1, schoolAreaName: "清华坊校区",
className: "清水河18寒春5年级数学极智1班", bizTypeName: "支付"
schoolName: "清华坊校区" }
}, ]
{ );
title: "微信提现至 - 渣画化", } else {
applyTime: "2020.10.12 12:10", addList.push(
arrivalTime: "2020.10.12 12:10", ...[
money: 3000.05, {
handleTime: "2020.10.12 12:10", withdrawApplyTime: "2020.10.12 12:10",
handleNumber: "AAAA8888", withdrawPayTime: "2020.10.12 12:10",
status: 0 amountChange: 200.89,
}, creationTime: "2020.10.12 12:10",
{ relationNo: "AAAA8888",
title: "支付", bizType: "ORDER_RETURN",
applyTime: "2020.10.12 12:10", flowType: "ADD",
arrivalTime: "2020.10.12 12:10", className: "清水河18寒春5年级数学极智1班",
money: 3000.05, schoolAreaName: "清华坊校区",
handleTime: "2020.10.12 12:10", bizTypeName: "订单返回"
handleNumber: "AAAA8888", },
status: 1, {
className: "清水河18寒春5年级数学极智1班", withdrawApplyTime: "2020.10.12 12:10",
schoolName: "清华坊校区" withdrawPayTime: "2020.10.12 12:10",
amountChange: 200.89,
creationTime: "2020.10.12 12:10",
relationNo: "AAAA8888",
bizType: "INTRODUCE",
flowType: "ADD",
className: "清水河18寒春5年级数学极智1班",
schoolAreaName: "清华坊校区",
bizTypeName: "转介绍"
},
{
withdrawApplyTime: "2020.10.12 12:10",
withdrawPayTime: "2020.10.12 12:10",
amountChange: 200.89,
creationTime: "2020.10.12 12:10",
relationNo: "AAAA8888",
bizType: "WITHDRAW_RETURN",
flowType: "ADD",
className: "清水河18寒春5年级数学极智1班",
schoolAreaName: "清华坊校区",
bizTypeName: "提现返回"
},
{
withdrawApplyTime: "2020.10.12 12:10",
withdrawPayTime: "2020.10.12 12:10",
amountChange: 3000,
creationTime: "2020.10.12 12:10",
relationNo: "AAAA8888",
bizType: "WITHDRAW",
flowType: "REDUCE",
className: "清水河18寒春5年级数学极智1班",
schoolAreaName: "清华坊校区",
bizTypeName: "提现至微信"
},
{
withdrawApplyTime: "2020.10.12 12:10",
withdrawPayTime: "2020.10.12 12:10",
amountChange: 400,
creationTime: "2020.10.12 12:10",
relationNo: "AAAA8888",
bizType: "ORDER",
flowType: "REDUCE",
className: "清水河18寒春5年级数学极智1班",
schoolAreaName: "清华坊校区",
bizTypeName: "支付"
}
]
);
}
state.loading = false;
if (reduceList.length > 40) {
state.finished = true;
}
if (addList.length > 40) {
state.finished = true;
} }
] }, 1000);
// bonusModel.getBonusList(params).then(response => {
// });
};
const onRefresh = () => {
// 清空列表数据
state.finished = false;
// 重新加载数据
// 将 loading 设置为 true,表示处于加载状态
state.loading = true;
onLoad();
};
const changeTabs = name => {
console.log(name);
state.loading = true;
state.finished = false;
onLoad();
};
return {
addList,
reduceList,
...toRefs(state),
onLoad,
onRefresh,
changeTabs
}; };
}, },
components: { components: {
...@@ -171,7 +278,9 @@ const BonusDetail = defineComponent({ ...@@ -171,7 +278,9 @@ const BonusDetail = defineComponent({
[Tab.name]: Tab, [Tab.name]: Tab,
[Tabs.name]: Tabs, [Tabs.name]: Tabs,
[Cell.name]: Cell, [Cell.name]: Cell,
[Empty.name]: Empty [Empty.name]: Empty,
[List.name]: List,
[PullRefresh.name]: PullRefresh
}, },
methods: { methods: {
onClickLeft() { onClickLeft() {
......
...@@ -10,7 +10,9 @@ ...@@ -10,7 +10,9 @@
></van-col> ></van-col>
</van-row> </van-row>
<van-row class="bonus-account-money" align="center"> <van-row class="bonus-account-money" align="center">
<van-col span="12" class="money-desc"><span>¥1200.00</span></van-col> <van-col span="12" class="money-desc"
><span>¥{{ bonusAccount.balance }}</span></van-col
>
<van-col span="12" style="text-align: right" <van-col span="12" style="text-align: right"
><van-button ><van-button
style="border-color: #fff; width: 45%" style="border-color: #fff; width: 45%"
...@@ -26,21 +28,21 @@ ...@@ -26,21 +28,21 @@
<van-row class="bonus-account-status"> <van-row class="bonus-account-status">
<van-col span="8"> <van-col span="8">
<label>累计收入</label> <label>累计收入</label>
<span>¥11334.00</span> <span>¥{{ bonusAccount.sumAdd }}</span>
</van-col> </van-col>
<van-col span="8"> <van-col span="8">
<label>累计提现</label> <label>累计提现</label>
<span>¥00.00</span> <span>¥{{ bonusAccount.sumWithdraw }}</span>
</van-col> </van-col>
<van-col span="8"> <van-col span="8">
<label>提现中</label> <label>提现中</label>
<span>¥334.00</span> <span>¥{{ bonusAccount.withdrawing }}</span>
</van-col> </van-col>
</van-row> </van-row>
</div> </div>
<van-cell <van-cell
center center
title="可提现金额:¥12.00" :title="`可提现金额:¥${bonusAccount.balance}`"
size="large" size="large"
style="border-radius: 0.3rem;" style="border-radius: 0.3rem;"
:border="false" :border="false"
...@@ -54,7 +56,7 @@ ...@@ -54,7 +56,7 @@
<van-row> <van-row>
<van-col span="12" class="tip">&emsp;奖励金提现金额</van-col> <van-col span="12" class="tip">&emsp;奖励金提现金额</van-col>
<van-col span="12" class="tip-money" style="text-align: right; font-weight: 550" <van-col span="12" class="tip-money" style="text-align: right; font-weight: 550"
>总计:570.00元&nbsp;</van-col >总计:{{ bonusAccount.sumWithdraw }}元&nbsp;</van-col
> >
</van-row> </van-row>
...@@ -64,36 +66,39 @@ ...@@ -64,36 +66,39 @@
finished-text="我是有底线的" finished-text="我是有底线的"
@load="onLoad" @load="onLoad"
> >
<div class="bonus-record-item" v-for="item in state.bonusRecordList" :key="item.id"> <div class="bonus-record-item" v-for="item in withdrawList" :key="item.id">
<div class="bonus-record-item-header"> <div class="bonus-record-item-header">
<div class="bonus-record-item-header-status"> <div class="bonus-record-item-header-status">
<i <i
class="iconfont" class="iconfont"
:class=" :class="
item.status === 0 item.status === '0'
? 'icon-shijian' ? 'icon-shijian'
: item.status === 1 : item.status === '1'
? 'icon-jindutiaoqiandai' ? 'icon-jindutiaoqiandai'
: 'icon-xiazaishibai' : 'icon-xiazaishibai'
" "
:style="{ :style="{
color: item.status === 0 ? '#46BB36' : item.status === 1 ? '#027AFF' : '#F1551E' color:
item.status === '0' ? '#46BB36' : item.status === '1' ? '#027AFF' : '#F1551E'
}" }"
></i> ></i>
<span>{{ <span>{{
item.status === 0 ? "提现中" : item.status === 1 ? "提现成功" : "提现失败" item.status === "0" ? "提现中" : item.status === "1" ? "提现成功" : "提现失败"
}}</span> }}</span>
<label v-if="item.status === 0">请耐心等候~</label> <label v-if="item.status === '0'">请耐心等候~</label>
</div> </div>
<p class="bonus-record-item-apply-money"> <p class="bonus-record-item-apply-money">
{{ item.status === 1 ? "-" : "" }}¥{{ item.applyMoney }} {{ item.status === "1" ? "-" : "" }}¥{{ item.withdrawAmount }}
</p> </p>
</div> </div>
<ul class="bonus-record-item-detail"> <ul class="bonus-record-item-detail">
<li>微信提现:{{ item.userName }}</li> <li>微信提现:{{ item.accountName }}</li>
<li>申请时间:{{ item.applyTime }}</li> <li>申请时间:{{ item.withdrawApplyTime }}</li>
<li>预计时间:{{ item.arrivalTime }}</li> <li v-if="item.status === '0'">预计时间:{{ item.expectedPayTime }}</li>
<li v-if="item.status === 2">失败原因:{{ item.errorReason }}</li> <li v-if="item.status === '1'">到账时间:{{ item.withdrawPayTime }}</li>
<li v-if="item.status === '2'">失败时间:{{ item.failTime }}</li>
<li v-if="item.status === '2'">失败原因:{{ item.reason }}</li>
</ul> </ul>
</div> </div>
</van-list> </van-list>
...@@ -151,58 +156,74 @@ ...@@ -151,58 +156,74 @@
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
import { defineComponent, reactive } from "vue"; import { defineComponent, reactive } from "vue";
import { Dialog, Button, Col, Row, Cell, List } from "vant"; import { Dialog, Button, Col, Row, Cell, List } from "vant";
import { BonusAccountResponse, WithdrawListResponse } from "@/model/bonus";
const Bonus = defineComponent({ const Bonus = defineComponent({
setup() { setup(props) {
const state = reactive({ const state = reactive({
loading: false, loading: false,
finished: false, finished: false
bonusRecordList: [ });
{ const bonusAccount = reactive<BonusAccountResponse>({
status: 0, // 提现中 status: "",
userName: "王嘉尔", balance: 1.97,
applyTime: "2021-10-12 12:12:12", sumAdd: 2.09,
arrivalTime: "2021-10-12 12:12:12", sumWithdraw: 376.79,
applyMoney: 12.04 withdrawing: 4.09
},
{
status: 1, // 提现成功
userName: "王嘉尔",
applyTime: "2021-10-12 12:12:12",
arrivalTime: "2021-10-12 12:12:12",
applyMoney: 12.02
},
{
status: 2, // 提现失败
userName: "王嘉尔",
applyTime: "2021-10-12 12:12:12",
arrivalTime: "2021-10-12 12:12:12",
applyMoney: 12.5,
errorReason: "账户异常"
}
]
}); });
const withdrawList = reactive<WithdrawListResponse[]>([
{
status: "0", // 提现中
accountName: "王嘉尔",
withdrawApplyTime: "2021-10-12 12:12:12",
withdrawPayTime: "2021-10-12 12:12:12",
expectedPayTime: "2021-10-12 12:12:12",
failTime: "2021-10-12 12:12:12",
withdrawAmount: 12.04,
reason: "账户异常"
},
{
status: "1", // 提现成功
accountName: "王嘉尔",
withdrawApplyTime: "2021-10-12 12:12:12",
withdrawPayTime: "2021-10-12 12:12:12",
expectedPayTime: "2021-10-12 12:12:12",
failTime: "2021-10-12 12:12:12",
withdrawAmount: 12.02,
reason: "账户异常"
},
{
status: "2", // 提现失败
accountName: "王嘉尔",
withdrawApplyTime: "2021-10-12 12:12:12",
withdrawPayTime: "2021-10-12 12:12:12",
expectedPayTime: "2021-10-12 12:12:12",
failTime: "2021-10-12 12:12:12",
withdrawAmount: 12.5,
reason: "账户异常"
}
]);
const onLoad = () => { const onLoad = () => {
// 异步更新数据 // 异步更新数据
// setTimeout 仅做示例,真实场景中一般为 ajax 请求 // setTimeout 仅做示例,真实场景中一般为 ajax 请求
setTimeout(() => { setTimeout(() => {
for (let i = 0; i < 10; i++) { for (let i = 0; i < 10; i++) {
// state.bonusRecordList.push(); // withdrawList.push();
} }
// 加载状态结束 // 加载状态结束
state.loading = false; state.loading = false;
// 数据全部加载完成 // 数据全部加载完成
if (state.bonusRecordList.length >= 40) { if (withdrawList.length >= 40) {
state.finished = true; state.finished = true;
} }
}, 1000); }, 1000);
}; };
return { return {
state, state,
bonusAccount,
withdrawList,
onLoad onLoad
}; };
}, },
......
...@@ -30,8 +30,7 @@ module.exports = { ...@@ -30,8 +30,7 @@ module.exports = {
replace: true, replace: true,
mediaQuery: false, mediaQuery: false,
minPixelValue: 2, minPixelValue: 2,
exclude: /(node_module)/i, exclude: /(node_module)/i
selectorBlackList: ["tc-", "t"]
}) })
] ]
} }
......
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