Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
Project
Project
Details
Activity
Releases
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
new-sing
admin-base
Commits
278a2f16
Commit
278a2f16
authored
Sep 24, 2018
by
王
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
素材管理
parent
0e8b8f99
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
152 additions
and
29 deletions
+152
-29
index.vue
src/components/login/index.vue
+1
-1
index.vue
src/components/periods/index.vue
+10
-15
newDialog.vue
src/components/periods/newDialog.vue
+10
-7
weChatResource.vue
src/components/weChat/weChatResource.vue
+131
-6
No files found.
src/components/login/index.vue
View file @
278a2f16
...
...
@@ -66,7 +66,7 @@
this
.
$store
.
dispatch
(
'setToken'
,
res
.
token
);
this
.
$store
.
dispatch
(
'setUserName'
,
res
.
desc
);
this
.
$store
.
dispatch
(
'setPermission'
,
JSON
.
parse
(
res
.
roles
.
menu_ids
));
//
window.location.href = '/'
window
.
location
.
href
=
'/'
})
}
})
...
...
src/components/periods/index.vue
View file @
278a2f16
...
...
@@ -147,12 +147,6 @@
startTime
:
[],
newDialog
:
{
form
:
{
id
:
0
,
title
:
''
,
start_num
:
0
,
start_at
:
''
,
rest_week_day
:
[],
goods_id
:
''
},
show
:
false
,
title
:
''
...
...
@@ -211,7 +205,7 @@
},
onAdd
(){
this
.
newDialog
.
form
.
id
=
''
;
this
.
newDialog
.
start_n
um
=
''
;
this
.
newDialog
.
form
.
startN
um
=
''
;
this
.
newDialog
.
form
.
goods_id
=
''
;
this
.
newDialog
.
form
.
title
=
''
;
this
.
newDialog
.
form
.
start_at
=
''
;
...
...
@@ -221,26 +215,27 @@
this
.
newDialog
.
show
=
true
;
},
onEdit
(
row
){
this
.
newDialog
.
form
.
id
=
row
.
id
;
this
.
newDialog
.
form
.
start_num
=
row
.
start_num
;
this
.
newDialog
.
form
.
start_at
=
row
.
start_at
;
this
.
newDialog
.
form
.
title
=
row
.
title
;
this
.
newDialog
.
form
.
goods_id
=
row
.
goods_id
;
let
weekList
=
[];
if
(
row
.
rest_week_day
){
row
.
rest_week_day
.
split
(
','
).
forEach
((
val
)
=>
{
weekList
.
push
(
parseInt
(
val
));
})
}
this
.
newDialog
.
form
.
rest_week_day
=
weekList
;
let
teacherList
=
[];
console
.
log
(
'row edit'
,
row
);
if
(
row
.
teacher_ids
){
row
.
teacher_ids
.
split
(
','
).
forEach
((
val
)
=>
{
teacherList
.
push
(
parseInt
(
val
));
})
}
this
.
newDialog
.
form
.
teacher_ids
=
teacherList
;
this
.
newDialog
.
form
=
{
id
:
row
.
id
,
startNum
:
row
.
start_num
,
start_at
:
row
.
start_at
,
title
:
row
.
title
,
goods_id
:
row
.
goods_id
,
rest_week_day
:
weekList
,
teacher_ids
:
teacherList
}
this
.
newDialog
.
title
=
'编辑期数'
;
this
.
newDialog
.
show
=
true
;
},
...
...
src/components/periods/newDialog.vue
View file @
278a2f16
...
...
@@ -25,8 +25,8 @@
<el-form-item
label=
"期数名称"
prop=
"title"
>
<el-input
v-model=
"form.title"
></el-input>
</el-form-item>
<el-form-item
label=
"开始主题"
prop=
"start
_n
um"
>
<el-select
v-model=
"form.start
_n
um"
clearable
placeholder=
"请选择"
>
<el-form-item
label=
"开始主题"
prop=
"start
N
um"
>
<el-select
v-model=
"form.start
N
um"
clearable
placeholder=
"请选择"
>
<el-option
v-for=
"item in itemOptions"
:key=
"item.id"
...
...
@@ -143,7 +143,7 @@
title
:[
{
required
:
true
,
message
:
'请输入名称'
,
trigger
:
'change'
}
],
start
_n
um
:[
start
N
um
:[
{
required
:
true
,
message
:
'请输入开始主题'
,
trigger
:
'change'
}
],
start_at
:[
...
...
@@ -194,7 +194,7 @@
let
_id
=
this
.
form
.
goods_id
;
let
json
=
{
title
:
this
.
form
.
title
,
start_num
:
this
.
form
.
start
_n
um
,
start_num
:
this
.
form
.
start
N
um
,
start_at
:
this
.
form
.
start_at
,
rest_week_day
:
this
.
form
.
rest_week_day
?
this
.
form
.
rest_week_day
.
join
(
','
)
:
''
}
...
...
@@ -263,6 +263,8 @@
this
.
form
.
start_num
=
''
getLessonDetailApi
(
id
,{}).
then
((
res
)
=>
{
this
.
itemOptions
=
res
.
detail
[
res
.
type
]
console
.
log
(
'getLessonDetail id'
,
id
)
console
.
log
(
'getLessonDetailthis.itemOptions'
,
this
.
itemOptions
)
})
},
getGoodsOption
(){
...
...
@@ -277,12 +279,13 @@
},
mounted
(){
// this.initPage()
this
.
form
=
this
.
dialogObj
.
form
;
this
.
getTeachers
();
this
.
getGoodsOption
();
if
(
this
.
dialogObj
.
form
.
course_id
){
this
.
getLessonDetail
(
this
.
dialogObj
.
form
.
course_id
);
console
.
log
(
'this.dialogObj.form'
,
this
.
dialogObj
.
form
)
if
(
this
.
dialogObj
.
form
.
goods_id
){
this
.
getLessonDetail
(
this
.
dialogObj
.
form
.
goods_id
);
}
this
.
form
=
this
.
dialogObj
.
form
;
this
.
teacherList
=
this
.
dialogObj
.
form
.
teacher_ids
;
}
}
...
...
src/components/weChat/weChatResource.vue
View file @
278a2f16
...
...
@@ -4,9 +4,9 @@
<div>
<ul
class=
"media-navs"
>
<!---->
<
!--
<li
class=
"media-nav js_top"
:class=
"type === 'news' ? 'media-current-nav' : ''"
@
click=
"getMediaType('news')"
>
--
>
<
!--
<a
href=
"javascript:void(0);"
>
图文消息
<br
/></a>
--
>
<
!--
</li>
--
>
<
li
class=
"media-nav js_top"
:class=
"type === 'news' ? 'media-current-nav' : ''"
@
click=
"getMediaType('news')"
>
<
a
href=
"javascript:void(0);"
>
图文消息
<br
/></a
>
<
/li
>
<li
class=
"media-nav js_top"
:class=
"type === 'image' ? 'media-current-nav' : ''"
@
click=
"getMediaType('image')"
>
<a
href=
"javascript:void(0);"
>
图片
<br
/></a>
</li>
...
...
@@ -40,7 +40,36 @@
</el-upload>
</div>
</div>
<div
v-if=
"mediaList.length > 0"
>
<div
v-if=
"mediaList.length > 0 && type === 'news'"
class=
"d-start"
>
<div
v-for=
"(item,index) in mediaList"
:key=
"index"
class=
"news-media"
>
<el-card
:body-style=
"
{ padding: '0px' }">
<div
v-for=
"(child, childIndex) in item.content.news_item"
style=
"position: relative"
>
<div
v-if=
"item.content.news_item.length === 1"
class=
"single-cover"
>
<div
class=
"title"
>
{{
child
.
title
}}
</div>
<img
:src=
"child.thumb_url"
style=
"width: 100%;margin-top: 20px;"
/>
<div
class=
"digest"
>
{{
child
.
digest
}}
</div>
<a
class=
"preview"
:href=
"child.url"
target=
"_blank"
>
预览文章
</a>
</div>
<div
v-else-if=
"item.content.news_item.length > 1"
class=
"clear-both bottomCover"
style=
"position: relative"
>
<div
v-if=
"childIndex === 0"
class=
"muti-cover"
>
<img
style=
"width: 100%;margin-top: 20px;"
:src=
"child.thumb_url"
/>
<div
class=
"bottom-title"
>
{{
child
.
title
}}
</div>
</div>
<div
class=
"next-cover"
v-else
>
<span
class=
"next-title"
>
{{
child
.
title
}}
</span>
<img
class=
"next-img"
:src=
"child.thumb_url"
/>
</div>
<a
class=
"preview"
:href=
"child.url"
target=
"_blank"
>
预览文章
</a>
</div>
</div>
</el-card>
</div>
</div>
<div
v-if=
"mediaList.length > 0 && type !== 'news'"
>
<el-table
:data=
"mediaList"
style=
"width: 100%"
>
...
...
@@ -62,7 +91,7 @@
<!--
<source
:src=
"scope.row.info.down_url"
/>
-->
<!--Your browser does not support the video tag.-->
<!--
</video>
-->
<a
:href=
"scope.row.info.down_url"
v-if=
"type === 'video'"
target=
"_blank"
>
<a
:href=
"scope.row.info.down_url"
v-if=
"type === 'video'
&& scope.row.info && scope.row.info.down_url
"
target=
"_blank"
>
{{
scope
.
row
.
info
.
title
}}
</a>
<audio
v-if=
"type === 'voice'"
id=
"myAudio"
controls
>
...
...
@@ -94,7 +123,7 @@
total
:
0
,
limit
:
5
,
loading
:
false
,
type
:
'
image
'
,
type
:
'
news
'
,
imageList
:
[],
uploadParam
:
{
type
:
'wechat'
,
...
...
@@ -256,4 +285,100 @@
}
}
}
.clear-both{
&:after{
content: '';
display: block;
clear: both;
}
}
</
style
>
<
style
>
.news-media
{
padding
:
10px
;
width
:
300px
;
}
.news-media
img
{
width
:
100%
;
}
.f-news
{
max-height
:
300px
;
overflow
:
hidden
;
}
.s-news
img
{
width
:
50px
;
float
:
right
;
}
.title
{
font-size
:
16px
;
font-weight
:
400
;
display
:
block
;
line-height
:
1.2
;
color
:
#353535
;
}
.digest
{
padding-top
:
12px
;
color
:
#9A9A9A
;
font-size
:
14px
;
}
.single-cover
{
padding
:
20px
15px
15px
;
}
.muti-title
{
position
:
absolute
;
}
.muti-cover
{
position
:
relative
;
padding
:
20px
15px
0
15px
;
}
.bottom-title
{
color
:
#FFFFFF
;
background-color
:
rgba
(
0
,
0
,
0
,
0.55
);
position
:
absolute
;
left
:
15px
;
right
:
15px
;
bottom
:
0
;
padding
:
8px
12px
;
}
.next-cover
{
padding
:
12px
15px
;
position
:
relative
;
}
.next-img
{
float
:
right
;
margin-left
:
12px
;
width
:
60px
!important
;
height
:
60px
!important
;
}
.next-title
{
overflow
:
hidden
;
font-weight
:
400
;
word-wrap
:
break-word
;
-webkit-hyphens
:
auto
;
-ms-hyphens
:
auto
;
hyphens
:
auto
;
color
:
#353535
;
}
.single-cover
:hover
.preview
,
.bottomCover
:hover
.preview
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
color
:
#fff
;
}
.d-start
{
display
:
flex
;
flex-flow
:
row
wrap
;
justify-content
:
flex-start
;
align-items
:
flex-start
;
}
.preview
{
display
:
none
;
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
background-color
:
rgba
(
0
,
0
,
0
,
0.5
);
text-decoration
:
none
;
}
</
style
>
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