Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
op-web-service
Commits
979efc91
Commit
979efc91
authored
Aug 12, 2021
by
pengyunqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:黑名单
parent
bc9d0910
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
305 additions
and
196 deletions
+305
-196
withdrawal.js
server/controllers/withdrawal.js
+22
-0
router.js
server/router.js
+2
-0
h5.vue
src/pages/Withdrawal/Examine/h5.vue
+5
-0
index.vue
src/pages/Withdrawal/Examine/index.vue
+4
-0
flowRecord.vue
src/pages/Withdrawal/walletAccount/flowRecord.vue
+32
-2
index.vue
src/pages/Withdrawal/walletAccount/index.vue
+228
-188
withdrawal.js
src/service/Withdrawal/withdrawal.js
+12
-6
No files found.
server/controllers/withdrawal.js
View file @
979efc91
...
@@ -92,6 +92,28 @@ exports.getRecordList = async ctx => {
...
@@ -92,6 +92,28 @@ exports.getRecordList = async ctx => {
}
}
ctx
.
body
=
await
req
(
ctx
,
opts
)
ctx
.
body
=
await
req
(
ctx
,
opts
)
}
}
// 钱包账户黑名单
exports
.
getAccountBlackList
=
async
ctx
=>
{
const
url
=
`
${
WITHDRAWAL_URI
}
/wallet/background/blacklist`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
}
ctx
.
body
=
await
req
(
ctx
,
opts
)
}
// 钱包账户释放
exports
.
getReblackList
=
async
ctx
=>
{
const
url
=
`
${
WITHDRAWAL_URI
}
/wallet/background/reblacklist`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
}
ctx
.
body
=
await
req
(
ctx
,
opts
)
}
const
getUserPermission
=
async
(
ctx
)
=>
{
const
getUserPermission
=
async
(
ctx
)
=>
{
const
url
=
`
${
WITHDRAWAL_URI
}
/merchant/authority/get_role_list`
;
const
url
=
`
${
WITHDRAWAL_URI
}
/merchant/authority/get_role_list`
;
...
...
server/router.js
View file @
979efc91
...
@@ -90,5 +90,7 @@ router.get(`${API_VERSION}/get_apply_detail`, withdrawal.getApplyDetail)
...
@@ -90,5 +90,7 @@ router.get(`${API_VERSION}/get_apply_detail`, withdrawal.getApplyDetail)
// 钱包账户
// 钱包账户
router
.
get
(
`
${
API_VERSION
}
/get_account_list`
,
withdrawal
.
getAccountList
)
router
.
get
(
`
${
API_VERSION
}
/get_account_list`
,
withdrawal
.
getAccountList
)
router
.
get
(
`
${
API_VERSION
}
/get_record_list`
,
withdrawal
.
getRecordList
)
router
.
get
(
`
${
API_VERSION
}
/get_record_list`
,
withdrawal
.
getRecordList
)
router
.
post
(
`
${
API_VERSION
}
/get_account_black_list`
,
withdrawal
.
getAccountBlackList
)
router
.
post
(
`
${
API_VERSION
}
/get_reblack_list`
,
withdrawal
.
getReblackList
)
module
.
exports
=
router
;
module
.
exports
=
router
;
src/pages/Withdrawal/Examine/h5.vue
View file @
979efc91
...
@@ -4,6 +4,11 @@
...
@@ -4,6 +4,11 @@
<!--
<el-card
class=
"goods-h5"
>
-->
<!--
<el-card
class=
"goods-h5"
>
-->
<div
class=
"goods-h5"
>
<div
class=
"goods-h5"
>
<el-table
:data=
"goodsList"
border
>
<el-table
:data=
"goodsList"
border
>
<el-table-column
label=
"登录地点"
prop=
"withdraw_address"
align=
"center"
></el-table-column>
<el-table-column
<el-table-column
label=
"申请用户"
label=
"申请用户"
prop=
"user_id"
prop=
"user_id"
...
...
src/pages/Withdrawal/Examine/index.vue
View file @
979efc91
...
@@ -195,6 +195,10 @@
...
@@ -195,6 +195,10 @@
>白名单</el-button
>白名单</el-button
> -->
> -->
<ul
class=
"listShow"
>
<ul
class=
"listShow"
>
<li>
<span
class=
"list-left"
>
登录地点 :
</span>
<span
class=
"list-right"
>
{{ dialogData.showData.withdraw_address }}
</span>
</li>
<li>
<li>
<span
class=
"list-left"
>
提现金额 :
</span>
<span
class=
"list-left"
>
提现金额 :
</span>
<span
class=
"list-right"
>
{{ dialogData.showData.amount }}
</span>
<span
class=
"list-right"
>
{{ dialogData.showData.amount }}
</span>
...
...
src/pages/Withdrawal/walletAccount/flowRecord.vue
View file @
979efc91
<
template
>
<
template
>
<div
class=
"manage-wrapper"
v-loading=
"tableLoading"
element-loading-text=
"拼命加载中"
element-loading-spinner=
"el-icon-loading"
element-loading-background=
"rgba(0, 0, 0, 0.6)"
>
<el-card
class=
"role_management"
>
<el-card
class=
"role_management"
>
<!-- 检索区域 -->
<!-- 检索区域 -->
<div
class=
"creatRole"
>
<div
class=
"creatRole"
>
...
@@ -49,6 +56,11 @@
...
@@ -49,6 +56,11 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"状态"
width=
"200px"
prop=
"status"
align=
"center"
>
<el-table-column
label=
"状态"
width=
"200px"
prop=
"status"
align=
"center"
>
<
template
#
default=
"scope"
>
<span
:style=
"
{ color: scope.row.status==='失败' ?'red':'black'}" >
{{
scope
.
row
.
status
}}
</span>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"说明"
align=
"center"
prop=
"third_order_desc"
>
<el-table-column
label=
"说明"
align=
"center"
prop=
"third_order_desc"
>
</el-table-column>
</el-table-column>
...
@@ -56,11 +68,13 @@
...
@@ -56,11 +68,13 @@
<el-button
type=
"primary"
@
click=
"handleBack"
style=
"margin-top:50px;margin-left: 45%;"
>
返回
</el-button>
<el-button
type=
"primary"
@
click=
"handleBack"
style=
"margin-top:50px;margin-left: 45%;"
>
返回
</el-button>
<page
:totalNum=
"totalNum"
@
update=
"update"
/>
<page
:totalNum=
"totalNum"
@
update=
"update"
/>
</el-card>
</el-card>
</div>
</template>
</template>
<
script
>
<
script
>
import
page
from
"../../../components/Pagination"
;
import
page
from
"../../../components/Pagination"
;
import
{
getRecordList
}
from
"@/service/Withdrawal/withdrawal"
;
import
{
getRecordList
}
from
"@/service/Withdrawal/withdrawal"
;
import
{
ElMessage
}
from
'element-plus'
;
const
tradeType
=
{
1
:
"充值"
,
2
:
"提现"
,
3
:
"转账"
};
const
tradeType
=
{
1
:
"充值"
,
2
:
"提现"
,
3
:
"转账"
};
export
default
{
export
default
{
name
:
"flowRecord"
,
name
:
"flowRecord"
,
...
@@ -70,7 +84,17 @@ export default {
...
@@ -70,7 +84,17 @@ export default {
user_id
:
""
,
user_id
:
""
,
wallet_id
:
""
,
wallet_id
:
""
,
type
:
""
,
type
:
""
,
recordList
:
[],
recordList
:
[
{
wallet_record_id
:
'243435676'
,
create_time
:
"2021-3-3"
,
amount
:
4
,
balance
:
555
,
trade_type
:
"提现"
,
status
:
"失败"
}
],
tableLoading
:
false
,
params
:
{
params
:
{
page
:
1
,
page
:
1
,
page_size
:
20
,
page_size
:
20
,
...
@@ -81,6 +105,7 @@ export default {
...
@@ -81,6 +105,7 @@ export default {
created
()
{
created
()
{
this
.
user_id
=
this
.
$route
.
query
.
user_id
;
this
.
user_id
=
this
.
$route
.
query
.
user_id
;
this
.
wallet_id
=
this
.
$route
.
query
.
wallet_id
;
this
.
wallet_id
=
this
.
$route
.
query
.
wallet_id
;
this
.
tableLoading
=
true
;
this
.
getRecordList
();
this
.
getRecordList
();
},
},
...
@@ -101,9 +126,14 @@ export default {
...
@@ -101,9 +126,14 @@ export default {
type
,
type
,
};
};
getRecordList
(
params_list
).
then
((
res
)
=>
{
getRecordList
(
params_list
).
then
((
res
)
=>
{
this
.
tableLoading
=
true
;
this
.
recordList
=
res
.
result
.
list
;
this
.
recordList
=
res
.
result
.
list
;
this
.
totalNum
=
res
.
result
.
count
;
this
.
totalNum
=
res
.
result
.
count
;
});
this
.
tableLoading
=
false
;
}).
catch
(
err
=>
{
this
.
tableLoading
=
false
;
ElMessage
.
error
(
"加载失败"
+
err
)
});;
},
},
// 获取交易类型
// 获取交易类型
getTradeType
(
code
)
{
getTradeType
(
code
)
{
...
...
src/pages/Withdrawal/walletAccount/index.vue
View file @
979efc91
<
template
>
<
template
>
<Layout>
<Layout>
<div
class=
"manage-wrapper"
v-loading=
"tableLoading"
element-loading-text=
"拼命加载中"
element-loading-spinner=
"el-icon-loading"
element-loading-background=
"rgba(0, 0, 0, 0.6)"
>
<el-card
class=
"role_management"
>
<el-card
class=
"role_management"
>
<!-- 检索区域 -->
<!-- 检索区域 -->
<div
class=
"creatRole"
>
<div
class=
"creatRole"
>
<el-form
inline
:model=
"searchProps"
>
<el-form
inline
:model=
"searchProps"
>
<el-form-item
label=
"用户Id"
>
<el-form-item
label=
"用户Id"
>
<el-input
clearable
v-model=
"searchProps.user_id"
@
input=
"
<el-input
searchProps.user_id = $event
clearable
.replace(/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g, '')
v-model=
"searchProps.user_id"
"
></el-input>
@
input=
"
searchProps.user_id = $event.replace(
/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g,
''
)
"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"账户状态"
>
<el-form-item
label=
"账户状态"
>
<el-select
v-model=
"searchProps.type"
clearable
>
<el-select
v-model=
"searchProps.type"
clearable
>
<el-option
label=
"黑名单"
:value=
"2"
></el-option>
<el-option
label=
"黑名单"
:value=
"2"
></el-option>
<el-option
label=
"正常用户"
:value=
"1"
></el-option>
<el-option
label=
"正常用户"
:value=
"1"
></el-option>
</el-select>
</el-select>
...
@@ -38,7 +51,7 @@
...
@@ -38,7 +51,7 @@
align=
"center"
align=
"center"
>
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
{{
"¥ "
+
scope
.
row
.
available_fund
}}
{{
"¥ "
+
scope
.
row
.
available_fund
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
@@ -47,7 +60,7 @@
...
@@ -47,7 +60,7 @@
align=
"center"
align=
"center"
>
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
{{
"¥ "
+
scope
.
row
.
freezing_fund
}}
{{
"¥ "
+
scope
.
row
.
freezing_fund
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
@@ -56,7 +69,7 @@
...
@@ -56,7 +69,7 @@
align=
"center"
align=
"center"
>
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
{{
"¥ "
+
scope
.
row
.
history_fund
}}
{{
"¥ "
+
scope
.
row
.
history_fund
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
@@ -70,14 +83,26 @@
...
@@ -70,14 +83,26 @@
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
<el-button
v-show=
"scope.row.is_black == 0"
v-show=
"scope.row.is_black == 0"
@
click
.
stop=
"openBounced(scope.row.is_black,scope.row.wallet_id)"
@
click
.
stop=
"
openBounced(
scope.row.is_black,
scope.row.user_id,
scope.row.wallet_id
)
"
type=
"text"
type=
"text"
size=
"mini"
size=
"mini"
>
黑名单
</el-button
>
黑名单
</el-button
>
>
<el-button
<el-button
v-show=
"scope.row.is_black == 1"
v-show=
"scope.row.is_black == 1"
@
click
.
stop=
"openBounced(scope.row.is_black,scope.row.wallet_id)"
@
click
.
stop=
"
openBounced(
scope.row.is_black,
scope.row.user_id,
scope.row.wallet_id
)
"
size=
"mini"
size=
"mini"
type=
"text"
type=
"text"
>
释放
</el-button
>
释放
</el-button
...
@@ -93,85 +118,76 @@
...
@@ -93,85 +118,76 @@
</el-table>
</el-table>
<page
:totalNum=
"totalNum"
@
update=
"update"
/>
<page
:totalNum=
"totalNum"
@
update=
"update"
/>
</el-card>
</el-card>
</Layout>
</div>
</Layout>
</template>
</template>
<
script
>
<
script
>
import
page
from
"../../../components/Pagination"
;
import
page
from
"../../../components/Pagination"
;
import
Layout
from
"../layout/index.vue"
;
import
Layout
from
"../layout/index.vue"
;
import
{
import
{
getAccountList
getAccountList
,
getAccountBlackList
,
getReblackList
}
from
"@/service/Withdrawal/withdrawal"
;
}
from
"@/service/Withdrawal/withdrawal"
;
// import { ElMessage } from 'element-plus'
;
import
{
ElMessage
}
from
"element-plus"
;
export
default
{
export
default
{
name
:
"walletAccount"
,
name
:
"walletAccount"
,
props
:[
"flowRecord"
],
props
:
[
"flowRecord"
],
components
:
{
components
:
{
page
,
Layout
page
,
Layout
,
},
},
data
()
{
data
()
{
return
{
return
{
searchProps
:
{
searchProps
:
{
user_id
:
""
,
user_id
:
""
,
wallet_id
:
""
,
type
:
""
,
type
:
""
,
},
},
formLabelWidth
:
"120px"
,
params
:
{
params
:
{
page
:
1
,
page
:
1
,
page_size
:
20
,
page_size
:
20
,
},
},
totalNum
:
null
,
totalNum
:
null
,
roleTitle
:
""
,
roleName
:
""
,
edit
:
true
,
props
:
{
multiple
:
true
,
//设置为多选
value
:
"id"
,
//value值和哪个值绑定
label
:
"desc"
,
//label值和哪个值绑定
children
:
"sub_permissions"
,
//children值和哪个值绑定
},
selectedOptions
:
[],
dialogText
:
""
,
dialogText
:
""
,
accountList
:
[],
accountList
:
[],
role_info_detail
:
{
tableLoading
:
false
,
//详情非编辑项
role_id
:
""
,
role_name
:
""
,
},
permissionsAll
:
[],
currenPermissionsUpdate
:
[],
currentRolePrivilege
:
[],
};
};
},
},
created
()
{
created
()
{
this
.
tableLoading
=
true
;
this
.
getAccountList
();
this
.
getAccountList
();
// this.getPermissionsAll();
// this.getPermissionsAll();
},
},
methods
:
{
methods
:
{
//获取账户列表
//获取账户列表
getAccountList
()
{
getAccountList
()
{
this
.
accountList
=
[]
this
.
accountList
=
[];
let
{
page
,
page_size
}
=
this
.
params
;
let
{
page
,
page_size
}
=
this
.
params
;
let
{
user_id
,
type
}
=
this
.
searchProps
;
let
{
user_id
,
type
}
=
this
.
searchProps
;
let
params_list
=
{
let
params_list
=
{
page
,
page
,
page_size
,
page_size
,
type
,
type
,
user_id
:
user_id
||
undefined
user_id
:
user_id
||
undefined
,
};
};
getAccountList
(
params_list
).
then
((
res
)
=>
{
getAccountList
(
params_list
)
.
then
((
res
)
=>
{
this
.
tableLoading
=
true
;
this
.
accountList
=
res
.
result
.
list
;
this
.
accountList
=
res
.
result
.
list
;
this
.
totalNum
=
res
.
result
.
count
;
this
.
totalNum
=
res
.
result
.
count
;
this
.
tableLoading
=
false
;
})
.
catch
((
err
)
=>
{
this
.
tableLoading
=
false
;
ElMessage
.
error
(
"加载失败"
+
err
);
});
});
},
},
//查询
//查询
findProducts
()
{
findProducts
()
{
this
.
tableLoading
=
true
;
this
.
getAccountList
();
this
.
getAccountList
();
},
},
// //重置
// onReset() {
// (this.searchProps.user_id = ""), (this.searchProps.type = "");
// this.getGetRole_list();
// },
//列表分页
//列表分页
update
(
obj
)
{
update
(
obj
)
{
Object
.
assign
(
this
.
params
,
obj
);
Object
.
assign
(
this
.
params
,
obj
);
...
@@ -179,18 +195,26 @@ export default {
...
@@ -179,18 +195,26 @@ export default {
this
.
getAccountList
(
page
,
page_size
);
this
.
getAccountList
(
page
,
page_size
);
},
},
//弹框提示
//弹框提示
openBounced
(
type
,
wallet_id
)
{
openBounced
(
type
,
user_id
,
wallet_id
)
{
this
.
$confirm
(
`
${
type
===
1
?
"确认后则将用户释放出黑名单"
:
"确认后则将用户拉入黑名单"
}
是否继续?`
,
"提示"
,
{
this
.
$confirm
(
`
${
type
===
1
?
"确认后则将用户释放出黑名单"
:
"确认后则将用户拉入黑名单"
}
是否继续?`
,
"提示"
,
{
confirmButtonText
:
"确定"
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
type
:
"warning"
,
})
center
:
true
,
}
)
.
then
(()
=>
{
.
then
(()
=>
{
if
(
+
type
===
0
)
{
if
(
+
type
===
0
)
{
this
.
getRole_info_detail
(
"disable"
,
wallet_id
);
this
.
handleBlackList
(
user_id
,
wallet_id
);
}
else
{
}
else
{
this
.
release
(
wallet_id
);
this
.
release
(
user_id
,
wallet_id
);
}
}
console
.
log
(
"123456"
)
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
$message
({
this
.
$message
({
...
@@ -201,32 +225,48 @@ export default {
...
@@ -201,32 +225,48 @@ export default {
},
},
//释放
//释放
// async release(wallet_id) {
async
release
(
user_id
,
wallet_id
)
{
// this.dialogText = "确认后则将用户释放出黑名单";
this
.
dialogText
=
"确认后则将用户释放出黑名单"
;
// try {
let
params
=
{
// await getRelease(wallet_id)
user_id
,
// ElMessage("释放成功")
wallet_id
,
// this.getAccountList()
};
// } catch (error) {
try
{
// ElMessage(error)
await
getReblackList
(
params
);
// }
ElMessage
(
"释放成功"
);
// },
this
.
getAccountList
();
}
catch
(
error
)
{
ElMessage
(
"释放请求失败"
);
}
},
// //流水记录
// //流水记录
handelRecord
(
row
)
{
handelRecord
(
row
)
{
this
.
$router
.
push
({
path
:
"/op/withdrawal/flowrecord"
,
query
:
{
user_id
:
row
.
user_id
,
wallet_id
:
row
.
wallet_id
}})
this
.
$router
.
push
({
path
:
"/op/withdrawal/flowrecord"
,
query
:
{
user_id
:
row
.
user_id
,
wallet_id
:
row
.
wallet_id
},
});
},
},
// //黑名单
// //黑名单
// async handleBlackList(row) {
async
handleBlackList
(
user_id
,
wallet_id
)
{
// this.edit = true;
let
params
=
{
// this.roleTitle = "修改角色";
user_id
,
// await this.getPermissionsAll();
wallet_id
,
// this.dialogVisible = true;
};
// this.getRole_info_detail("modify", row.role_id);
try
{
// },
await
getAccountBlackList
(
params
);
ElMessage
(
"添加黑名单成功"
);
this
.
getAccountList
();
}
catch
(
error
)
{
ElMessage
(
"添加黑名单失败"
);
}
},
},
}
},
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.manage-wrapper {
height: 100%;
}
.creatRole {
.creatRole {
display: flex;
display: flex;
justify-content: space-between;
justify-content: space-between;
...
...
src/service/Withdrawal/withdrawal.js
View file @
979efc91
...
@@ -50,15 +50,21 @@ export async function getRolesForUser(user_email) {
...
@@ -50,15 +50,21 @@ export async function getRolesForUser(user_email) {
// 迭代---钱包账户
// 迭代---钱包账户
// 获取账户列表
// 获取账户列表
export
async
function
getAccountList
(
params
)
{
export
async
function
getAccountList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/get_account_list"
,
{
const
res
=
await
axios
.
get
(
"/api/v1/get_account_list"
,
params
);
params
:
getParams
(
params
)
});
return
res
;
return
res
;
}
}
// 获取账户流水列表
// 获取账户流水列表
export
async
function
getRecordList
(
params
)
{
export
async
function
getRecordList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/get_record_list"
,
{
const
res
=
await
axios
.
get
(
"/api/v1/get_record_list"
,
params
);
params
:
getParams
(
params
)
return
res
;
});
}
// 钱包账户-黑名单
export
async
function
getAccountBlackList
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/get_account_black_list"
,
params
)
return
res
;
}
// 钱包账户-释放
export
async
function
getReblackList
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/get_reblack_list"
,
params
)
return
res
;
return
res
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment