Commit 592ec616 authored by Qingyu Deng's avatar Qingyu Deng

refactor: remove magic number

parent 8c7aaf41
...@@ -10,20 +10,24 @@ ...@@ -10,20 +10,24 @@
<el-tab-pane <el-tab-pane
v-if="isAllowedToAudit" v-if="isAllowedToAudit"
label="待审核" label="待审核"
name="0" :name="TABS.pending"
@tab-click="handleTabChange" @tab-click="handleTabChange"
></el-tab-pane> ></el-tab-pane>
<el-tab-pane <el-tab-pane
label="审核通过" label="审核通过"
name="1" :name="TABS.passed"
@tab-click="handleTabChange" @tab-click="handleTabChange"
></el-tab-pane> ></el-tab-pane>
<el-tab-pane <el-tab-pane
label="审核驳回" label="审核驳回"
name="2" :name="TABS.rejected"
@tab-click="handleTabChange" @tab-click="handleTabChange"
></el-tab-pane> ></el-tab-pane>
<el-tab-pane label="提现失败" name="3" @tab-click="handleTabChange"> <el-tab-pane
label="提现失败"
:name="TABS.failed"
@tab-click="handleTabChange"
>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
...@@ -136,18 +140,18 @@ ...@@ -136,18 +140,18 @@
<el-button <el-button
type="text" type="text"
@click="handleDetail('look', scope.row.id)" @click="handleDetail('look', scope.row.id)"
v-if="searchProps.withdraw_apply_status !== '3'" v-if="searchProps.withdraw_apply_status !== TABS.failed"
>查看</el-button >查看</el-button
> >
<el-button <el-button
type="text" type="text"
v-if="searchProps.withdraw_apply_status == '0'" v-if="searchProps.withdraw_apply_status === TABS.pending"
@click="handleDetail('audit', scope.row.id)" @click="handleDetail('audit', scope.row.id)"
>审核</el-button >审核</el-button
> >
<el-button <el-button
type="text" type="text"
v-if="searchProps.withdraw_apply_status == '3'" v-if="searchProps.withdraw_apply_status == TABS.failed"
@click="handleFinzingFind(scope.row.wallet_id)" @click="handleFinzingFind(scope.row.wallet_id)"
>解冻</el-button >解冻</el-button
> >
...@@ -292,6 +296,14 @@ import { ...@@ -292,6 +296,14 @@ import {
getAll_role_list, getAll_role_list,
} from "../../../service/Withdrawal/withdrawal"; } from "../../../service/Withdrawal/withdrawal";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
const TABS = {
pending: "0",
passed: "1",
rejected: "2",
failed: "3",
};
export default { export default {
name: "Audit", name: "Audit",
components: { Layout }, components: { Layout },
...@@ -318,7 +330,7 @@ export default { ...@@ -318,7 +330,7 @@ export default {
searchProps: { searchProps: {
user_id: "", //用户id user_id: "", //用户id
page_size: 1, //页码 page_size: 1, //页码
withdraw_apply_status: "0", //状态 withdraw_apply_status: TABS.pending, //状态
}, },
// 弹框 // 弹框
dialogData: { dialogData: {
...@@ -336,7 +348,10 @@ export default { ...@@ -336,7 +348,10 @@ export default {
outerVisible: false, //外层弹框 outerVisible: false, //外层弹框
page: 20, page: 20,
count: 0, //总条数 count: 0, //总条数
loading: false, //加载中 loading: false, //加载中,
// constants
TABS,
}; };
}, },
created() { created() {
......
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