Commit bb72ee83 by Kyle_Li

update: 黑名单列表

parent db91ef98
......@@ -77,6 +77,8 @@ const urlConfig = {
getClerkList: '/api-member/query-clerk-by-storeId', // 获取导购选项
modifyClerk: '/api-member/member-load-update-clerk', // 更改专属导购
switchPos: '/api-member/member-change-wechat-member-pos', // 微信转pos
getBlockList: '/api-member/enteprise-black-list-page', // 黑名单列表
addToWhiteList: '/api-member/update-member-white-list', // 加入白名单
}
const defaultUrl = Object.assign({}, urlConfig);
......
<template>
<div id="block-list">
<div class="min100">
<nav-path :navpath="navpath">
<div class="layout--tips" slot="member">
<i class="el-icon-info"></i>
查看被系统判定为异常风险的手机号,这部分手机将无法完成正常的注册认证流程;若为系统误判,可将手机号加入白名单后继续后续注册认证流程
</div>
</nav-path>
<div class="content">
<header>
<el-input
v-model="search.phone"
placeholder="输入手机号搜索"
@keyup.native.enter="handleSearch"
prefix-icon="el-icon-search"
style="width: 249px;"
maxlength="32"
clearable>
</el-input>
<el-button type="primary" @click="dialogVisible = true">移除白名单</el-button>
</header>
<el-table
v-loading="load"
:data="tableData"
tooltip-effect="dark"
style="width: 100%">
<el-table-column
label="更新时间"
show-overflow-tooltip>
<template slot-scope="{row}">
{{ row.updateTime }}
</template>
</el-table-column>
<el-table-column
label="手机号"
show-overflow-tooltip>
<template slot-scope="{row}">
{{ row.phone || '--' }}
</template>
</el-table-column>
<el-table-column
label="风险详情"
show-overflow-tooltip>
<template slot-scope="{row}">
{{ row.riskDetail || '--' }}
</template>
</el-table-column>
<el-table-column
label="操作"
show-overflow-tooltip>
<template slot-scope="{row}">
<el-button type="text" @click="joinWhiteList(row.phone, 1)">加入白名单</el-button>
</template>
</el-table-column>
</el-table>
<dm-pagination
v-if="tableData.length > 0"
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page.currentPage"
:page-sizes="[20, 40, 60, 80]"
:page-size="page.pageSize"
layout="total, sizes, prev, pager, next"
:total="page.totalCount">
</dm-pagination>
</div>
<el-dialog
title="移除白名单"
:visible.sync="dialogVisible"
width="600px"
@close="onCloseDialog">
<el-form ref="form" :model="form" label-width="80px">
<el-form-item
label="手机号"
prop="phone"
:rules="[
{ required: true, message: '请输入手机号', trigger: ['blur', 'change'] },
{ pattern: /^[0-9]{6,13}$/, message: '请输入6-13位数字', trigger: ['blur', 'change'] }
]">
<el-input v-model="form.phone" placeholder="请输入手机号"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="confirm">确 定</el-button>
</span>
</el-dialog>
</div>
<div class="foot-add">
<vue-gic-footer></vue-gic-footer>
</div>
</div>
</template>
<script>
import NavPath from "@/common/navbar/navbar.vue";
import url from "../../components/axios/url";
import { doFetch, doFetchqs, doFetchGet } from "../../components/axios/api";
export default {
name: 'blockList',
components: { NavPath },
created() {
this.$store.commit("mutations-slide", false);
this.getList();
},
data() {
return {
navpath: [{ name: "首页", path: "" }, { name: "黑名单列表", path: "" }],
load: false,
search: {
phone: ''
},
tableData: [],
page: {
currentPage: 1,
pageSize: 20,
totalCount: 999
},
dialogVisible: false,
form: {
phone: ''
}
}
},
methods: {
getList() {
this.load = true;
const { phone } = this.search;
let params = {
pageSize: this.page.pageSize,
currentPage: this.page.currentPage,
phone
}
doFetchGet(url.getBlockList, params).then(res => {
const { errorCode, result, message } = res.data || {};
if (errorCode !== 0) return this.$message.error(message);
const { result: table, totalCount } = result || {};
this.tableData = table || [];
this.page.totalCount = totalCount || 0;
}).finally(_ => this.load = false);
},
handleSizeChange(val) {
this.page.currentPage = 1;
this.page.pageSize = val;
this.getList();
},
handleCurrentChange(val) {
this.page.currentPage = val;
this.getList();
},
handleSearch() {
this.handleCurrentChange(1);
},
joinWhiteList(phone, type) {
this.$confirm('加入白名单后,该手机号可正常完成注册', '加入白名单', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
doFetchGet(url.addToWhiteList, { phone, type }).then(res => {
const { errorCode, message } = res.data || {};
if (errorCode !== 0) return this.$message.error(message);
this.getList();
})
})
},
onCloseDialog() {
this.$refs.form.resetFields();
},
confirm() {
this.$refs.form.validate(valid => {
if (!valid) return;
const { phone } = this.form;
doFetchGet(url.addToWhiteList, { phone, type: 2 }).then(res => {
const { errorCode, message } = res.data || {};
if (errorCode !== 0) return this.$message.error(message);
this.dialogVisible = false;
this.getList();
})
})
}
}
}
</script>
<style lang="scss">
#block-list {
height: 100%;
header {
display: flex;
justify-content: space-between;
align-items: center;
}
.content {
margin: 24px;
padding: 20px;
background-color: #fff;
min-height: calc(100vh - 376px);
.el-table {
margin: 20px 0;
}
.el-pagination {
text-align: right;
}
}
}
</style>
\ No newline at end of file
......@@ -282,6 +282,13 @@ export const constantRouterMap = [
title: "微盟订单"
}
},
{
path: "/block-list",
component: _import("block-list", "index"),
meta: {
title: "黑名单列表"
}
}
]
}
];
......
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