33 <a-list :grid =" { gutter: 24, lg: 3, md: 1, sm: 1, xs: 1 }" :dataSource =" dataSource" >
44 <a-list-item slot =" renderItem" slot-scope =" item, index" >
55 <a-card :hoverable =" true" >
6-
76 <!-- <template class="ant-card-extra" slot="extra">
87 <span class="create-time">{{item.createTime}}</span>
98 </template> -->
10-
119 <a-card-meta >
1210 <div style =" margin-bottom : 3px " slot =" title" >{{ item.courseName }}</div >
1311 <div class =" meta-cardInfo" slot =" description" >
14- <router-link v-if =" item.showType==1" :to =" { name: 'teaching-mineCourse-courseUnitMap', query: {id:item.id}}" >
15- <img :src =" getQiniuFile(item.courseCover)" height =" 25px" alt =" 图片不存在" style =" width :100% ;height :100% ;" />
12+ <router-link
13+ v-if =" item.showType == 1"
14+ :to =" { name: 'teaching-mineCourse-courseUnitMap', query: { id: item.id } }"
15+ >
16+ <img
17+ :src =" getQiniuFile(item.courseCover)"
18+ height =" 25px"
19+ alt =" 封面不存在"
20+ style =" width : 100% ; height : 100% "
21+ />
1622 </router-link >
17- <router-link v-if =" item.showType==2" :to =" { name: 'teaching-mineCourse-courseUnitCard', query: {id:item.id}}" >
18- <img :src =" getQiniuFile(item.courseCover)" height =" 25px" alt =" 图片不存在" style =" width :100% ;height :100% ;" />
23+ <router-link
24+ v-if =" item.showType == 2"
25+ :to =" { name: 'teaching-mineCourse-courseUnitCard', query: { id: item.id } }"
26+ >
27+ <img
28+ :src =" getQiniuFile(item.courseCover)"
29+ height =" 25px"
30+ alt =" 封面不存在"
31+ style =" width : 100% ; height : 100% "
32+ />
1933 </router-link >
2034 </div >
2135 </a-card-meta >
22- <br >
36+ <br / >
2337 <span v-html =" item.courseDesc" class =" article-content" ></span >
24-
2538 </a-card >
2639 </a-list-item >
2740 </a-list >
@@ -34,15 +47,15 @@ export default {
3447 components: {},
3548 data () {
3649 return {
37- dataSource: []
50+ dataSource: [],
3851 }
3952 },
4053 mounted () {
4154 this .getCourseList ()
4255 },
4356 methods: {
44- getCourseList : function () {
45- getAction (' /teaching/teachingCourse/mineCourse' , {}).then (res => {
57+ getCourseList : function () {
58+ getAction (' /teaching/teachingCourse/mineCourse' , {}).then (( res ) => {
4659 if (res .success ) {
4760 this .dataSource = res .result
4861 }
@@ -52,17 +65,17 @@ export default {
5265 this .loading = false
5366 })
5467 },
55- getQiniuFile (text ){
56- if (! text){
57- // this.$message.warning("未知的文件")
58- return ;
59- }
60- if (text .indexOf (" ," )> 0 ){
61- text = text .substring (0 ,text .indexOf (" ," ))
62- }
63- return window ._CONFIG [' qn_base' ] + text;
68+ getQiniuFile (text ) {
69+ if (! text) {
70+ // this.$message.warning("未知的文件")
71+ return
6472 }
65- }
73+ if (text .indexOf (' ,' ) > 0 ) {
74+ text = text .substring (0 , text .indexOf (' ,' ))
75+ }
76+ return window ._CONFIG [' qn_base' ] + text
77+ },
78+ },
6679}
6780 </script >
6881
@@ -71,8 +84,8 @@ export default {
7184 .meta-cardInfo {
7285 zoom : 1 ;
7386 margin-top : 16px ;
74- .title {
75- margin-right :20px ;
87+ .title {
88+ margin-right : 20px ;
7689 }
7790 img {
7891 width : 100% ;
0 commit comments