|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <My_listbox ref="List" @getlist="getList">
|
|
|
+ <My_listbox ref="List" @getlist="getList" :isShowEmpty="false" :bottomHeight="70">
|
|
|
<view class="box">
|
|
|
<navigator class="nav-box" v-for="item in list" :key="item.sat_courseware_classid"
|
|
|
:url="'/packageA/course/index?id=' + item.sat_courseware_classid + '&classname=' + item.classname"
|
|
@@ -7,7 +7,6 @@
|
|
|
<image v-if="item.cover" class="image" :src="item.cover" mode="aspectFill" lazy-load="false" />
|
|
|
<text v-else>{{ item.classname }}</text>
|
|
|
</navigator>
|
|
|
-
|
|
|
<navigator class="nav-box" v-for="item in appList" :key="item.name" :url="item.path"
|
|
|
hover-class="navigator-hover">
|
|
|
<block v-if="item.cover">
|
|
@@ -15,7 +14,6 @@
|
|
|
</block>
|
|
|
<text v-else>{{ item.remark }}</text>
|
|
|
</navigator>
|
|
|
-
|
|
|
</view>
|
|
|
</My_listbox>
|
|
|
</template>
|
|
@@ -25,40 +23,44 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
list: [],
|
|
|
- appList: []
|
|
|
- }
|
|
|
- },
|
|
|
- created() {
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- try {
|
|
|
- this.appList = this.getApps('商学院')
|
|
|
- console.log('商学院', this.appList)
|
|
|
- } catch (error) {
|
|
|
- console.log("未获取到授权信息")
|
|
|
+ appList: [],
|
|
|
+ "content": {
|
|
|
+ "parentid": 0,
|
|
|
+ "where": {
|
|
|
+ "isenable": 1
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
methods: {
|
|
|
- getList() {
|
|
|
- this.$Http.basic({
|
|
|
- "id": "20221102143302",
|
|
|
- "content": {
|
|
|
- "parentid": 0,
|
|
|
- pageSize: 9999,
|
|
|
- "where": {
|
|
|
- "isenable": 1
|
|
|
- }
|
|
|
- }
|
|
|
- }).then(res => {
|
|
|
- console.log("课程分类", res)
|
|
|
- this.$refs.List.RefreshToComplete()
|
|
|
- if (this.cutoff(res.msg)) return;
|
|
|
- this.list = res.data.map(v => {
|
|
|
- v.cover = this.getSpecifiedImage(v.attinfos[0] || {})
|
|
|
- return v
|
|
|
- });
|
|
|
+ init(callBack) {
|
|
|
+ try {
|
|
|
+ this.appList = this.getApps('商学院')
|
|
|
+ } catch (error) {
|
|
|
+ console.log("未获取到授权信息")
|
|
|
+ }
|
|
|
+ this.getList().then(res => {
|
|
|
+ callBack()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getList(init = false) {
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ if (this.paging(this.content, init)) return resolve();
|
|
|
+ this.$Http.basic({
|
|
|
+ "id": "20221102143302",
|
|
|
+ content: this.content
|
|
|
+ }).then(res => {
|
|
|
+ console.log("课程分类", res)
|
|
|
+ this.$refs.List.RefreshToComplete()
|
|
|
+ resolve()
|
|
|
+ if (this.cutoff(res.msg)) return;
|
|
|
+ res.data = res.data.map(v => {
|
|
|
+ v.cover = v.attinfos.length ? this.getSpecifiedImage(v.attinfos.find(s => v.usetype == "avatar")) : "";
|
|
|
+ return v
|
|
|
+ });
|
|
|
+ this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data);
|
|
|
+ this.content = this.$refs.List.paging(this.content, res)
|
|
|
+ })
|
|
|
})
|
|
|
}
|
|
|
},
|