|
@@ -34,7 +34,8 @@
|
|
|
|
|
|
<scroll-view scroll-y style="height: 240px;" show-scrollbar>
|
|
<scroll-view scroll-y style="height: 240px;" show-scrollbar>
|
|
<view class="ui-p">
|
|
<view class="ui-p">
|
|
- <u-grid :col="6" :border="false" style="align-items: baseline;">
|
|
|
|
|
|
+ <view class="text-center txt-muted ui-pt40" v-if="!loading && list.length == 0">当前类型暂无标签</view>
|
|
|
|
+ <u-grid v-else :col="6" :border="false" style="align-items: baseline;">
|
|
<u-grid-item @click="toActive(index,item)" v-for="(item, index) in list" :key="index" class="ui-p"
|
|
<u-grid-item @click="toActive(index,item)" v-for="(item, index) in list" :key="index" class="ui-p"
|
|
v-if="course_id ? item.course_id == course_id : (course_name ? item.course_name == course_name : true)"
|
|
v-if="course_id ? item.course_id == course_id : (course_name ? item.course_name == course_name : true)"
|
|
:bgColor="activeId == index ? '#ffffff42' : '#0000'"
|
|
:bgColor="activeId == index ? '#ffffff42' : '#0000'"
|
|
@@ -42,7 +43,7 @@
|
|
'no-select' : activeId >= 0 && activeId != index,
|
|
'no-select' : activeId >= 0 && activeId != index,
|
|
'item-active' : activeId == index
|
|
'item-active' : activeId == index
|
|
}">
|
|
}">
|
|
- <u--image :src="item.img" width="46px" height="46px"></u--image>
|
|
|
|
|
|
+ <image :src="item.img" style="width: 92rpx;height: 92rpx;"></image>
|
|
<view class="ui-pt10 text-center">
|
|
<view class="ui-pt10 text-center">
|
|
<text class="grid-text txt-white f28">{{item.tab_name}}</text>
|
|
<text class="grid-text txt-white f28">{{item.tab_name}}</text>
|
|
</view>
|
|
</view>
|
|
@@ -94,6 +95,7 @@
|
|
course_name : '',
|
|
course_name : '',
|
|
itemTab: '',
|
|
itemTab: '',
|
|
courseList: [],
|
|
courseList: [],
|
|
|
|
+ loading : false,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -144,20 +146,26 @@
|
|
this.course_name = item.name == '全部' ? '' : item.name;
|
|
this.course_name = item.name == '全部' ? '' : item.name;
|
|
},
|
|
},
|
|
getTipList() {
|
|
getTipList() {
|
|
- if(tabList[this.curIndex]){
|
|
|
|
- this.list = tabList[this.curIndex];
|
|
|
|
|
|
+ let typeId = this.curIndex+1;
|
|
|
|
+ if(tabList[typeId]){
|
|
|
|
+ this.list = tabList[typeId];
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ this.loading = true;
|
|
this.$api.sendRequest({
|
|
this.$api.sendRequest({
|
|
url: `/mobile/studentTab/getStudentTabs`,
|
|
url: `/mobile/studentTab/getStudentTabs`,
|
|
method: "post",
|
|
method: "post",
|
|
data: {
|
|
data: {
|
|
teacher_id: this.$store.state.teacher_id,
|
|
teacher_id: this.$store.state.teacher_id,
|
|
- type: this.curIndex
|
|
|
|
|
|
+ type: typeId
|
|
},
|
|
},
|
|
success: res => {
|
|
success: res => {
|
|
- tabList[this.curIndex] = res.data;
|
|
|
|
- this.list = res.data
|
|
|
|
|
|
+ tabList[typeId] = res.data;
|
|
|
|
+ this.list = res.data,
|
|
|
|
+ this.loading = false;
|
|
|
|
+ },
|
|
|
|
+ fail:()=>{
|
|
|
|
+ this.loading = false;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|