|
@@ -38,7 +38,7 @@
|
|
|
/>
|
|
|
<BookListModule
|
|
|
name="baozhi"
|
|
|
- :list="BookList2"
|
|
|
+ :list="IssueList"
|
|
|
:headerBg="'#1F1F1F'"
|
|
|
:headerBorder="'#5C5C5C'"
|
|
|
:userBg="'rgba(0, 0, 0, 0.24)'"
|
|
@@ -56,7 +56,7 @@
|
|
|
/> -->
|
|
|
<BookListModule
|
|
|
name="kecheng"
|
|
|
- :list="BookList3"
|
|
|
+ :list="LBCourseList"
|
|
|
:headerBg="'#1F1F1F'"
|
|
|
:headerBorder="'#5C5C5C'"
|
|
|
:userBg="'rgba(0, 0, 0, 0.24)'"
|
|
@@ -82,6 +82,7 @@
|
|
|
//例如:import 《组件名称》from ‘《组件路径》';
|
|
|
import Header from "../../components/Header.vue";
|
|
|
import BookListModule from "@/components/common/BookListModule.vue"
|
|
|
+import { getLogin } from "@/api/ajax";
|
|
|
|
|
|
export default {
|
|
|
//import引入的组件需要注入到对象中才能使用
|
|
@@ -218,6 +219,8 @@ export default {
|
|
|
score: 3,
|
|
|
}
|
|
|
],
|
|
|
+ LBCourseList:[], // 录播课列表
|
|
|
+ IssueList: [], // 报纸列表
|
|
|
bannerFlag: true // 是否展示广告
|
|
|
}
|
|
|
},
|
|
@@ -227,10 +230,49 @@ export default {
|
|
|
watch: {},
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
+ // 获取录播课列表
|
|
|
+ getLBCourseList(){
|
|
|
+ let MethodName = "/ShopServer/Client/ShopHomeQuery/QueryLBCourseList";
|
|
|
+ let data = {
|
|
|
+ top_n: 5
|
|
|
+ }
|
|
|
+ getLogin(MethodName, data)
|
|
|
+ .then((res) => {
|
|
|
+ if(res.status===1){
|
|
|
+ res.lb_course_list.forEach(item => {
|
|
|
+ item.type1="kecheng"
|
|
|
+ });
|
|
|
+ this.LBCourseList = res.lb_course_list
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 获取报纸列表
|
|
|
+ getIssueList(){
|
|
|
+ let MethodName = "/ShopServer/Client/ShopHomeQuery/QueryIssueList";
|
|
|
+ let data = {
|
|
|
+ top_n: 5
|
|
|
+ }
|
|
|
+ getLogin(MethodName, data)
|
|
|
+ .then((res) => {
|
|
|
+ if(res.status===1){
|
|
|
+ res.issue_list.forEach(item => {
|
|
|
+ item.type1="baozhi"
|
|
|
+ });
|
|
|
+ this.IssueList = res.issue_list
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
|
-
|
|
|
+ this.getLBCourseList()
|
|
|
+ this.getIssueList()
|
|
|
},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|