Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
platform
/
fanxing_new
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit bda5e198
authored
Jun 24, 2021
by
潘建波
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
ee4353b9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
47 additions
and
33 deletions
public/js/version.json
src/api/axios.js
src/api/baseUrl.js
src/router/index.js
src/views/Login.vue
src/views/Resetpassword.vue
src/views/ops/batch_upgrade.vue
src/views/ops/user_manage.vue
public/js/version.json
View file @
bda5e19
{
"commit"
:
"f25c960da3c22d3c221e8aea91f7d7a900b0205d"
,
"commitDate"
:
"2021-5-31 14:0"
,
"buildDate"
:
"2021-6-16 11:9"
,
"version"
:
"2.1.0"
,
"info"
:
"合并修改"
}
\ No newline at end of file
{
"commit"
:
"ee4353b91c6bb3ef6b691b251786ce1d00609012"
,
"commitDate"
:
"2021-6-16 17:19"
,
"buildDate"
:
"2021-6-22 13:50"
,
"version"
:
"2.1.0"
,
"info"
:
"code增加token"
}
\ No newline at end of file
src/api/axios.js
View file @
bda5e19
...
...
@@ -79,7 +79,7 @@ service.interceptors.request.use(
service
.
interceptors
.
response
.
use
(
response
=>
{
// endLoading();
if
(
response
.
data
&&
response
.
data
.
ecode
&&
response
.
data
.
ecode
==
401
)
{
localStorage
.
removeItem
(
"atoken"
);
//
localStorage.removeItem("atoken");
router
.
replace
({
path
:
"/"
});
...
...
src/api/baseUrl.js
View file @
bda5e19
...
...
@@ -4,7 +4,7 @@ import axios from "axios";
switch
(
process
.
env
.
NODE_ENV
)
{
case
"development"
:
// baseUrl = "http://192.168.9.234:20080"; // 测试环境url
baseUrl
=
window
.
config
.
https
?
"https://192.168.9.245:20070"
:
"http://192.168.9.2
45
:20080"
;
// 测试环境url
baseUrl
=
window
.
config
.
https
?
"https://192.168.9.245:20070"
:
"http://192.168.9.2
33
:20080"
;
// 测试环境url
// baseUrl = "http://192.168.9.82:8080"; // 测试环境url
// baseUrl = "http://192.168.9.61:8086";
// baseUrl = 'http://vion-panda.51vip.biz:52510';
...
...
src/router/index.js
View file @
bda5e19
...
...
@@ -53,6 +53,9 @@ export const constantRouterMap = [{
},
{
path
:
"/resetpass"
,
name
:
"resetpassword"
,
meta
:{
isopen
:
true
},
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
...
...
src/views/Login.vue
View file @
bda5e19
...
...
@@ -72,8 +72,8 @@
<
script
>
let
particlesConfig
=
require
(
"../assets/js/particles.json"
);
let
versioninfo
=
window
.
config
.
version
let
sha1
=
require
(
'js-sha1'
)
let
versioninfo
=
window
.
config
.
version
;
let
sha1
=
require
(
"js-sha1"
);
import
types
from
"../store/types.js"
;
export
default
{
name
:
"Login"
,
...
...
@@ -97,7 +97,7 @@ export default {
password
:
""
,
showdd
:
true
,
innerHeight
:
0
,
step
:
0
,
step
:
0
,
logintitle
:
""
,
isdd
:
window
.
config
.
isdd
,
webSocketL
:
null
,
...
...
@@ -132,11 +132,12 @@ export default {
},
//兼容处理
login
(
type
)
{
this
.
$api
.
login
.
login
({
username
:
this
.
ruleForm
.
username
,
password
:
window
.
config
.
encrypt
?
sha1
(
this
.
ruleForm
.
password
):
this
.
baseencode
(
this
.
ruleForm
.
password
),
password
:
window
.
config
.
encrypt
?
sha1
(
this
.
ruleForm
.
password
)
:
this
.
baseencode
(
this
.
ruleForm
.
password
),
// password: this.ruleForm.password,
user_type
:
"user"
,
})
...
...
@@ -144,17 +145,18 @@ export default {
if
(
!
res
.
ecode
)
{
this
.
loginMount
(
res
,
"user"
);
}
else
{
if
(
res
.
ecode
==
"1000"
){
this
.
$router
.
push
(
'resetpass'
)
return
false
debugger
;
if
(
res
.
ecode
==
"1000"
)
{
this
.
$router
.
push
(
"/resetpass"
)
}
else
{
this
.
$message
({
type
:
"error"
,
message
:
res
.
enote
,
});
}
this
.
$message
({
type
:
"error"
,
message
:
res
.
enote
,
});
}
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
$message
({
type
:
"error"
,
message
:
err
,
...
...
@@ -191,19 +193,19 @@ export default {
//获取菜单
this
.
$api
.
login
.
getMenus
({
shape
:
"tree"
shape
:
"tree"
,
})
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
localStorage
.
setItem
(
"menu"
,
JSON
.
stringify
(
res
.
menu_tree
[
0
].
children
)
);
this
.
$store
.
dispatch
(
"GetMenuRole"
,
res
.
menu_tree
[
0
].
children
)
.
then
(
r
=>
{
.
then
(
(
r
)
=>
{
this
.
$router
.
push
(
res
.
menu_tree
[
0
].
children
[
0
].
children
[
0
].
path
)
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
err
;
});
});
...
...
@@ -213,27 +215,27 @@ export default {
this
.
$api
.
login
.
algocombs
({
limit
:
""
,
algo_set
:
"video"
algo_set
:
"video"
,
})
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
if
(
!
res
.
ecode
)
{
this
.
$store
.
commit
(
types
.
ALGO
,
res
.
list_data
);
}
})
.
catch
(
err
=>
{});
.
catch
(
(
err
)
=>
{});
},
storeConfList
()
{
this
.
$api
.
login
.
storeconfs
({
offset
:
0
,
limit
:
""
limit
:
""
,
})
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
if
(
!
res
.
ecode
)
{
this
.
$store
.
commit
(
types
.
STORECONF
,
res
.
list_data
);
}
})
.
catch
(
err
=>
{});
.
catch
(
(
err
)
=>
{});
},
getCodeList
()
{
this
.
$api
.
codes
...
...
src/views/Resetpassword.vue
View file @
bda5e19
...
...
@@ -91,7 +91,7 @@ export default {
methods
:
{
submitForm
(
formName
)
{
let
data
=
{
old_pwd
:
window
.
config
.
encrypt
?
sha1
(
this
.
ruleForm
.
password
):
this
.
baseencode
(
this
.
ruleForm
.
password
),
old_pwd
:
window
.
config
.
encrypt
?
sha1
(
this
.
ruleForm
.
oldpassword
):
this
.
baseencode
(
this
.
ruleForm
.
old
password
),
new_pwd
:
window
.
config
.
encrypt
?
sha1
(
this
.
ruleForm
.
newpassword
):
this
.
baseencode
(
this
.
ruleForm
.
newpassword
),
};
...
...
@@ -99,8 +99,16 @@ export default {
if
(
valid
)
{
let
user_unid
=
sessionStorage
.
getItem
(
"user_unid"
);
this
.
$api
.
ops
.
resetPwd
(
data
,
user_unid
).
then
(
res
=>
{
this
.
$logs
.
oplogs
(
res
,
"serv_login"
,
`修改密码`
);
this
.
$router
.
push
(
"/login"
);
if
(
!
res
.
ecode
){
this
.
$logs
.
oplogs
(
res
,
"serv_login"
,
`修改密码`
);
this
.
$router
.
push
(
"/login"
);
}
else
{
this
.
$message
({
type
:
"error"
,
message
:
res
.
enote
});
}
}).
catch
(
err
=>
{
if
(
err
.
response
)
{
this
.
$message
({
...
...
src/views/ops/batch_upgrade.vue
View file @
bda5e19
...
...
@@ -223,7 +223,7 @@ console.log('上传')
this
.
getData
();
},
getDevs
(){
this
.
$api
.
resource
.
devs
(
{}
).
then
(
res
=>
{
this
.
$api
.
resource
.
devs
().
then
(
res
=>
{
if
(
res
.
length
>
0
)
{
this
.
devOpt
=
res
.
map
((
v
,
i
)
=>
{
return
{
...
...
src/views/ops/user_manage.vue
View file @
bda5e19
...
...
@@ -343,7 +343,7 @@ export default {
row
.
user_unid
)
.
then
(
res
=>
{
if
(
res
.
atoken
)
{
if
(
res
.
ecode
==
'200'
)
{
this
.
$message
({
type
:
"success"
,
message
:
"重置密码成功!"
...
...
@@ -352,7 +352,7 @@ export default {
}
else
{
this
.
$message
({
type
:
"error"
,
message
:
"重置密码失败!"
message
:
res
.
enote
});
}
});
...
...
@@ -389,12 +389,13 @@ export default {
})
.
then
(
res
=>
{
if
(
res
.
ecode
==
"200"
||
!
res
.
ecode
)
{
this
.
$api
.
ops
.
bindRole
(
{
role_unid
:
this
.
addForm
.
role_unid
},
res
.
user_unid
res
.
enote
.
user_unid
)
.
then
(
data
=>
{
if
(
!
data
.
ecode
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment