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
8f4de510
Commit
8f4de510
authored
Apr 02, 2021
by
乐宝呗666
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改功能
parent
71a3fdcb
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
472 additions
and
1050 deletions
+472
-1050
index.js
src/router/index.js
+3
-3
commit.vue
src/views/commit.vue
+0
-340
login.vue
src/views/login.vue
+1
-1
form.vue
src/views/setTopBoxManage/components/form.vue
+6
-2
success.vue
src/views/success.vue
+54
-0
tosay.vue
src/views/tosay.vue
+0
-346
admin.vue
src/views/user/admin.vue
+28
-16
commit.vue
src/views/user/commit.vue
+24
-48
adminInfo.vue
src/views/user/components/adminInfo.vue
+45
-44
commitTab.vue
src/views/user/components/commitTab.vue
+27
-11
contentTab.vue
src/views/user/components/contentTab.vue
+80
-70
historyTab.vue
src/views/user/components/historyTab.vue
+7
-3
learnContent.vue
src/views/user/components/learnContent.vue
+13
-12
learnDetail.vue
src/views/user/components/learnDetail.vue
+106
-87
editPsd.vue
src/views/user/editPsd.vue
+40
-38
learn.vue
src/views/user/learn.vue
+38
-29
No files found.
src/router/index.js
View file @
8f4de510
...
...
@@ -20,7 +20,7 @@ const routes= [
meta
:
{
title
:
'登录'
},
component
:
()
=>
import
(
'@/views/
setTopBoxManage/
login'
)
component
:
()
=>
import
(
'@/views/login'
)
},
{
path
:
'/success'
,
...
...
@@ -28,7 +28,7 @@ const routes= [
meta
:
{
title
:
'操作成功'
},
component
:
()
=>
import
(
'@/views/s
etTopBoxManage/s
uccess'
)
component
:
()
=>
import
(
'@/views/success'
)
},
{
path
:
'/opt'
,
...
...
@@ -81,7 +81,7 @@ const router = new VueRouter({
})
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
let
user
=
localStorage
.
getItem
(
"token"
);
if
(
!
user
&&
to
.
path
!==
'/login'
)
{
// 通过vuex state获取当前的token是否存在
if
(
!
user
&&
to
.
path
!==
'/login'
&&
to
.
path
!==
'/success'
)
{
// 通过vuex state获取当前的token是否存在
next
({
path
:
'/login'
,
})
...
...
src/views/commit.vue
deleted
100644 → 0
View file @
71a3fdcb
This diff is collapsed.
Click to expand it.
src/views/
setTopBoxManage/
login.vue
→
src/views/login.vue
View file @
8f4de510
...
...
@@ -80,7 +80,7 @@ export default {
.login-container
{
width
:
100%
;
height
:
100%
;
max-width
:
1
024
px
;
max-width
:
1
280
px
;
.login-bg
{
width
:
100%
;
height
:
100%
;
...
...
src/views/setTopBoxManage/components/form.vue
View file @
8f4de510
...
...
@@ -109,8 +109,12 @@ export default {
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
resultCode
===
"200"
)
{
// 调用激活接口
this
.
$router
.
replace
(
"/success"
);
if
(
status
===
'2'
){
this
.
$router
.
replace
({
path
:
"/success"
,
query
:{
txt
:
'激活成功'
}})
}
else
{
this
.
$router
.
replace
({
path
:
"/success"
,
query
:{
txt
:
'上报成功'
}})
}
}
else
{
this
.
$toast
(
res
.
data
.
message
);
}
...
...
src/views/s
etTopBoxManage/s
uccess.vue
→
src/views/success.vue
View file @
8f4de510
<
template
>
<div
class=
"success-container"
>
<img
src=
"images/applets/success.png"
alt=
""
/>
<p>
操作成功
</p>
<p>
{{
txt
}}
</p>
<van-button
type=
"default"
@
click=
"sureBtn"
>
确定
</van-button>
</div>
</
template
>
<
script
>
export
default
{};
export
default
{
data
(){
return
{
txt
:
''
,
url
:
''
}
},
mounted
(){
this
.
txt
=
this
.
$route
.
query
.
txt
||
'操作成功'
this
.
url
=
this
.
$route
.
query
.
url
||
'/commit'
},
methods
:{
sureBtn
(){
this
.
$router
.
push
(
this
.
url
)
}
}
};
</
script
>
<
style
lang=
"scss"
>
.success-container
{
...
...
@@ -22,6 +39,16 @@ export default {};
font-size
:
18px
;
color
:
#333
;
}
.van-button--normal
{
background
:
#a4151d
;
border-radius
:
4px
;
height
:
40px
;
width
:
85%
;
color
:
#fff
;
border
:
none
;
font-size
:
16px
;
margin-top
:
30px
;
}
}
</
style
>
src/views/tosay.vue
deleted
100644 → 0
View file @
71a3fdcb
This diff is collapsed.
Click to expand it.
src/views/user/admin.vue
View file @
8f4de510
...
...
@@ -2,10 +2,18 @@
<div
class=
"admin-conatiner"
>
<Header
title=
"管理员信息"
/>
<ul>
<li
v-for=
"(item,index) in list"
:key=
"index"
@
click=
"goDetail(item)"
>
<span>
{{
item
.
userName
}}
</span>
<img
v-if=
"item.id===currentUserId"
src=
"/images/applets/edit.png"
alt
/>
<img
v-if=
"item.id!==currentUserId"
src=
"/images/applets/detail.png"
alt
/>
<li
v-for=
"(item, index) in list"
:key=
"index"
@
click=
"goDetail(item)"
>
<span>
{{
item
.
userName
}}
</span>
<img
v-if=
"item.id === currentUserId"
src=
"/images/applets/edit.png"
alt
/>
<img
v-if=
"item.id !== currentUserId"
src=
"/images/applets/detail.png"
alt
/>
</li>
</ul>
<my-tabbar
active=
"2"
></my-tabbar>
...
...
@@ -19,7 +27,7 @@ export default {
data
()
{
return
{
list
:
[],
currentUserId
:
JSON
.
parse
(
localStorage
.
getItem
(
"userInfo"
)).
id
currentUserId
:
JSON
.
parse
(
localStorage
.
getItem
(
"userInfo"
)).
id
,
};
},
mounted
()
{
...
...
@@ -32,21 +40,25 @@ export default {
let
param
=
{
_index
:
1
,
_size
:
10
,
type
:
JSON
.
parse
(
localStorage
.
getItem
(
"userInfo"
)).
type
type
:
JSON
.
parse
(
localStorage
.
getItem
(
"userInfo"
)).
type
,
};
vm
.
$https
(
{
url
:
"tUser/getPageList"
,
method
:
"get"
,
authType
:
this
.
backToken
authType
:
this
.
backToken
,
},
param
)
.
then
(
res
=>
{
.
then
((
res
)
=>
{
if
(
res
.
data
.
resultCode
===
"200"
)
{
let
data
=
res
.
data
.
data
;
vm
.
list
=
data
.
records
;
}
else
{
this
.
$toast
(
res
.
data
.
message
);
}
})
.
catch
(
function
(
err
)
{
.
catch
(
function
(
err
)
{
console
.
log
(
err
);
});
},
...
...
@@ -55,17 +67,17 @@ export default {
// 修改页面
this
.
$router
.
push
({
path
:
"/adminInfo"
,
query
:
{
id
:
item
.
id
,
disabled
:
false
}
query
:
{
id
:
item
.
id
,
disabled
:
false
}
,
});
}
else
{
// 详情页面
this
.
$router
.
push
({
path
:
"/adminInfo"
,
query
:
{
id
:
item
.
id
,
disabled
:
true
}
query
:
{
id
:
item
.
id
,
disabled
:
true
}
,
});
}
}
}
}
,
}
,
};
</
script
>
...
...
@@ -73,7 +85,7 @@ export default {
.admin-conatiner
{
width
:
100%
;
height
:
100vh
;
padding
:
50px
16
px
60px
;
padding
:
50px
24
px
60px
;
display
:
flex
;
flex-direction
:
column
;
box-sizing
:
border-box
;
...
...
src/views/user/commit.vue
View file @
8f4de510
<
template
>
<div
class=
"home"
>
<Header
title=
"观影互动"
/>
<Header
title=
"观影互动"
/>
<div
class=
"commit-container"
>
<van-tabs
type=
"card"
v-model=
"activeTab"
>
<van-tab
title=
"观影互动"
>
<div
class=
"commit-page"
>
<commit-tab
@
updateActive=
"updateActive"
/>
<commit-tab
@
updateActive=
"updateActive"
/>
</div>
</van-tab>
<van-tab
title=
"互动历史"
>
...
...
@@ -20,58 +20,31 @@
</
template
>
<
script
>
import
Header
from
'@/components/Header/index.vue'
import
commitTab
from
'./components/commitTab.vue'
import
historyTab
from
'./components/historyTab.vue'
import
Header
from
"@/components/Header/index.vue"
;
import
commitTab
from
"./components/commitTab.vue"
;
import
historyTab
from
"./components/historyTab.vue"
;
export
default
{
components
:{
components
:
{
Header
,
commitTab
,
historyTab
historyTab
,
},
data
()
{
return
{
activeTab
:
1
,
form
:
{},
cellIcon
:
'/images/applets/date.png'
,
cellIcon
:
"/images/applets/date.png"
,
show
:
false
,
fileList
:
[],
imgFileList
:
[]
imgFileList
:
[]
,
};
},
mounted
()
{},
methods
:
{
updateActive
(
active
){
this
.
activeTab
=
active
updateActive
(
active
)
{
this
.
activeTab
=
active
;
},
onOversize
(
file
)
{
console
.
log
(
file
);
this
.
$toast
(
"文件大小不能超过 500kb"
);
},
// 打开日历
onDisplay
()
{
this
.
show
=
true
;
},
// 关闭日历
onClose
()
{
this
.
show
=
false
;
},
// 确认日历
onConfirm
(
event
)
{
this
.
show
=
false
;
this
.
form
.
studyTime
=
this
.
formatDate
(
event
);
},
// 格式化日历
formatDate
(
date
)
{
date
=
new
Date
(
date
);
return
`
${
date
.
getFullYear
()}
/
${
date
.
getMonth
()
+
1
}
/
${
date
.
getDate
()}
`
;
},
// 提交数据
onSubmit
()
{
console
.
log
(
this
.
form
);
this
.
$toast
.
success
(
"提交成功"
);
}
}
};
</
script
>
...
...
@@ -79,32 +52,35 @@ export default {
.home
{
width
:
100%
;
height
:
100vh
;
padding
:
50px
16px
60
px
;
padding
:
60px
16
px
;
display
:
flex
;
flex-direction
:
column
;
box-sizing
:
border-box
;
.commit-container
{
height
:
100%
;
/
deep
/
.van-tabs--card
>
.van-tabs__wrap
{
/
deep
/
.van-tabs--card
>
.van-tabs__wrap
{
height
:
40px
;
.van-tabs__nav
{
background
:
rgba
(
164
,
21
,
29
,
0
.1
);
}
.van-tabs__nav--card
{
margin
:
0
;
height
:
40px
;
border-top-left-radius
:
8px
;
border-top-right-radius
:
8px
;
border
:
1px
solid
#
A4151D
;
border
:
1px
solid
#
a4151d
;
.van-tab
{
color
:
#
A4151D
;
border-right
:
1px
solid
#
A4151D
;
color
:
#
a4151d
;
border-right
:
1px
solid
#
a4151d
;
&
.van-tab--active
{
color
:
#fff
;
background-color
:
#
A4151D
;
background-color
:
#
a4151d
;
}
&
:last-child
{
border-top-right-radius
:
8px
;
border-top-right-radius
:
8px
;
}
&
:first-child
{
border-top-left-radius
:
8px
;
border-top-left-radius
:
8px
;
}
}
}
...
...
src/views/user/components/adminInfo.vue
View file @
8f4de510
<
template
>
<div
class=
"admin-detail-content"
>
<Header
title=
"管理员详情"
/>
<Header
title=
"管理员详情"
/>
<div
class=
"input-box"
>
<van-field
label=
"管理员姓名"
...
...
@@ -49,93 +49,95 @@
</
template
>
<
script
>
import
Header
from
'@/components/Header/index.vue'
import
Header
from
"@/components/Header/index.vue"
;
export
default
{
components
:
{
Header
},
components
:
{
Header
},
data
()
{
return
{
disabled
:
false
,
form
:
{}
form
:
{}
,
};
},
mounted
()
{
this
.
adminId
=
this
.
$route
.
query
.
id
;
// 查询管理员信息
if
(
this
.
$route
.
query
.
disabled
===
"true"
)
{
console
.
log
(
"查看"
);
this
.
disabled
=
true
;
this
.
disabled
=
true
// 新增
}
else
{
// 修改
console
.
log
(
"修改"
);
this
.
disabled
=
false
;
this
.
disabled
=
false
}
this
.
getUserInfo
()
this
.
getUserInfo
()
;
},
methods
:
{
getUserInfo
(){
let
vm
=
this
;
getUserInfo
()
{
let
vm
=
this
let
param
=
{
id
:
this
.
adminId
id
:
this
.
adminId
,
};
vm
.
$https
(
{
url
:
"tUser/getById"
,
method
:
"get"
,
authType
:
this
.
backToken
},
param
)
.
then
(
res
=>
{
if
(
res
.
data
.
resultCode
===
'200'
){
this
.
form
=
res
.
data
.
data
;
console
.
log
(
this
.
form
)
}
else
{
authType
:
this
.
backToken
,
},
param
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
resultCode
===
"200"
)
{
this
.
form
=
res
.
data
.
data
}
else
{
this
.
$toast
(
res
.
data
.
message
)
}
})
.
catch
(
function
(
err
)
{
.
catch
(
function
(
err
)
{
console
.
log
(
err
);
});
},
onCancel
()
{
this
.
$router
.
go
(
-
1
)
;
this
.
$router
.
go
(
-
1
)
},
// 提交数据
onSubmit
()
{
console
.
log
(
this
.
form
)
;
let
vm
=
this
;
let
param
=
{}
;
console
.
log
(
this
.
form
)
let
vm
=
this
let
param
=
{}
for
(
let
key
in
this
.
form
)
{
if
(
this
.
form
[
key
])
{
param
[
key
]
=
this
.
form
[
key
];
}
}
console
.
log
(
param
)
vm
.
$https
(
{
url
:
"tUser/update"
,
method
:
"put"
,
authType
:
this
.
backToken
},
param
)
.
then
(
res
=>
{
if
(
res
.
data
.
resultCode
===
'200'
){
authType
:
this
.
backToken
,
},
param
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
resultCode
===
"200"
)
{
this
.
form
=
res
.
data
.
data
;
this
.
$toast
.
success
(
"信息修改成功"
);
this
.
$router
.
replace
(
'/admin'
)
}
else
{
this
.
$toast
(
res
.
data
.
message
)
this
.
$router
.
replace
({
path
:
"/success"
,
query
:
{
txt
:
"信息修改成功"
,
url
:
"/admin"
},
});
}
else
{
this
.
$toast
(
res
.
data
.
message
);
}
})
.
catch
(
function
(
err
)
{
.
catch
(
function
(
err
)
{
console
.
log
(
err
);
});
}
}
}
,
}
,
};
</
script
>
<
style
lang=
"scss"
scoped
>
.admin-detail-content
{
padding
:
50px
16
px
0
;
padding
:
50px
24
px
0
;
// height: calc(100% - 150px);
overflow-y
:
auto
;
.input-box
{
...
...
@@ -151,7 +153,7 @@ export default {
}
}
.admin-detail-button
{
padding
:
0
40
px
;
padding
:
0
24
px
;
box-sizing
:
border-box
;
width
:
100%
;
margin
:
0
auto
;
...
...
@@ -175,12 +177,11 @@ export default {
color
:
#b40011
;
}
}
.cancel
{
.van-button--normal
{
.cancel
{
.van-button--normal
{
width
:
100%
;
}
}
}
.van-field__control
,
.van-cell__value
{
color
:
#333
;
...
...
src/views/user/components/commitTab.vue
View file @
8f4de510
...
...
@@ -110,6 +110,7 @@
v-model=
"imgFileList"
multiple
:after-read=
"uploadImg"
:before-delete=
"deleteImg"
>
<div
class=
"avatar-plus"
>
<span>
+
</span>
...
...
@@ -177,7 +178,6 @@ export default {
})
.
then
((
res
)
=>
{
if
(
res
.
data
.
resultCode
===
"200"
)
{
console
.
log
(
res
.
data
.
data
);
vm
.
boardList
=
res
.
data
.
data
;
vm
.
boardNameList
=
res
.
data
.
data
.
map
((
item
)
=>
item
.
name
);
}
...
...
@@ -186,6 +186,7 @@ export default {
console
.
log
(
err
);
});
},
// 下拉框确认按钮
onConfirmBoard
(
value
,
index
)
{
this
.
form
.
boardName
=
value
;
this
.
form
.
boardId
=
this
.
boardList
[
index
].
id
;
...
...
@@ -257,10 +258,13 @@ export default {
}
return
`
${
value
}
分`
;
},
// 上传图片
uploadImg
(
file
)
{
let
vm
=
this
;
// if(Array.isArray(file)){}
const
param
=
new
FormData
();
param
.
append
(
"file"
,
file
.
file
);
console
.
log
(
file
)
vm
.
$https
(
{
url
:
"file/image/upload"
,
...
...
@@ -270,12 +274,17 @@ export default {
param
)
.
then
((
res
)
=>
{
this
.
form
.
images
.
push
(
res
.
data
.
url
);
if
(
res
.
data
.
resultCode
===
'200'
){
this
.
form
.
images
.
push
(
res
.
data
.
data
.
url
);
}
else
{
this
.
$toast
(
res
.
data
.
message
)
}
})
.
catch
(
function
(
err
)
{
console
.
log
(
err
);
});
},
// 上传视频
uploadVideo
(
file
)
{
let
vm
=
this
;
const
param
=
new
FormData
();
...
...
@@ -289,12 +298,21 @@ export default {
param
)
.
then
((
res
)
=>
{
this
.
form
.
videos
.
push
(...
res
.
data
.
urlList
);
if
(
res
.
data
.
resultCode
===
'200'
){
this
.
form
.
videos
.
push
(...
res
.
data
.
data
.
urlList
);
}
else
{
this
.
$toast
(
res
.
data
.
message
)
}
})
.
catch
(
function
(
err
)
{
console
.
log
(
err
);
});
},
deleteImg
(
file
,
detail
){
this
.
form
.
images
.
splice
(
detail
.
index
,
1
)
return
true
},
// 提交数据
onSubmit
()
{
let
vm
=
this
;
...
...
@@ -318,15 +336,13 @@ export default {
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
resultCode
===
"200"
)
{
this
.
$toast
.
success
(
"提交成功"
);
// this.$emit('updateActive',1)
this
.
$router
.
replace
(
"/success"
);
this
.
$router
.
replace
({
path
:
"/success"
,
query
:{
txt
:
'提交成功'
,
url
:
'/commit'
}})
}
else
{
this
.
$toast
(
res
.
data
.
message
)
;
this
.
$toast
(
res
.
data
.
message
)
}
})
.
catch
(
function
(
err
)
{
console
.
log
(
err
)
;
console
.
log
(
err
)
});
},
},
...
...
@@ -335,7 +351,7 @@ export default {
<
style
lang=
"scss"
scoped
>
.commit-page-content
{
padding
:
24px
12
px
;
padding
:
24px
20
px
;
height
:
calc
(
100%
-
200px
);
overflow-y
:
auto
;
.field-title
{
...
...
@@ -345,7 +361,6 @@ export default {
color
:
#333
;
font-size
:
16px
;
line-height
:
20px
;
padding-left
:
16px
;
&
:before
{
content
:
""
;
height
:
16px
;
...
...
@@ -354,7 +369,7 @@ export default {
display
:
inline-block
;
background
:
#a4151d
;
position
:
absolute
;
left
:
0
;
left
:
-20px
;
top
:
2px
;
}
}
...
...
@@ -405,6 +420,7 @@ export default {
/
deep
/
.field-textarea
{
min-height
:
80px
;
padding
:
0
;
.van-field__value
{
background-color
:
#f5f5f5
;
}
...
...
src/views/user/components/contentTab.vue
View file @
8f4de510
...
...
@@ -21,23 +21,29 @@
@
load=
"onLoad"
offset=
"50"
>
<van-cell
v-for=
"(item,
index) in tableData"
:key=
"index"
>
<van-cell
v-for=
"(item,
index) in tableData"
:key=
"index"
>
<van-swipe-cell
:stop-propagation=
"true"
>
<van-card
:title=
"item.name"
:thumb=
"item.cover"
@
click=
"goDetail(item)"
/>
<van-card
:title=
"item.name"
:thumb=
"item.cover"
@
click=
"goDetail(item)"
/>
<template
#
right
>
<van-button
@
click=
"optFn(item)"
square
:text=
"active?'启用':
'删除'"
:text=
"active ? '启用' :
'删除'"
type=
"danger"
:class=
"
{'delete-button':active===0,'enable-button':active===1}"
:class=
"
{
'delete-button': active === 0,
'enable-button': active === 1,
}"
/>
</
template
>
</van-swipe-cell>
</van-cell>
</van-list>
</van-pull-refresh>
</div>
</div>
</div>
...
...
@@ -45,67 +51,69 @@
<
script
>
export
default
{
props
:
[
"active"
,
"proId"
],
props
:
[
"active"
,
"proId"
],
data
()
{
return
{
searchVal
:
""
,
searchVal
:
""
,
pageNum
:
1
,
pageSize
:
8
,
tableData
:[],
tableData
:
[],
loading
:
false
,
finished
:
false
,
refreshing
:
false
,
flag
:
true
,
flag
:
true
,
};
},
watch
:{
"active"
(
val
,
oldVal
)
{
this
.
onRefresh
()
}
watch
:
{
active
()
{
this
.
onRefresh
()
;
}
,
},
mounted
()
{
this
.
getList
()
this
.
getList
()
;
},
methods
:
{
// 获得数据接口
getList
()
{
let
vm
=
this
;
let
param
=
{
_index
:
this
.
pageNum
,
_size
:
this
.
pageSize
,
isPublished
:
this
.
active
!==
1
,
learningProjectId
:
this
.
proId
,
nameOrCode
:
this
.
searchVal
_index
:
this
.
pageNum
,
_size
:
this
.
pageSize
,
isPublished
:
this
.
active
!==
1
,
learningProjectId
:
this
.
proId
,
nameOrCode
:
this
.
searchVal
,
};
vm
.
$https
(
{
url
:
"learningContent/getPageList"
,
method
:
"post"
,
authType
:
this
.
backToken
authType
:
this
.
backToken
,
},
vm
.
$qs
.
stringify
(
param
)
).
then
(
res
=>
{
if
(
res
.
data
.
resultCode
===
'200'
){
vm
.
loading
=
false
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
resultCode
===
"200"
)
{
vm
.
loading
=
false
;
let
data
=
res
.
data
.
data
;
vm
.
tableData
=
vm
.
flag
?
data
.
records
:
vm
.
tableData
.
concat
(
data
.
records
)
vm
.
flag
=
false
vm
.
tableData
=
vm
.
flag
?
data
.
records
:
vm
.
tableData
.
concat
(
data
.
records
);
vm
.
flag
=
false
;
vm
.
refreshing
=
false
;
vm
.
pageNum
=
vm
.
pageNum
+
1
vm
.
finished
=
data
.
records
.
length
<
vm
.
pageSize
?
true
:
false
vm
.
tableData
=
[...
vm
.
tableData
]
}
else
{
vm
.
$
message
({
type
:
'error'
,
message
:
res
.
data
.
message
})
vm
.
pageNum
=
vm
.
pageNum
+
1
;
vm
.
finished
=
data
.
records
.
length
<
vm
.
pageSize
;
vm
.
tableData
=
[...
vm
.
tableData
]
;
}
else
{
vm
.
$
toast
(
res
.
data
.
message
);
}
})
.
catch
(
function
(
err
)
{
.
catch
(
function
(
err
)
{
console
.
log
(
err
);
})
})
;
},
// 列表的load上拉加载事件
onLoad
()
{
if
(
!
this
.
flag
)
{
if
(
!
this
.
flag
)
{
console
.
log
(
"加载数据"
);
this
.
loading
=
true
;
this
.
flag
=
false
;
...
...
@@ -122,47 +130,49 @@ export default {
},
optFn
(
item
)
{
if
(
this
.
active
===
1
)
{
this
.
changeStatus
(
true
,
item
.
id
)
this
.
changeStatus
(
true
,
item
.
id
);
}
else
{
this
.
changeStatus
(
false
,
item
.
id
)
this
.
changeStatus
(
false
,
item
.
id
);
}
},
// 启用 禁用
changeStatus
(
flag
,
id
)
{
changeStatus
(
flag
,
id
)
{
let
vm
=
this
;
let
param
=
{
id
:
id
,
isPublish
:
flag
id
:
id
,
isPublish
:
flag
,
};
vm
.
$https
(
{
url
:
`learningContent/enable/
${
id
}
`
,
method
:
"put"
,
authType
:
this
.
backToken
},
vm
.
$qs
.
stringify
(
param
))
.
then
(
res
=>
{
if
(
res
.
data
.
resultCode
===
'200'
){
this
.
$toast
(
res
.
data
.
message
)
this
.
onRefresh
()
}
else
{
this
.
$toast
(
res
.
data
.
message
)
authType
:
this
.
backToken
,
},
vm
.
$qs
.
stringify
(
param
)
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
resultCode
===
"200"
)
{
this
.
$toast
(
res
.
data
.
message
);
this
.
onRefresh
();
}
else
{
this
.
$toast
(
res
.
data
.
message
);
}
})
.
catch
(
function
(
err
)
{
.
catch
(
function
(
err
)
{
console
.
log
(
err
);
});
},
goDetail
(
item
)
{
this
.
$router
.
push
({
path
:
'/learnDetail'
,
query
:{
id
:
item
.
id
}})
}
}
this
.
$router
.
push
({
path
:
"/learnDetail"
,
query
:
{
id
:
item
.
id
}
});
}
,
}
,
};
</
script
>
<
style
lang=
"scss"
scoped
>
.learn-detail-content
{
height
:
calc
(
100vh
-
100px
);
.page-wrapper
{
.page-wrapper
{
height
:
100%
;
}
.van-search
{
...
...
src/views/user/components/historyTab.vue
View file @
8f4de510
...
...
@@ -127,7 +127,7 @@ export default {
vm
.
finished
=
data
.
records
.
length
<
vm
.
pageSize
?
true
:
false
vm
.
tableData
=
[...
vm
.
tableData
]
}
else
{
vm
.
$
message
({
type
:
'error'
,
message
:
res
.
data
.
message
}
)
vm
.
$
toast
(
res
.
data
.
message
)
}
})
...
...
@@ -158,7 +158,7 @@ export default {
<
style
lang=
"scss"
scoped
>
.history-page-content
{
padding
:
24px
12
px
;
padding
:
24px
0
px
;
height
:
calc
(
100%
-
200px
);
overflow-y
:
auto
;
.van-pull-refresh
{
...
...
@@ -168,12 +168,15 @@ export default {
padding-left
:
0
;
padding-right
:
0
;
}
/
deep
/
.van-collapse-item__title
{
font-size
:
16px
;
}
.
van-hairline--top-bottom
:
:
after
{
border-width
:
0
;
}
.field-title
{
position
:
relative
;
// padding-bottom: 20
px;
font-size
:
16
px
;
span
{
color
:
#333
;
font-size
:
16px
;
...
...
@@ -193,6 +196,7 @@ export default {
}
.author
{
float
:
right
;
margin-right
:
20px
;
}
.content
{
.learn-title
{
...
...
src/views/user/components/learnContent.vue
View file @
8f4de510
<
template
>
<div
class=
"learn-content-container"
>
<Header
title=
"学习内容"
/>
<Header
title=
"学习内容"
/>
<div
class=
"content"
>
<van-tabs
type=
"card"
v-model=
"activeTab"
>
<van-tab
title=
"启用列表"
>
<content-tab
:active=
"activeTab"
:proId=
"proId"
/>
<content-tab
:active=
"activeTab"
:proId=
"proId"
/>
</van-tab>
<van-tab
title=
"禁用列表"
>
<content-tab
:active=
"activeTab"
:proId=
"proId"
/>
<content-tab
:active=
"activeTab"
:proId=
"proId"
/>
</van-tab>
</van-tabs>
</div>
</div>
</
template
>
<
script
>
import
contentTab
from
'./contentTab.vue'
import
Header
from
'@/components/Header/index.vue'
import
contentTab
from
"./contentTab.vue"
;
import
Header
from
"@/components/Header/index.vue"
;
export
default
{
components
:{
Header
,
contentTab
},
components
:
{
Header
,
contentTab
},
data
()
{
return
{
activeTab
:
0
,
proId
:
''
proId
:
""
,
};
},
mounted
()
{
this
.
proId
=
this
.
$route
.
query
.
id
;
},
methods
:
{
}
methods
:
{},
};
</
script
>
...
...
@@ -38,13 +36,16 @@ export default {
.learn-content-container
{
width
:
100%
;
height
:
100vh
;
padding
:
5
0px
16px
16px
;
padding
:
6
0px
16px
16px
;
box-sizing
:
border-box
;
.content
{
height
:
calc
(
100vh
-
66px
);
}
/
deep
/
.van-tabs--card
>
.van-tabs__wrap
{
height
:
40px
;
.van-tabs__nav
{
background
:
rgba
(
164
,
21
,
29
,
0
.1
);
}
.van-tabs__nav--card
{
margin
:
0
;
height
:
40px
;
...
...
src/views/user/components/learnDetail.vue
View file @
8f4de510
<
template
>
<div
class=
"learn-detail-page-content"
>
<Header
title=
"学习内容详情"
/>
<Header
title=
"学习内容详情"
/>
<div
class=
"page-wrapper"
>
<div
class=
"title-content"
>
<div
class=
"row-body"
>
<div
class=
"title-label"
>
学习内容名称
</div>
<div
class=
"title-body"
>
{{
list
.
name
}}
</div>
<div
class=
"title-body"
>
{{
list
.
name
}}
</div>
</div>
<div
class=
"row-body"
>
<div
class=
"title-label"
>
学习内容宣传图
</div>
<div
class=
"title-body"
>
<img
:src=
"list.cover"
alt=
""
>
<img
:src=
"list.cover"
alt=
""
/
>
</div>
</div>
</div>
<van-collapse
v-model=
"activeNames"
accordion
>
<van-collapse-item
:name=
"item.id"
:title=
"item.name"
v-for=
"(item,index) in list.exhibitionBoardList"
:key=
"index"
>
<van-collapse-item
:name=
"item.id"
:title=
"item.name"
v-for=
"(item, index) in list.exhibitionBoardList"
:key=
"index"
>
<div
class=
"content"
>
<div
class=
"row-body"
>
<div
class=
"title-label"
>
展板版权方
</div>
<div
class=
"title-body"
>
{{
item
.
assetCopyrightOwnerName
}}
</div>
<div
class=
"title-body"
>
{{
item
.
assetCopyrightOwnerName
}}
</div>
</div>
<div
class=
"row-body"
>
<div
class=
"title-label"
>
展板宣传图
</div>
<div
class=
"title-body"
>
<img
:src=
"item.cover"
alt=
""
>
<img
:src=
"item.cover"
alt=
""
/
>
</div>
</div>
<div
class=
"detail-body"
>
<div
class=
"learn-title"
>
展板简介
</div>
<div
class=
"learn-body textarea"
>
{{
item
.
remarks
}}
{{
item
.
remarks
}}
</div>
</div>
<div
class=
"detail-body"
>
<div
class=
"learn-title"
>
展板视频
</div>
<div
class=
"learn-body"
>
<span
class=
"file-box"
v-for=
"(s,i) in item.videoUrl"
:key=
"i"
>
<video
controls
width=
'100%'
height=
'100%'
poster=
"images/applets/video.png"
>
<span
class=
"file-box"
v-for=
"(s, i) in item.videoUrl"
:key=
"i"
>
<video
controls
width=
"100%"
height=
"100%"
poster=
"images/applets/video.png"
>
<source
:src=
"s.fileUrl"
/>
</video>
<span>
{{
s
.
fileName
}}
</span>
<span>
{{
s
.
fileName
}}
</span>
</span>
</div>
</div>
<div
class=
"detail-body"
>
<div
class=
"learn-title"
>
展板音频
</div>
<div
class=
"learn-body"
>
<span
class=
"file-box"
v-for=
"(s,i) in item.guideAudioUrl"
:key=
"i"
>
<audio
controls
width=
'100%'
height=
'100%'
poster=
"images/applets/audio.png"
>
<span
class=
"file-box"
v-for=
"(s, i) in item.guideAudioUrl"
:key=
"i"
>
<audio
controls
width=
"100%"
height=
"100%"
poster=
"images/applets/audio.png"
>
<source
:src=
"s.fileUrl"
/>
</audio>
<span>
{{
s
.
fileName
}}
</span>
<span>
{{
s
.
fileName
}}
</span>
</span>
</div>
</div>
...
...
@@ -65,49 +83,51 @@
</
template
>
<
script
>
import
Header
from
'@/components/Header/index.vue'
import
Header
from
"@/components/Header/index.vue"
;
export
default
{
components
:
{
Header
},
components
:
{
Header
},
data
()
{
return
{
activeNames
:
[],
list
:[]
list
:
[],
};
},
mounted
()
{
this
.
id
=
this
.
$route
.
query
.
id
;
this
.
getContentInfo
()
this
.
getContentInfo
()
;
},
methods
:
{
// 获取详情
getContentInfo
(){
getContentInfo
()
{
let
vm
=
this
;
let
param
=
{
id
:
this
.
id
id
:
this
.
id
,
};
vm
.
$https
(
{
url
:
`learningContent/get/
${
this
.
id
}
`
,
method
:
"get"
,
authType
:
this
.
backToken
},
param
)
.
then
(
res
=>
{
if
(
res
.
data
.
resultCode
===
'200'
){
authType
:
this
.
backToken
,
},
param
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
resultCode
===
"200"
)
{
this
.
list
=
res
.
data
.
data
;
this
.
activeNames
=
this
.
list
.
exhibitionBoardList
[
0
].
id
this
.
list
.
exhibitionBoardList
.
forEach
(
item
=>
{
item
.
videoUrl
=
JSON
.
parse
(
item
.
videoUrl
)
item
.
guideAudioUrl
=
JSON
.
parse
(
item
.
guideAudioUrl
)
})
}
else
{
this
.
$toast
(
res
.
data
.
message
)
this
.
activeNames
=
this
.
list
.
exhibitionBoardList
[
0
].
id
;
this
.
list
.
exhibitionBoardList
.
forEach
(
(
item
)
=>
{
item
.
videoUrl
=
JSON
.
parse
(
item
.
videoUrl
);
item
.
guideAudioUrl
=
JSON
.
parse
(
item
.
guideAudioUrl
);
})
;
}
else
{
this
.
$toast
(
res
.
data
.
message
)
;
}
})
.
catch
(
function
(
err
)
{
.
catch
(
function
(
err
)
{
console
.
log
(
err
);
});
},
}
}
,
};
</
script
>
...
...
@@ -161,7 +181,7 @@ export default {
.detail-body
{
margin-bottom
:
20px
;
.learn-body
{
.learn-body
{
display
:
flex
;
flex-wrap
:
wrap
;
padding-bottom
:
12px
;
...
...
@@ -183,7 +203,6 @@ export default {
color
:
#333
;
}
}
}
}
</
style
>
\ No newline at end of file
src/views/user/editPsd.vue
View file @
8f4de510
<
template
>
<div
class=
"edit-psd-conatiner"
>
<Header
title=
"修改密码"
/>
<Header
title=
"修改密码"
/>
<div
class=
"edit-container"
>
<van-form
@
submit=
"onSubmit"
>
<div
class=
"input-box"
>
...
...
@@ -17,7 +17,7 @@
v-model=
"form.oldPassWord"
placeholder=
"请输入当前密码"
input-align=
"right"
:rules=
"[
{ required: true}]"
:rules=
"[
{ required: true
}]"
/>
<van-field
label=
"新密码"
...
...
@@ -25,18 +25,18 @@
v-model=
"form.password"
placeholder=
"请输入新密码"
input-align=
"right"
:rules=
"[
{ required: true}]"
:rules=
"[
{ required: true
}]"
/>
<van-field
label=
"再次输入新密码"
v-model=
"form.againPsd"
placeholder=
"请再次输入新密码"
input-align=
"right"
:rules=
"[
{ required: true}]"
:rules=
"[
{ required: true
}]"
/>
</div>
<div
class=
"admin-detail-button"
>
<
van-button
type=
"default"
plain
native-type=
"button"
@
click=
"onCancle"
>
取消
</van-button
>
<
!--
<van-button
type=
"default"
plain
native-type=
"button"
@
click=
"onCancle"
>
取消
</van-button>
--
>
<van-button
type=
"default"
native-type=
"submit"
>
提交
</van-button>
</div>
</van-form>
...
...
@@ -46,14 +46,14 @@
</
template
>
<
script
>
import
Header
from
'@/components/Header/index.vue'
import
Header
from
"@/components/Header/index.vue"
;
export
default
{
components
:
{
Header
},
components
:
{
Header
},
data
()
{
return
{
form
:
{
username
:
JSON
.
parse
(
localStorage
.
getItem
(
'userInfo'
)).
userName
}
username
:
JSON
.
parse
(
localStorage
.
getItem
(
"userInfo"
)).
userName
,
}
,
};
},
mounted
()
{
...
...
@@ -61,15 +61,15 @@ export default {
},
methods
:
{
onCancle
()
{
this
.
form
=
{
username
:
JSON
.
parse
(
localStorage
.
getItem
(
'userInfo'
)).
userName
}
this
.
form
=
{
username
:
JSON
.
parse
(
localStorage
.
getItem
(
"userInfo"
)).
userName
,
}
;
},
// 提交数据
onSubmit
()
{
if
(
this
.
form
.
password
!==
this
.
form
.
againPsd
)
{
this
.
$toast
(
'两次输入的密码不一致'
)
return
false
if
(
this
.
form
.
password
!==
this
.
form
.
againPsd
)
{
this
.
$toast
(
"两次输入的密码不一致"
);
return
false
;
}
let
vm
=
this
;
let
param
=
{
...
...
@@ -80,28 +80,30 @@ export default {
{
url
:
"tUser/editPwd"
,
method
:
"put"
,
authType
:
this
.
backToken
authType
:
this
.
backToken
,
},
vm
.
$qs
.
stringify
(
param
)
)
.
then
(
res
=>
{
if
(
res
.
data
.
resultCode
===
'200'
){
localStorage
.
removeItem
(
'token'
)
localStorage
.
removeItem
(
'userInfo'
)
this
.
$toast
.
success
(
"密码已修改,请用新密码重新登录系统"
);
this
.
$router
.
replace
(
'/login'
)
}
else
{
.
then
((
res
)
=>
{
if
(
res
.
data
.
resultCode
===
"200"
)
{
localStorage
.
removeItem
(
"token"
);
localStorage
.
removeItem
(
"userInfo"
);
this
.
$router
.
replace
({
path
:
"/success"
,
query
:
{
txt
:
"密码已修改,请用新密码重新登录系统"
,
url
:
"/login"
,
},
});
}
else
{
this
.
$toast
(
res
.
data
.
message
);
}
})
.
catch
(
function
(
err
)
{
.
catch
(
function
(
err
)
{
console
.
log
(
err
);
});
}
}
},
},
};
</
script
>
...
...
@@ -109,12 +111,11 @@ export default {
.edit-psd-conatiner
{
width
:
100%
;
height
:
100vh
;
padding
:
50px
16
px
60px
;
padding
:
50px
24
px
60px
;
display
:
flex
;
flex-direction
:
column
;
box-sizing
:
border-box
;
.edit-container
{
}
.input-box
{
...
...
@@ -130,16 +131,17 @@ export default {
}
}
.admin-detail-button
{
padding
:
0
40
px
;
padding
:
0
24
px
;
box-sizing
:
border-box
;
width
:
100%
;
margin
:
0
auto
;
text-align
:
center
;
.van-button--normal
{
background
:
#a4151d
;
border-radius
:
4px
;
height
:
40px
;
width
:
45
%
;
width
:
100
%
;
color
:
#fff
;
border
:
none
;
font-size
:
16px
;
...
...
src/views/user/learn.vue
View file @
8f4de510
...
...
@@ -9,8 +9,12 @@
@
load=
"onLoad"
offset=
"5"
>
<van-cell
v-for=
"(item,index) in list"
:key=
"index"
@
click=
"goDetail(item)"
>
<span>
{{
item
.
name
}}
</span>
<van-cell
v-for=
"(item, index) in list"
:key=
"index"
@
click=
"goDetail(item)"
>
<span>
{{
item
.
name
}}
</span>
<img
src=
"/images/applets/coming.png"
alt
/>
</van-cell>
</van-list>
...
...
@@ -29,7 +33,7 @@ export default {
finished
:
false
,
pageNum
:
1
,
pageSize
:
10
,
flag
:
true
,
flag
:
true
,
list
:
[],
refreshing
:
false
,
};
...
...
@@ -44,32 +48,36 @@ export default {
let
param
=
{
_index
:
this
.
pageNum
,
_size
:
this
.
pageSize
,
type
:
JSON
.
parse
(
localStorage
.
getItem
(
"userInfo"
)).
type
type
:
JSON
.
parse
(
localStorage
.
getItem
(
"userInfo"
)).
type
,
};
vm
.
$https
(
{
url
:
"learningProject/getPageList"
,
method
:
"post"
,
authType
:
this
.
backToken
authType
:
this
.
backToken
,
},
vm
.
$qs
.
stringify
(
param
)
)
.
then
(
res
=>
{
.
then
((
res
)
=>
{
if
(
res
.
data
.
resultCode
===
"200"
)
{
let
data
=
res
.
data
.
data
;
this
.
loading
=
false
vm
.
list
=
this
.
flag
?
data
.
records
:
vm
.
list
.
concat
(
data
.
records
)
this
.
pageNum
=
this
.
pageNum
+
1
this
.
finished
=
data
.
records
.
length
<
this
.
pageSize
?
true
:
false
this
.
loading
=
false
;
vm
.
list
=
this
.
flag
?
data
.
records
:
vm
.
list
.
concat
(
data
.
records
);
this
.
pageNum
=
this
.
pageNum
+
1
;
this
.
finished
=
data
.
records
.
length
<
this
.
pageSize
;
this
.
flag
=
false
;
this
.
refreshing
=
false
;
}
else
{
this
.
$toast
(
res
.
data
.
message
);
}
})
.
catch
(
function
(
err
)
{
.
catch
(
function
(
err
)
{
console
.
log
(
err
);
});
},
// 列表的load上拉加载事件
onLoad
()
{
if
(
!
this
.
flag
)
{
if
(
!
this
.
flag
)
{
console
.
log
(
"加载数据"
);
this
.
loading
=
true
;
this
.
flag
=
false
;
...
...
@@ -81,13 +89,13 @@ export default {
this
.
finished
=
false
;
this
.
flag
=
true
;
this
.
loading
=
true
;
this
.
pageNum
=
1
;
this
.
pageNum
=
1
;
this
.
getList
();
},
goDetail
(
item
)
{
this
.
$router
.
push
({
path
:
"/learnContent"
,
query
:
{
id
:
item
.
id
}
});
}
}
}
,
}
,
};
</
script
>
...
...
@@ -100,7 +108,8 @@ export default {
flex-direction
:
column
;
box-sizing
:
border-box
;
.van-pull-refresh
{
overflow-y
:auto
;
overflow-y
:
auto
;
padding
:
0
8px
;
}
.van-cell
{
padding
:
0
;
...
...
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