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
f857ef34
Commit
f857ef34
authored
Apr 14, 2021
by
乐宝呗666
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加必填星号展示
parent
a0bcb34d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
187 additions
and
191 deletions
+187
-191
index.js
src/router/index.js
+1
-5
admin.vue
src/views/user/admin.vue
+4
-13
commit.vue
src/views/user/commit.vue
+2
-10
adminInfo.vue
src/views/user/components/adminInfo.vue
+7
-2
commitTab.vue
src/views/user/components/commitTab.vue
+51
-51
historyTab.vue
src/views/user/components/historyTab.vue
+117
-99
learnDetail.vue
src/views/user/components/learnDetail.vue
+4
-1
editPsd.vue
src/views/user/editPsd.vue
+0
-9
learn.vue
src/views/user/learn.vue
+1
-1
No files found.
src/router/index.js
View file @
f857ef34
...
...
@@ -75,14 +75,10 @@ const routes = [
},
]
function
getAbsolutePath
()
{
let
path
=
location
.
pathname
return
path
.
substring
(
0
,
path
.
lastIndexOf
(
'/'
)
+
1
)
}
const
router
=
new
VueRouter
({
routes
:
routes
,
mode
:
"history"
,
base
:
getAbsolutePath
()
base
:
process
.
env
.
BASE_URL
})
const
whiteList
=
[
'/login'
,
'/success'
,
'/screen'
]
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
...
...
src/views/user/admin.vue
View file @
f857ef34
...
...
@@ -63,19 +63,10 @@ export default {
});
},
goDetail
(
item
)
{
if
(
item
.
id
===
this
.
currentUserId
)
{
// 修改页面
this
.
$router
.
push
({
path
:
"/adminInfo"
,
query
:
{
id
:
item
.
id
,
disabled
:
false
},
});
}
else
{
// 详情页面
this
.
$router
.
push
({
path
:
"/adminInfo"
,
query
:
{
id
:
item
.
id
,
disabled
:
true
},
});
}
this
.
$router
.
push
({
path
:
"/adminInfo"
,
query
:
{
id
:
item
.
id
,
disabled
:
item
.
id
!==
this
.
currentUserId
},
});
},
},
};
...
...
src/views/user/commit.vue
View file @
f857ef34
...
...
@@ -5,7 +5,7 @@
<van-tabs
type=
"card"
v-model=
"activeTab"
>
<van-tab
title=
"观影互动"
>
<div
class=
"commit-page"
>
<commit-tab
@
updateActive=
"updateActive"
/>
<commit-tab
/>
</div>
</van-tab>
<van-tab
title=
"互动历史"
>
...
...
@@ -32,18 +32,10 @@ export default {
data
()
{
return
{
activeTab
:
1
,
form
:
{},
show
:
false
,
fileList
:
[],
imgFileList
:
[],
};
},
mounted
()
{},
methods
:
{
updateActive
(
active
)
{
this
.
activeTab
=
active
;
},
},
methods
:
{},
};
</
script
>
...
...
src/views/user/components/adminInfo.vue
View file @
f857ef34
<
template
>
<div
class=
"admin-detail-content"
>
<Header
title=
"管理员详情"
/>
<van-form
validate-first
ref=
'form'
@
submit=
"onSubmit"
>
<van-form
@
submit=
"onSubmit"
>
<div
class=
"input-box"
>
<van-field
required
label=
"管理员姓名"
:disabled=
"disabled"
v-model=
"form.userName"
...
...
@@ -15,6 +16,7 @@
]"
/>
<van-field
required
label=
"手机号码"
:disabled=
"disabled"
v-model=
"form.phone"
...
...
@@ -150,7 +152,6 @@ export default {
<
style
lang=
"scss"
scoped
>
.admin-detail-content
{
padding
:
50px
24px
0
;
// height: calc(100% - 150px);
overflow-y
:
auto
;
.input-box
{
padding-bottom
:
32px
;
...
...
@@ -194,6 +195,10 @@ export default {
width
:
100%
;
}
}
::v-deep
.van-cell--required
::before
{
left
:
-10px
;
color
:
#A4151D
;
}
.van-field__control
,
.van-cell__value
{
color
:
#333
;
...
...
src/views/user/components/commitTab.vue
View file @
f857ef34
...
...
@@ -9,6 +9,7 @@
class=
"field-form-item"
readonly
clickable
required
name=
"boardName"
input-align=
"right"
:value=
"form.boardName"
...
...
@@ -37,6 +38,7 @@
class=
"field-form-item"
readonly
clickable
required
name=
"studyTime"
input-align=
"right"
:value=
"form.studyTime || ''"
...
...
@@ -57,6 +59,7 @@
/>
</van-popup>
<van-field
required
label=
"观影人数"
v-model=
"form.num"
placeholder=
"请输入观影人数"
...
...
@@ -64,6 +67,7 @@
:rules=
"[
{ pattern: /^[1-9]\d{0,9}$/, message: '请输入正确内容,最多10位数',trigger:'blur'}]"
/>
<van-field
required
label=
"管理员账号"
v-model=
"form.name"
placeholder=
"请输入管理员账号"
...
...
@@ -71,6 +75,7 @@
:rules=
"[
{ required: true }]"
/>
<van-field
required
type=
"password"
label=
"管理员密码"
v-model=
"form.password"
...
...
@@ -141,6 +146,7 @@
</div>
<div
class=
"field-content"
>
<van-field
required
class=
"field-textarea"
type=
"textarea"
v-model=
"form.content"
...
...
@@ -207,20 +213,6 @@ export default {
this
.
form
.
boardId
=
this
.
boardList
[
index
].
id
;
this
.
showBoard
=
false
;
},
beforeVideo
(
file
)
{
let
isOver
=
true
if
(
Array
.
isArray
(
file
)){
isOver
=
file
.
every
(
item
=>
item
<=
10
*
1024
*
1024
)
}
else
{
isOver
=
file
.
size
<=
10
*
1024
*
1024
}
if
(
!
isOver
){
this
.
$toast
.
fail
(
"上传文件大小不能超过 10MB"
);
return
false
}
else
{
return
true
}
},
// 打开日历
onDisplay
()
{
this
.
show
=
true
;
...
...
@@ -328,6 +320,21 @@ export default {
console
.
log
(
err
);
});
},
// 上传视频size限制
beforeVideo
(
file
)
{
let
isOver
=
true
if
(
Array
.
isArray
(
file
)){
isOver
=
file
.
every
(
item
=>
item
<=
10
*
1024
*
1024
)
}
else
{
isOver
=
file
.
size
<=
10
*
1024
*
1024
}
if
(
!
isOver
){
this
.
$toast
.
fail
(
"上传文件大小不能超过 10MB"
);
return
false
}
else
{
return
true
}
},
// 删除视频
async
deleteVideo
(
file
,
detail
){
this
.
form
.
videos
.
splice
(
detail
.
index
,
1
)
...
...
@@ -408,7 +415,6 @@ export default {
param
.
images
=
[...
param
.
images
,
...
param
.
videos
];
param
.
images
=
param
.
images
.
join
(
","
);
delete
param
.
videos
;
console
.
log
(
param
);
vm
.
$https
(
{
url
:
"interaction/add"
,
...
...
@@ -459,6 +465,32 @@ export default {
}
.field-content
{
padding-bottom
:
32px
;
.upload-content
{
.avatar-plus
{
width
:
48px
;
height
:
48px
;
line-height
:
48px
;
text-align
:
center
;
background-color
:
#f5f5f5
;
border-radius
:
1px
;
font-size
:
25px
;
color
:
#999
;
margin-bottom
:
12px
;
}
.tips
{
img
{
width
:
12px
;
height
:
12px
;
vertical-align
:
middle
;
}
span
{
margin-left
:
4px
;
color
:
#666
;
font-size
:
12px
;
vertical-align
:
middle
;
}
}
}
}
.input-box
{
padding-bottom
:
32px
;
...
...
@@ -472,16 +504,6 @@ export default {
display
:
none
;
}
}
.calendar-icon
{
.van-icon
{
position
:
absolute
;
width
:
20px
;
height
:
20px
;
right
:
0
;
bottom
:
22px
;
z-index
:
2
;
}
}
.commit-page-button
{
position
:
fixed
;
bottom
:
50px
;
...
...
@@ -522,32 +544,10 @@ export default {
padding
:
0
;
}
}
.upload-content
{
.avatar-plus
{
width
:
48px
;
height
:
48px
;
line-height
:
48px
;
text-align
:
center
;
background-color
:
#f5f5f5
;
border-radius
:
1px
;
font-size
:
25px
;
color
:
#999
;
margin-bottom
:
12px
;
}
.tips
{
img
{
width
:
12px
;
height
:
12px
;
vertical-align
:
middle
;
}
span
{
margin-left
:
4px
;
color
:
#666
;
font-size
:
12px
;
vertical-align
:
middle
;
}
}
::v-deep
.van-cell--required
::before
{
left
:
-10px
;
color
:
#A4151D
;
}
}
</
style
>
\ No newline at end of file
src/views/user/components/historyTab.vue
View file @
f857ef34
This diff is collapsed.
Click to expand it.
src/views/user/components/learnDetail.vue
View file @
f857ef34
...
...
@@ -60,7 +60,7 @@
<div
class=
"learn-title"
>
展板音频
</div>
<div
class=
"learn-body"
>
<span
class=
"file-box"
class=
"file-box
audio
"
v-for=
"(s, i) in item.audioList"
:key=
"i"
>
...
...
@@ -188,6 +188,9 @@ export default {
padding
:
10px
;
box-sizing
:
border-box
;
}
.file-box.audio
{
width
:
100%
;
}
img
{
width
:
32px
;
height
:
auto
;
...
...
src/views/user/editPsd.vue
View file @
f857ef34
...
...
@@ -37,7 +37,6 @@
/>
</div>
<div
class=
"admin-detail-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>
...
...
@@ -61,11 +60,6 @@ export default {
// 查询管理员信息
},
methods
:
{
onCancle
()
{
this
.
form
=
{
username
:
JSON
.
parse
(
sessionStorage
.
getItem
(
"userInfo"
)).
userName
,
};
},
// 提交数据
onSubmit
()
{
if
(
this
.
form
.
password
!==
this
.
form
.
againPsd
)
{
...
...
@@ -116,9 +110,6 @@ export default {
display
:
flex
;
flex-direction
:
column
;
box-sizing
:
border-box
;
.edit-container
{
}
.input-box
{
padding-bottom
:
32px
;
.van-cell
{
...
...
src/views/user/learn.vue
View file @
f857ef34
...
...
@@ -33,7 +33,7 @@ export default {
finished
:
false
,
pageNum
:
1
,
pageSize
:
10
,
flag
:
true
,
flag
:
true
,
// 是否是第一次加载
list
:
[],
refreshing
:
false
,
};
...
...
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