lansir 1 年間 前
コミット
9c4332b628

+ 15 - 7
pages/studentRanked/components/mark-score.vue

@@ -34,7 +34,8 @@
 
 			<scroll-view scroll-y style="height: 240px;" show-scrollbar>
 				<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"
                             v-if="course_id ? item.course_id == course_id : (course_name ? item.course_name == course_name : true)"
                             :bgColor="activeId == index ? '#ffffff42' : '#0000'"
@@ -42,7 +43,7 @@
                                 'no-select' : activeId >= 0 && 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">
                     			<text class="grid-text txt-white f28">{{item.tab_name}}</text>
                     		</view>
@@ -94,6 +95,7 @@
                 course_name : '',
 				itemTab: '',
 				courseList: [],
+                loading : false,
 			}
 		},
 		watch: {
@@ -144,20 +146,26 @@
                 this.course_name = item.name == '全部' ? '' : item.name;
             },
             getTipList() {
-                if(tabList[this.curIndex]){
-                    this.list = tabList[this.curIndex];
+                let typeId = this.curIndex+1;
+                if(tabList[typeId]){
+                    this.list = tabList[typeId];
                     return;
                 }
+                this.loading = true;
                 this.$api.sendRequest({
                     url: `/mobile/studentTab/getStudentTabs`,
                     method: "post",
                     data: {
                         teacher_id: this.$store.state.teacher_id,
-                        type: this.curIndex
+                        type: typeId
                     },
                     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;
                     }
                 })
             },

+ 0 - 5
pages/studentRanked/studentRanked.vue

@@ -197,11 +197,6 @@
             debug() {
                 console.log(this)
             },
-            studentRankedChange() {
-                uni.navigateTo({
-                    url: './studentRankedChange'
-                })
-            },
             getLevelIcon(item) {
                 let url = '//zhxy.obs.cn-hz1.ctyun.cn:443/static/';
                 if(item.score_total == 0){