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
31fe2001
Commit
31fe2001
authored
Aug 09, 2021
by
liwenhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
217537d0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
40 deletions
+49
-40
config.js
server/config.js
+1
-0
App.vue
src/App.vue
+19
-15
main.js
src/main.js
+24
-20
index.less
src/pages/Withdrawal/Examine/index.less
+1
-1
config.js
src/pages/Withdrawal/components/PageHeader/config.js
+4
-4
No files found.
server/config.js
View file @
31fe2001
...
...
@@ -21,6 +21,7 @@ module.exports = {
API_INTERNAL_URI
:
API_INTERNAL_URI
[
env
],
PANDORA_URI
:
PANDORA_URI
[
env
],
GOODS_URI
:
API_INTERNAL_URI
[
env
],
ACTIVITY_URI
:
API_INTERNAL_URI
[
env
],
GROUPMEAL_URI
:
API_INTERNAL_URI
[
env
],
WITHDRAWAL_URI
:
API_INTERNAL_URI
[
env
],
API_YD_LOGIN
...
...
src/App.vue
View file @
31fe2001
...
...
@@ -10,29 +10,33 @@
</
template
>
<
script
>
//
import { fetchCurrentUser } from "./service/user";
import
{
fetchCurrentUser
}
from
"./service/user"
;
import
{
getCookie
,
redirectToLogin
}
from
"@/utils/util"
;
export
default
{
mounted
()
{
async
mounted
()
{
console
.
log
(
getCookie
(
'username'
));
if
(
!
getCookie
(
'username'
))
{
this
.
$message
(
'请先登录'
);
redirectToLogin
();
}
// if (this.$store.state.permissions && this.$store.state.userInfo) return;
// const { status, user } = await fetchCurrentUser();
// if (status === "success") {
// this.$store.commit("updateUserInfo", user);
// console.log('user',user)
// this.$store.dispatch("updateUserPermission", { email: user.email });
// // 无奈之举,后期需要重构到提现管理中
// this.$store.dispatch("fetchPermission", {
// appId: "merchant-op-auditing",
// });
// } else {
// redirectToLogin();
// }
if
(
this
.
$store
.
state
.
permissions
&&
this
.
$store
.
state
.
userInfo
)
return
;
let
isDefault
=
window
.
localStorage
.
getItem
(
'isDefault'
);
if
(
isDefault
==
2
)
{
user
.
email
=
getCookie
(
'username'
);
}
const
{
status
,
user
}
=
await
fetchCurrentUser
();
if
(
status
===
"success"
)
{
this
.
$store
.
commit
(
"updateUserInfo"
,
user
);
console
.
log
(
'user'
,
user
)
this
.
$store
.
dispatch
(
"updateUserPermission"
,
{
email
:
user
.
email
});
// 无奈之举,后期需要重构到提现管理中
this
.
$store
.
dispatch
(
"fetchPermission"
,
{
appId
:
"merchant-op-auditing"
,
});
}
else
{
redirectToLogin
();
}
},
computed
:
{
...
...
src/main.js
View file @
31fe2001
...
...
@@ -7,10 +7,11 @@ import ElementPlus from "element-plus";
import
"element-plus/lib/theme-chalk/index.css"
;
import
"dayjs/locale/zh-cn"
;
import
locale
from
"element-plus/lib/locale/lang/zh-cn"
;
import
{
ElMessage
}
from
"element-plus"
;
import
{
fetchCurrentUser
}
from
"./service/user"
;
//
import { fetchCurrentUser } from "./service/user";
import
{
checkPathAuth
}
from
"./utils/authUtil"
;
import
{
redirectToLogin
,
getCookie
}
from
"./utils/util"
;
import
{
redirectToLogin
}
from
"./utils/util"
;
// 处理路由权限
router
.
beforeResolve
(
async
(
to
,
from
,
next
)
=>
{
...
...
@@ -21,28 +22,31 @@ router.beforeResolve(async (to, from, next) => {
if
(
!
store
.
state
.
permissions
&&
!
store
.
state
.
userInfo
)
{
redirectToLogin
();
// location.href = '/'
next
();
}
if
(
!
store
.
state
.
permissions
)
{
this
.
$message
(
'您暂无权限'
);
let
isDefault
=
window
.
localStorage
.
getItem
(
'isDefault'
);
if
(
isDefault
==
2
)
{
user
.
email
=
getCookie
(
'username'
);
}
const
{
status
,
user
}
=
await
fetchCurrentUser
();
if
(
status
===
'success'
)
{
store
.
commit
(
'updateUserInfo'
,
user
);
await
store
.
dispatch
(
'updateUserPermission'
,
{
email
:
user
.
email
})
}
else
{
redirectToLogin
();
return
false
;
}
// next();
// return this.$message("您没有权限");
// return ElMessage.error('您没有权限');
}
// if (!store.state.permissions) {
// ElMessage.error('您没有权限');
// // this.$message('您暂无权限');
// let isDefault = window.localStorage.getItem('isDefault');
// if(isDefault == 2) {
// user.email = getCookie('username');
// }
// const { status, user } = await fetchCurrentUser();
// if (status === 'success') {
// store.commit('updateUserInfo', user);
// await store.dispatch('updateUserPermission', { email: user.email })
// } else {
// redirectToLogin();
// return false;
// }
// }
if
(
!
checkPathAuth
(
to
.
path
))
{
r
outer
.
push
(
'/op/login'
);
return
this
.
$message
(
"您没有权限"
);
r
edirectToLogin
(
);
return
ElMessage
.
error
(
'您没有权限'
);
}
else
{
next
();
}
...
...
src/pages/Withdrawal/Examine/index.less
View file @
31fe2001
.tab-show {
width: 100%;
height: 100%;
//
height: 100%;
padding: 0px 55px;
background-color: white;
.el-tabs__nav-wrap::after {
...
...
src/pages/Withdrawal/components/PageHeader/config.js
View file @
31fe2001
...
...
@@ -6,14 +6,14 @@ const headerConfig = [
{
path
:
"/op/withdrawal/roleManageRole"
,
name
:
"角色管理"
,
requireAuthentication
:
true
,
requiredPermission
:
"role_management"
//
requireAuthentication: true,
//
requiredPermission: "role_management"
},
{
path
:
"/op/withdrawal/user"
,
name
:
"用户管理"
,
requireAuthentication
:
true
,
requiredPermission
:
"user_management"
//
requireAuthentication: true,
//
requiredPermission: "user_management"
}
];
...
...
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