Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
techbook
Project
Project
Details
Activity
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
front-end-dev
techbook
Commits
ea9c6379
Commit
ea9c6379
authored
Aug 26, 2019
by
anxixi
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
# Conflicts: # src/router.js
parents
8f050305
aca3247e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
29 deletions
+57
-29
modifyPassword.vue
src/components/authentication/modifyPassword.vue
+1
-1
main.js
src/main.js
+16
-16
router.js
src/router.js
+13
-12
api.js
src/views/workplace/api/api.js
+6
-0
add.vue
src/views/workplace/pages/add.vue
+21
-0
No files found.
src/components/authentication/modifyPassword.vue
View file @
ea9c6379
...
...
@@ -2,7 +2,7 @@
<div
class=
"modifyPwdWrapper"
>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"150px"
class=
"auth-ruleForm"
>
<el-form-item
:label=
"$t('personalAuth.account')+':'"
>
<el-form-item
:label=
"$t('personalAuth.account')+':'"
style=
"text-align: left"
>
<span>
{{
userInfo
.
empAccount
}}
</span>
</el-form-item>
...
...
src/main.js
View file @
ea9c6379
...
...
@@ -78,22 +78,22 @@ router.beforeEach((to, from, next) => {
if
(
to
.
name
==
"emailRegisterCmpt"
){
if
(
i18n
.
locale
==
"zh-CN"
)
router
.
replace
(
'/mobileRegisterCmpt'
);
}
if
(
window
.
localStorage
.
getItem
(
"userInfo"
)
==
null
){
if
(
to
.
name
==
'dashboard'
||
to
.
name
==
'login'
||
to
.
name
==
'mobileLoginCmpt'
||
to
.
name
==
'emailLoginCmpt'
||
to
.
name
==
'mobileRegisterCmpt'
||
to
.
name
==
'emailRegisterCmpt'
||
to
.
name
==
'successCmpt'
||
to
.
name
==
'findPasswordCmpt'
||
to
.
name
==
'modifyPasswordCmpt'
||
to
.
name
==
'passSuccessCmpt'
){
}
else
{
router
.
replace
(
'/login'
);
}
}
else
{
api
.
isLoginAxios
().
then
((
res
)
=>
{
if
(
res
.
code
==
90
){
window
.
localStorage
.
removeItem
(
"userInfo"
);
router
.
replace
(
'/'
);
}
}).
catch
((
err
)
=>
{
this
.
$message
.
error
(
err
)
})
}
//
if(window.localStorage.getItem("userInfo") ==null){
//
if(to.name == 'dashboard' || to.name == 'login' || to.name == 'mobileLoginCmpt'|| to.name == 'emailLoginCmpt'|| to.name == 'mobileRegisterCmpt'|| to.name == 'emailRegisterCmpt'|| to.name == 'successCmpt'||to.name=='findPasswordCmpt'||to.name=='modifyPasswordCmpt'||to.name=='passSuccessCmpt'){
//
//
}else{
//
router.replace('/login');
//
}
//
}else{
//
api.isLoginAxios().then((res)=>{
//
if(res.code==90){
//
window.localStorage.removeItem("userInfo");
//
router.replace('/');
//
}
//
}).catch((err)=>{
//
this.$message.error(err)
//
})
//
}
});
global
.
globalMsg
=
new
Vue
();
...
...
src/router.js
View file @
ea9c6379
...
...
@@ -3,17 +3,18 @@ import Router from 'vue-router'
import
index
from
'./views/index'
;
import
dashboard
from
'./views/index/pages/index'
;
//首页
import
login
from
'./views/loginregister/pages/login'
;
//登录
import
mobileLoginCmpt
from
'./components/login/mobileLoginCmpt'
;
import
emailLoginCmpt
from
'./components/login/emailLoginCmpt'
;
import
mobileRegisterCmpt
from
'./views/loginregister/pages/mobileRegisterCmpt'
;
import
emailRegisterCmpt
from
'./views/loginregister/pages/emailRegisterCmpt'
;
import
completeInfoCmpt
from
'./views/loginregister/pages/completeInfoCmpt'
;
import
successCmpt
from
'./views/loginregister/pages/successCmpt'
;
import
findPasswordCmpt
from
'./views/loginregister/pages/findPasswordCmpt'
;
import
modifyPasswordCmpt
from
'./views/loginregister/pages/modifyPasswordCmpt'
;
import
passSuccessCmpt
from
'./views/loginregister/pages/passSuccessCmpt'
;
import
editAuth
from
'./views/accountmanage/pages/edit'
;
import
ltrIndex
from
'./views/ltrIndex'
;
import
mobileLoginCmpt
from
'./components/login/mobileLoginCmpt'
;
//手机号登录
import
emailLoginCmpt
from
'./components/login/emailLoginCmpt'
;
//邮箱登录
import
mobileRegisterCmpt
from
'./views/loginregister/pages/mobileRegisterCmpt'
;
//手机号注册
import
emailRegisterCmpt
from
'./views/loginregister/pages/emailRegisterCmpt'
;
//邮箱注册
import
completeInfoCmpt
from
'./views/loginregister/pages/completeInfoCmpt'
;
//完善资料
import
successCmpt
from
'./views/loginregister/pages/successCmpt'
;
//成功
import
findPasswordCmpt
from
'./views/loginregister/pages/findPasswordCmpt'
;
//找回密码
import
modifyPasswordCmpt
from
'./views/loginregister/pages/modifyPasswordCmpt'
;
//找回密码-修改密码
import
passSuccessCmpt
from
'./views/loginregister/pages/passSuccessCmpt'
;
//密码修改成功
import
ltrIndex
from
'./views/ltrIndex'
;
//登录后的父级框架
import
editAuth
from
'./views/accountmanage/pages/edit'
;
//个人认证
// import bigBusiness from './views/'
Vue
.
use
(
Router
)
export
default
new
Router
({
...
...
@@ -27,7 +28,7 @@ export default new Router({
path
:
'/'
,
name
:
"dashboard"
,
component
:
dashboard
}
,
}
]
},
{
...
...
src/views/workplace/api/api.js
0 → 100644
View file @
ea9c6379
import
api
from
'../../../api/api'
;
import
Qs
from
'qs'
;
export
default
{
}
\ No newline at end of file
src/views/workplace/pages/add.vue
0 → 100644
View file @
ea9c6379
<
template
>
<div
class=
"loginedWrapper"
>
<div
class=
"breadcrumb"
>
<el-breadcrumb
separator=
"/"
>
<el-breadcrumb-item><a
href=
"/#/editAuth"
>
{{
$t
(
"personalAuth.setAccount"
)
}}
</a></el-breadcrumb-item>
<el-breadcrumb-item
:to=
"
{ path: '/' }">
{{
activeName
==
'first'
?
$t
(
"personalAuth.personalAuth"
):
$t
(
"personalAuth.modifyPwd"
)
}}
</el-breadcrumb-item>
</el-breadcrumb>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
"addRequire"
}
</
script
>
<
style
scoped
>
</
style
>
\ 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