Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
national_museum_vod-H5
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
fubaole
national_museum_vod-H5
Commits
a0bcb34d
Commit
a0bcb34d
authored
Apr 14, 2021
by
乐宝呗666
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
d723515f
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
10 deletions
+33
-10
request.js
src/config/request.js
+23
-5
index.js
src/router/index.js
+2
-2
login.vue
src/views/login.vue
+3
-2
adminInfo.vue
src/views/user/components/adminInfo.vue
+4
-0
commitTab.vue
src/views/user/components/commitTab.vue
+1
-1
No files found.
src/config/request.js
View file @
a0bcb34d
...
...
@@ -79,9 +79,9 @@ function errorState(status, data) {
}
}
function
successState
()
{
Toast
.
clear
()
//隐藏loading
}
//
function successState() {
//
Toast.clear() //隐藏loading
//
}
const
httpServer
=
(
opts
,
data
,
file
,
timeout
)
=>
{
//如果是不需要登录就可以访问的接口 需要设置opts.open
...
...
@@ -128,8 +128,26 @@ const httpServer = (opts, data, file, timeout) => {
Toast
.
clear
()
clearTimeout
(
markIndex
)
if
(
res
.
status
===
200
)
{
successState
(
res
)
Toast
.
clear
()
//隐藏loading
if
(
res
.
data
.
resultCode
==
'1109'
)
{
Toast
({
message
:
'您的登录过期,请重新登录!'
,
onClose
:
()
=>
{
//这个时候点击确定后清除用户信息
sessionStorage
.
removeItem
(
'backToken'
)
sessionStorage
.
removeItem
(
'userId'
)
router
.
push
({
path
:
'/'
,
query
:
{
redirect
:
router
.
history
.
current
.
fullPath
}
})
}
});
}
else
{
resolve
(
res
)
}
}
else
{
errorState
(
res
.
status
,
res
.
data
)
}
...
...
src/router/index.js
View file @
a0bcb34d
...
...
@@ -4,7 +4,7 @@ Vue.use(VueRouter)
const
routes
=
[
{
path
:
'/'
,
redirect
:
'/commit'
,
redirect
:
'/login'
},
{
path
:
'/screen'
,
...
...
src/views/login.vue
View file @
a0bcb34d
...
...
@@ -59,10 +59,11 @@ export default {
const
isOpt
=
data
.
user
.
type
;
sessionStorage
.
setItem
(
"token"
,
data
.
token
);
sessionStorage
.
setItem
(
"userInfo"
,
JSON
.
stringify
(
data
.
user
));
let
redirectPath
=
decodeURIComponent
(
this
.
$route
.
fullPath
).
split
(
'redirect='
)[
1
]
if
(
isOpt
==
"4"
)
{
this
.
$router
.
push
(
"/opt"
);
this
.
$router
.
push
(
redirectPath
||
"/opt"
);
}
else
if
(
isOpt
==
"2"
)
{
this
.
$router
.
push
(
"/commit"
);
this
.
$router
.
push
(
redirectPath
||
"/commit"
);
}
else
{
this
.
$toast
.
fail
(
"您登录的账号既不是运维账号也不是单位用户账号,不能使用H5的功能"
);
}
...
...
src/views/user/components/adminInfo.vue
View file @
a0bcb34d
...
...
@@ -9,6 +9,10 @@
v-model=
"form.userName"
placeholder=
"请输入管理员姓名"
input-align=
"right"
:rules=
"[
{ required: true, message: '请输入管理员姓名' },
{ pattern: /^\S{1,20}$/, message: '输入内容不能包括空格,且最大长度为20.'}
]"
/>
<van-field
label=
"手机号码"
...
...
src/views/user/components/commitTab.vue
View file @
a0bcb34d
...
...
@@ -61,7 +61,7 @@
v-model=
"form.num"
placeholder=
"请输入观影人数"
input-align=
"right"
:rules=
"[
{ pattern: /^[1-9]\d{
1,9}$/, message: '请输入正确内容,最多10位数'
}]"
:rules=
"[
{ pattern: /^[1-9]\d{
0,9}$/, message: '请输入正确内容,最多10位数',trigger:'blur'
}]"
/>
<van-field
label=
"管理员账号"
...
...
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