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
bbe1ae77
Commit
bbe1ae77
authored
Jul 27, 2021
by
Qingyu Deng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: people with look authentication is auditable
parent
f2f66762
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
6 deletions
+63
-6
examine.spec.js
src/pages/Withdrawal/Examine/__tests__/examine.spec.js
+58
-0
index.vue
src/pages/Withdrawal/Examine/index.vue
+5
-6
No files found.
src/pages/Withdrawal/Examine/__tests__/examine.spec.js
0 → 100644
View file @
bbe1ae77
import
{
render
}
from
"@testing-library/vue"
;
import
ExaminePage
from
".."
;
import
{
getApplyList
}
from
"@/service/Withdrawal/withdrawal"
;
import
store
from
"@/store"
;
jest
.
mock
(
"@/service/Withdrawal/withdrawal"
);
it
(
"should not enable audition for people without such privilege"
,
()
=>
{
const
$route
=
{
path
:
"/op/withdrawal/examine"
};
getApplyList
.
mockResolvedValue
({
code
:
0
,
status
:
"success"
,
result
:
{
list
:
[
{
withdraw_apply_id
:
"21072711253403105009"
,
wallet_id
:
"21072214560673105003"
,
user_id
:
510227177373
,
amount
:
"6.00"
,
withdraw_apply_status
:
0
,
withdraw_audit_time
:
"2021-07-27 11:25:34"
,
refuse_reason
:
""
,
audit_user_name
:
""
,
create_time
:
"2021-07-27 11:25:34"
,
lately_amount
:
"0.00"
,
id
:
"21072711253403105009"
,
city_name
:
"简网员工"
,
lately_share
:
0
,
lately_download
:
0
,
history_share
:
52
,
history_download
:
0
,
history_download_keep
:
"0%"
,
status_text
:
"待审核"
}
],
count
:
1
}
});
const
{
getByText
}
=
render
(
ExaminePage
,
{
store
,
global
:
{
mocks
:
{
$route
,
$store
:
{
getters
:
{
moduleSubPermissions
:
jest
.
fn
().
mockReturnValue
(
true
)
}
}
}
}
});
getByText
(
"审核"
);
});
src/pages/Withdrawal/Examine/index.vue
View file @
bbe1ae77
...
...
@@ -102,7 +102,7 @@
></el-table-column>
<!-- 操作快捷键 -->
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"200"
>
<template
#
default=
"scope"
>
<template
v-slot:
default=
"scope"
>
<el-button
type=
"text"
@
click=
"handleDetail('look', scope.row.id)"
...
...
@@ -221,8 +221,8 @@
label=
"分享用户量"
width=
"120"
>
<
template
#
default=
"scope"
>
<span>
{{
"+"
+
scope
.
row
.
amount
}}
</span>
<
template
v-slot:
default=
"scope"
>
<span>
{{
scope
?
"+"
+
scope
.
row
.
amount
:
null
}}
</span>
</
template
>
</el-table-column>
<el-table-column
...
...
@@ -266,7 +266,7 @@ import {
getApplyDetail
,
getFreezingFund
,
getRolesForUser
,
}
from
"
../../..
/service/Withdrawal/withdrawal"
;
}
from
"
@
/service/Withdrawal/withdrawal"
;
import
{
ElMessage
}
from
"element-plus"
;
import
{
fetchCurrentUser
}
from
"../../../service/user"
;
...
...
@@ -332,7 +332,6 @@ export default {
},
async
mounted
()
{
const
res
=
await
this
.
getPermissionsAll
();
console
.
log
(
res
);
if
(
!
res
)
{
this
.
$router
.
push
({
name
:
"Forbidden"
});
...
...
@@ -532,7 +531,7 @@ export default {
(
item
)
=>
item
.
id
===
AUDIT_PERMSSION_ID
);
return
!!
auditPermission
;
return
auditPermission
.
length
!==
0
;
},
},
};
...
...
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