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
a72891f4
Commit
a72891f4
authored
May 27, 2021
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
限制角色页面
parent
acd48e7c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
978 additions
and
946 deletions
+978
-946
index.vue
src/components/tabbar/index.vue
+98
-89
guide.vue
src/views/guide.vue
+159
-138
login.vue
src/views/login.vue
+169
-169
commitTab.vue
src/views/user/components/commitTab.vue
+552
-550
No files found.
src/components/tabbar/index.vue
View file @
a72891f4
<
template
>
<div
class=
"my-tabbar"
>
<van-tabbar
v-model=
"activeIndex"
active-color=
"#EE0A24"
route
>
<van-tabbar-item
v-for=
"item in iconList"
:to=
"item.url"
:key=
"item.title"
>
<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"
>
<span>
{{
item
.
title
}}
</span>
<template
#
icon=
"props"
>
<img
:src=
"props.active ? item.icon.active : item.icon.inactive"
/>
...
...
@@ -39,6 +39,7 @@ export default {
},
data
()
{
return
{
userInfo
:
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfo'
)),
activeIndex
:
this
.
active
,
iconList
:
[
{
...
...
@@ -75,6 +76,14 @@ export default {
}
]
};
},
methods
:
{
changeHandle
(
index1
,
index2
)
{
// console.log(index1,index2)
if
(
index1
==
'观影互动'
&&
index2
==
2
||
index1
==
'学习项目'
&&
index2
==
17
)
{
this
.
$toast
(
'暂无该权限!'
)
}
}
}
};
</
script
>
...
...
src/views/guide.vue
View file @
a72891f4
...
...
@@ -8,15 +8,17 @@
<van-cell-group>
<van-field
label=
"展板名称:"
v-model=
"panelName"
readonly
/>
</van-cell-group>
<p>
展板导览视频:
</p>
<!--
<embed
type=
"video/mp4"
:src=
"panelVideo"
/>
-->
<van-row>
<van-col
span=
"8"
style=
"margin-top: 50px;"
><div
style=
"vertical-align:middle;font-size:14px;"
>
展板导览视频:
</div></van-col>
<van-col
span=
"12"
>
<!--
<embed
type=
"video/mp4"
:src=
"panelVideo"
/>
-->
<video
placeholder=
"展板导览视频"
controls
width=
"150px"
height=
"100px"
>
<source
:src=
"panelVideo"
type=
"video/mp4"
/>
<source
:src=
"panelVideo"
type=
"video/WebM"
>
</video>
<source
:src=
"panelVideo"
type=
"video/mp4"
/>
<source
:src=
"panelVideo"
type=
"video/WebM"
>
</video></van-col>
</van-row>
</div>
</div>
</div>
...
...
@@ -26,33 +28,52 @@
export
default
{
data
()
{
return
{
url
:
'https://www.baidu.com/h5/guide?
id=1&name=长征之路&video=2'
,
// 扫描者携带的信息参数
url
:
'https://www.baidu.com/h5/guide?
panelId=1&panelName=长征之路&panelVideo=https://www.runoob.com/try/demo_source/movie.mp4'
,
// 扫描者携带的信息参数
panelId
:
''
,
// 展板id
panelName
:
''
,
// 展板名称
panelVideo
:
'https://www.runoob.com/try/demo_source/movie.mp4'
,
// 展板导览视频地址
panelVideo
:
''
,
// 展板导览视频地址
u
:
''
};
},
created
()
{
// var url = window.location.href ; //获取url中"?"符后的字串
// var cs = this.url.split('?')[1]; //获取?之后的参数字符串
//alert(url+'地址');//orderCode=20200721093517378188743943022
// var cc ='';
// var cs2 = '';
// if (cs.length > 0)
// {
// cs = cs.replace('id=', ''); // 去除参数名称
// var cc =cs.split('&')[0];//获取展板id
// var cs3 = cs.split('&')[1];
// var ccs = cs3.replace('name=', '') // 获取展板名称
// var cs1 = cs.split('&')[2];//ocd=20200818103843816416953617735
// var cs2 = cs1.replace('video=', '');//20200818103843816416953617735
// }
// this.panelName = ccs;
// // this.panelVideo = cs2;
// this.panelId = ccs
var
url
=
window
.
location
.
href
;
// 获取url中"?"符后的字串
this
.
u
=
this
.
url
.
split
(
'?'
)[
0
];
//
console
.
log
(
this
.
u
)
var
cs
=
this
.
url
.
split
(
'?'
)[
1
];
// 获取?之后的参数字符串
// alert(url+'地址');//orderCode=20200721093517378188743943022
var
cc
=
''
;
var
cs2
=
''
;
if
(
cs
.
length
>
0
)
{
cs
=
cs
.
replace
(
'panelId='
,
''
);
// 去除参数名称
var
cc
=
cs
.
split
(
'&'
)[
0
];
//获取展板id
var
cs3
=
cs
.
split
(
'&'
)[
1
];
var
ccs
=
cs3
.
replace
(
'panelName='
,
''
)
// 去除参数名称
var
cs1
=
cs
.
split
(
'&'
)[
2
];
// 获取展板名称
var
cs2
=
cs1
.
replace
(
'panelVideo='
,
''
);
// 获取展板导览视频
}
this
.
panelName
=
ccs
;
this
.
panelVideo
=
cs2
;
this
.
panelId
=
cc
this
.
initData
()
},
methods
:
{
initData
()
{
let
vm
=
this
let
param
=
{
id
:
this
.
panelId
,
};
vm
.
$https
(
{
url
:
"screen/statistic"
,
method
:
"get"
,
authType
:
this
.
backToken
,
},
param
).
catch
(
function
(
err
)
{
console
.
log
(
err
);
});
}
}
};
</
script
>
...
...
@@ -65,7 +86,7 @@ export default {
width
:
100%
;
height
:
100%
;
margin
:
0
auto
;
background
:
#
a4171d
;
background
:
#
776d6e
;
&
:before
{
display
:
inline-block
;
content
:
""
;
...
...
@@ -96,7 +117,7 @@ export default {
left
:
24px
;
right
:
24px
;
padding
:
24px
;
background
:
#f
fffff
;
background
:
#f
5f5f5
;
box-shadow
:
0
8px
20px
0
rgba
(
0
,
0
,
0
,
0
.2
);
border-radius
:
8px
;
.login-page-form
{
...
...
src/views/login.vue
View file @
a72891f4
...
...
@@ -64,14 +64,14 @@ export default {
duration
:
5000
})
}
const
isOpt
=
data
.
user
.
type
;
const
isOpt
=
+
data
.
user
.
roleList
[
0
];
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"
);
}
else
if
(
isOpt
==
"2"
)
{
if
(
isOpt
==
17
)
{
this
.
$router
.
push
(
"/commit"
);
}
else
if
(
isOpt
==
2
)
{
this
.
$router
.
push
(
"/learn"
);
}
else
{
this
.
$toast
.
fail
(
"您登录的账号既不是运维账号也不是单位用户账号,不能使用H5的功能"
);
}
...
...
src/views/user/components/commitTab.vue
View file @
a72891f4
...
...
@@ -66,7 +66,7 @@
input-align=
"right"
:rules=
"[
{ pattern: /^[1-9]\d{0,9}$/, message: '请输入正确内容,最多10位数',trigger:'blur'}]"
/>
<
!--
<van-field
<
van-field
required
label=
"管理员账号"
v-model=
"form.name"
...
...
@@ -82,7 +82,7 @@
placeholder=
"请输入管理员密码"
input-align=
"right"
:rules=
"[
{ required: true }]"
/>
-->
/>
</div>
<div
class=
"field-title"
>
<span>
上传视频
</span>
...
...
@@ -164,6 +164,7 @@
</
template
>
<
script
>
import
util
from
"@/utils/index.js"
;
export
default
{
data
()
{
return
{
...
...
@@ -410,6 +411,7 @@ export default {
param
[
key
]
=
this
.
form
[
key
];
}
}
param
.
password
=
util
.
encrypt
(
this
.
form
.
password
),
param
.
images
=
[...
param
.
images
,
...
param
.
videos
];
param
.
images
=
param
.
images
.
join
(
","
);
delete
param
.
videos
;
...
...
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