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
19109ed5
Commit
19109ed5
authored
Aug 09, 2021
by
liwenhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:login 空白页
parent
e78ffab3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
37 deletions
+65
-37
RoleList.vue
src/components/Roles/RoleList.vue
+1
-1
index.vue
src/pages/Login/index.vue
+44
-17
manage-role.vue
src/pages/Role/manage-role.vue
+1
-1
manage-role.vue
src/pages/Withdrawal/Role/manage-role.vue
+1
-1
index.js
src/router/Withdrawal/index.js
+11
-11
index.js
src/router/index.js
+7
-6
No files found.
src/components/Roles/RoleList.vue
View file @
19109ed5
...
...
@@ -218,7 +218,7 @@ export default {
});
},
getPermissionsAll
()
{
let
{
email
}
=
this
.
$store
.
state
.
userInfo
;
let
email
=
this
.
$store
.
state
.
userInfo
;
reqGetAll_role_list
(
email
,
this
.
appId
).
then
((
res
)
=>
{
this
.
permissionsAll
=
res
.
permissions
;
});
...
...
src/pages/Login/index.vue
View file @
19109ed5
...
...
@@ -18,14 +18,20 @@
<el-button
@
click=
"login"
>
登录
</el-button>
</div>
<div
class=
"tip"
>
<p>
1. 请使用
一点
邮箱登录,登录密码为当前的邮箱密码。
</p>
<p>
1. 请使用邮箱登录,登录密码为当前的邮箱密码。
</p>
<p>
2. 用户默认无功能权限,请联系管理员开通。
</p>
</div>
</div>
</
template
>
<
script
>
import
{
login
as
reqLogin
}
from
"../../service/user"
;
import
{
createNamespacedHelpers
}
from
'vuex'
const
{
mapActions
}
=
createNamespacedHelpers
(
'login'
)
// import { fetchCurrentUser } from "@/service/user";
import
{
redirectPage
}
from
"@/utils/util"
;
import
{
// getAll_role_list as reqGetAll_role_list,
}
from
"@/service/role"
;
export
default
{
name
:
"Login"
,
data
()
{
...
...
@@ -34,33 +40,55 @@ export default {
email
:
""
,
password
:
""
,
},
permissionsAll
:
[]
};
},
created
()
{
},
created
()
{
},
computed
:
{
},
methods
:
{
...
mapActions
([
'userLogin'
]),
async
login
()
{
const
{
email
,
password
}
=
this
.
userInfo
;
const
{
email
}
=
this
.
userInfo
;
let
validEmail
=
email
.
match
(
/@yidian-inc.com|@linkingcities/
);
if
(
!
email
)
{
console
.
error
(
"请输入用户邮箱"
);
return
;
}
try
{
const
emailAddress
=
email
.
indexOf
(
"@"
)
===
-
1
?
email
+
"@yidian-inc.com"
:
email
;
const
res
=
await
reqLogin
(
emailAddress
,
password
);
if
(
!
res
||
!
res
.
token
)
return
;
}
catch
(
e
)
{
console
.
log
(
e
);
// message.error("登录不成功,请检查登录信息后重试!")
return
this
.
$message
(
"请输入用户邮箱"
);
}
else
if
(
!
validEmail
)
{
return
this
.
$message
(
"请输入合法邮箱"
);
}
this
.
userInfo
.
email
=
email
.
indexOf
(
"@"
)
===
-
1
?
email
+
"@yidian-inc.com"
:
email
;
const
res
=
await
this
.
userLogin
({
payload
:
this
.
userInfo
});
// res && await this.fentchUser()
res
&&
redirectPage
()
// reqGetAll_role_list(email).then(res => {
// this.permissionsAll = res
// console.log('permissionsAll',this.permissionsAll)
// })
// this.$router.push('/')
},
// async fentchUser() {
// if (this.$store.state.permissions && this.$store.state.userInfo) return;
// // const { status, user } = await fetchCurrentUser();
// // if (status === "success") {
// this.$store.commit("updateUserInfo", this.userInfo);
// this.$store.dispatch("updateUserPermission", { email: this.userInfo.email });
// // 无奈之举,后期需要重构到提现管理中
// this.$store.dispatch("fetchPermission", {
// appId: "merchant-op-auditing",
// });
// // }
// }
},
};
</
script
>
<
style
lang=
"less"
scope
>
#login-page {
height: 100
%
;
height: 100
vh
;
display: flex;
flex-direction: column;
justify-content: center;
...
...
@@ -68,7 +96,6 @@ export default {
background: url("../../assets/img/banner1.jpg") center top no-repeat;
background-size: cover;
color: #fff;
.title {
font-size: 40px;
}
...
...
src/pages/Role/manage-role.vue
View file @
19109ed5
...
...
@@ -8,7 +8,7 @@ import Layout from "@/layouts";
import
RoleList
from
"@/components/Roles/RoleList"
;
export
default
{
name
:
'KeepRoleManagement'
,
//
name: 'KeepRoleManagement',
components
:
{
Layout
,
RoleList
...
...
src/pages/Withdrawal/Role/manage-role.vue
View file @
19109ed5
...
...
@@ -12,7 +12,7 @@ import Layout from "../layout";
import
RoleList
from
"../../../components/Roles/RoleList"
;
export
default
{
name
:
"
Keep
RoleManagement"
,
name
:
"RoleManagement"
,
components
:
{
Layout
,
RoleList
,
...
...
src/router/Withdrawal/index.js
View file @
19109ed5
...
...
@@ -19,25 +19,25 @@ const withdrawalRoutes = [
/* webpackChunkName: "Withdrawal" */
"@/pages/Withdrawal/User/userList"
)
},
//角色管理
{
path
:
"/op/withdrawal/role
Add
Role"
,
name
:
"
AddRole
"
,
path
:
"/op/withdrawal/role
Manage
Role"
,
name
:
"
KeepRoleManagement
"
,
component
:
()
=>
import
(
/* webpackChunkName: "Withdrawal" */
"@/pages/Withdrawal/Role/
add
-role"
/* webpackChunkName: "Withdrawal" */
"@/pages/Withdrawal/Role/
manage
-role"
),
meta
:
{
requireAuth
:
true
,
keepAlive
:
true
}
//
meta: {
//
requireAuth: true,
//
keepAlive: true
//
}
},
//角色管理
{
path
:
"/op/withdrawal/role
Manage
Role"
,
name
:
"
withdrawalManage
Role"
,
path
:
"/op/withdrawal/role
Add
Role"
,
name
:
"
Add
Role"
,
component
:
()
=>
import
(
/* webpackChunkName: "Withdrawal" */
"@/pages/Withdrawal/Role/
manage
-role"
/* webpackChunkName: "Withdrawal" */
"@/pages/Withdrawal/Role/
add
-role"
),
meta
:
{
requireAuth
:
true
,
...
...
src/router/index.js
View file @
19109ed5
...
...
@@ -7,8 +7,9 @@ import User from "../pages/User/userList";
// import UserDetail from "../pages/User/user-detail.vue";
// import AddRole from "../pages/Role/add-role.vue";
import
ManageRole
from
"../pages/Role/manage-role.vue"
;
import
RoleDetail
from
"../pages/Role/role-detail.vue"
;
import
ManageRole
from
"../pages/Role/manage-role"
;
// import ManageRole from "@/pages/Withdrawal/Role/manage-role.vue";
import
RoleDetail
from
"../pages/Withdrawal/Role/role-detail.vue"
;
import
goodsRouter
from
"./Goods/index"
;
import
withdrawalRoutes
from
"./Withdrawal/index"
;
import
groupmealRouters
from
"./Groupmeal/index"
;
...
...
@@ -91,11 +92,11 @@ const routes = [
},
{
path
:
"/op/roleManageRole"
,
name
:
"ManageRole"
,
name
:
"
/op/
ManageRole"
,
component
:
ManageRole
,
meta
:
{
requireAuth
:
true
}
//
meta: {
//
requireAuth: true
//
}
},
{
path
:
"/op/roleRoleDetail"
,
...
...
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