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
7cd87a54
Commit
7cd87a54
authored
Jun 02, 2021
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回退
parent
543c98a6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
8 deletions
+16
-8
index.vue
src/components/tabbar/index.vue
+2
-2
login.vue
src/views/login.vue
+1
-3
commit.vue
src/views/user/commit.vue
+13
-3
No files found.
src/components/tabbar/index.vue
View file @
7cd87a54
<
template
>
<
template
>
<div
class=
"my-tabbar"
>
<div
class=
"my-tabbar"
>
<van-tabbar
v-model=
"activeIndex"
active-color=
"#EE0A24"
route
>
<van-tabbar
v-model=
"activeIndex"
active-color=
"#EE0A24"
route
>
<van-tabbar-item
@
click=
"changeHandle(item.title, userInfo.roleList[0])"
v-for=
"item in iconList"
:to=
"
+userInfo.roleList[0] == 2 && item.title == '观影互动' ||
+userInfo.roleList[0] == 17 && item.title == '学习项目' ? '' : item.url"
:key=
"item.title"
>
<van-tabbar-item
@
click=
"changeHandle(item.title, userInfo.roleList[0])"
v-for=
"item in iconList"
:to=
"+userInfo.roleList[0] == 17 && item.title == '学习项目' ? '' : item.url"
:key=
"item.title"
>
<span>
{{
item
.
title
}}
</span>
<span>
{{
item
.
title
}}
</span>
<template
#
icon=
"props"
>
<template
#
icon=
"props"
>
<img
:src=
"props.active ? item.icon.active : item.icon.inactive"
/>
<img
:src=
"props.active ? item.icon.active : item.icon.inactive"
/>
...
@@ -80,7 +80,7 @@ export default {
...
@@ -80,7 +80,7 @@ export default {
methods
:
{
methods
:
{
changeHandle
(
index1
,
index2
)
{
changeHandle
(
index1
,
index2
)
{
// console.log(index1,index2)
// console.log(index1,index2)
if
(
index1
==
'
观影互动'
&&
index2
==
2
||
index1
==
'
学习项目'
&&
index2
==
17
)
{
if
(
index1
==
'学习项目'
&&
index2
==
17
)
{
this
.
$toast
(
'暂无该权限!'
)
this
.
$toast
(
'暂无该权限!'
)
}
}
}
}
...
...
src/views/login.vue
View file @
7cd87a54
...
@@ -69,10 +69,8 @@ export default {
...
@@ -69,10 +69,8 @@ export default {
sessionStorage
.
setItem
(
"token"
,
data
.
token
);
sessionStorage
.
setItem
(
"token"
,
data
.
token
);
sessionStorage
.
setItem
(
"userInfo"
,
JSON
.
stringify
(
data
.
user
));
sessionStorage
.
setItem
(
"userInfo"
,
JSON
.
stringify
(
data
.
user
));
// let redirectPath = decodeURIComponent(this.$route.fullPath).split('redirect=')[1]
// let redirectPath = decodeURIComponent(this.$route.fullPath).split('redirect=')[1]
if
(
isOpt
==
17
)
{
if
(
isOpt
==
17
||
isOpt
==
2
)
{
this
.
$router
.
push
(
"/commit"
);
this
.
$router
.
push
(
"/commit"
);
}
else
if
(
isOpt
==
2
)
{
this
.
$router
.
push
(
"/learn"
);
}
else
if
(
isOpt1
==
4
)
{
}
else
if
(
isOpt1
==
4
)
{
this
.
$router
.
push
(
"/opt"
);
this
.
$router
.
push
(
"/opt"
);
}
else
{
}
else
{
...
...
src/views/user/commit.vue
View file @
7cd87a54
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
<div
class=
"home"
>
<div
class=
"home"
>
<Header
title=
"观影互动"
/>
<Header
title=
"观影互动"
/>
<div
class=
"commit-container"
>
<div
class=
"commit-container"
>
<van-tabs
type=
"card"
v-model=
"activeTab"
>
<van-tabs
type=
"card"
v-model=
"activeTab"
@
disabled=
"onClickDisabled"
>
<van-tab
title=
"观影互动"
>
<van-tab
title=
"观影互动"
disabled
>
<div
class=
"commit-page"
>
<div
class=
"commit-page"
>
<commit-tab
/>
<commit-tab
/>
</div>
</div>
...
@@ -31,11 +31,21 @@ export default {
...
@@ -31,11 +31,21 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
userInfo
:
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfo'
)),
activeTab
:
1
,
activeTab
:
1
,
};
};
},
},
created
()
{
console
.
log
(
this
.
userInfo
.
roleList
[
0
])
},
mounted
()
{},
mounted
()
{},
methods
:
{},
methods
:
{
onClickDisabled
()
{
if
(
+
this
.
userInfo
.
roleList
[
0
]
===
2
){
this
.
$toast
(
'暂无该权限!'
);
}
}
},
};
};
</
script
>
</
script
>
...
...
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