Commit 7e949616 authored by 罗超's avatar 罗超

调整

parent d1b3d592
...@@ -177,6 +177,11 @@ ...@@ -177,6 +177,11 @@
onShow() { onShow() {
this.getStuCourse(); this.getStuCourse();
this.userData = uni.getStorageSync('userInfo'); this.userData = uni.getStorageSync('userInfo');
if(this.userData && this.userData.AccountType==1){
uni.redirectTo({
url:'/pages/index/workSituation'
})
}
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {
......
...@@ -10,14 +10,14 @@ ...@@ -10,14 +10,14 @@
<view class="index-header-title"> <view class="index-header-title">
welcome welcome
</view> </view>
<view class="index-header-name">周一围</view> <view class="index-header-name">{{userData.AccountName}}</view>
</view> </view>
</view> </view>
</navbar> </navbar>
<view style="margin: 40rpx 0 10rpx 0;"> <view style="margin: 40rpx 0 10rpx 0;">
<view style="padding:0 50rpx;font-weight: 800;color: #282828;"> <view style="padding:0 50rpx;font-weight: 800;color: #282828;">
<view style="font-size: 36rpx;">Good afternoon,</view> <view style="font-size: 36rpx;">Good afternoon,</view>
<view style="font-size: 50rpx;">老师</view> <view style="font-size: 50rpx;">{{userData.AccountName}}老师</view>
</view> </view>
</view> </view>
<courseCard></courseCard> <courseCard></courseCard>
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
<Loadmore :state="pageState" /> <Loadmore :state="pageState" />
</scroll-view> </scroll-view>
</view> </view>
<van-toast id="van-toast" />
</view> </view>
</template> </template>
...@@ -69,6 +70,7 @@ ...@@ -69,6 +70,7 @@
onMounted, onMounted,
provide, provide,
nextTick, nextTick,
inject
} from "vue"; } from "vue";
import { import {
...@@ -93,6 +95,12 @@ ...@@ -93,6 +95,12 @@
let { let {
proxy proxy
} = getCurrentInstance(); } = getCurrentInstance();
let Toast = inject("$toast")
Toast.loading({
message: '加载中...',
forbidClick: true,
loadingType: 'spinner',
});
let data = reactive({ let data = reactive({
titleList:[ titleList:[
{name:'学生列表',num:18}, {name:'学生列表',num:18},
...@@ -112,9 +120,11 @@ ...@@ -112,9 +120,11 @@
pageCount: 0, pageCount: 0,
timer: null, //防抖 timer: null, //防抖
dataList:[], dataList:[],
pageState: "more" pageState: "more",
loading:true,
userData:{}
}); });
data.userData = uni.getStorageSync('userInfo');
let methods = { let methods = {
back() { back() {
uni.navigateTo({ uni.navigateTo({
...@@ -133,10 +143,12 @@ ...@@ -133,10 +143,12 @@
}, },
//获取学生列表 //获取学生列表
getCourseStuList(){ getCourseStuList(){
data.loading=true
proxy.$request("/Teacher/GetCourseStu", data.OperationMsg).then(res => { proxy.$request("/Teacher/GetCourseStu", data.OperationMsg).then(res => {
if(res){ if(res){
data.dataList = res.Data; data.dataList = res.Data;
data.pageState = "none"; data.pageState = "none";
data.loading=false
return return
if (data.timer) data.timer = null; if (data.timer) data.timer = null;
if (data.Msg.PageIndex === 1) { if (data.Msg.PageIndex === 1) {
...@@ -150,11 +162,13 @@ ...@@ -150,11 +162,13 @@
} else { } else {
data.pageState = "more"; data.pageState = "more";
} }
} }
}) })
}, },
//获取作业情况列表 //获取作业情况列表
getGetCourseHomeWorkList(){ getGetCourseHomeWorkList(){
data.loading=true
proxy.$request("/Teacher/GetCourseHomeWork", data.OperationMsg).then(res => { proxy.$request("/Teacher/GetCourseHomeWork", data.OperationMsg).then(res => {
if(res){ if(res){
data.dataList = res.Data; data.dataList = res.Data;
...@@ -172,11 +186,14 @@ ...@@ -172,11 +186,14 @@
} else { } else {
data.pageState = "more"; data.pageState = "more";
} }
data.loading=false
} }
}) })
}, },
//获取考试信息列表 //获取考试信息列表
getExamPageList(){ getExamPageList(){
data.loading=true
proxy.$request("/Exam/GetExamPageList", data.Msg).then(res => { proxy.$request("/Exam/GetExamPageList", data.Msg).then(res => {
if(res){ if(res){
if (data.timer) data.timer = null; if (data.timer) data.timer = null;
...@@ -191,6 +208,7 @@ ...@@ -191,6 +208,7 @@
} else { } else {
data.pageState = "more"; data.pageState = "more";
} }
data.loading=false
} }
}) })
}, },
...@@ -229,7 +247,7 @@ ...@@ -229,7 +247,7 @@
this.Msg.courseId = option.courseId this.Msg.courseId = option.courseId
}, },
onShow() { onShow() {
this.userData = uni.getStorageSync('userInfo'); //this.userData = uni.getStorageSync('userInfo');
if(this.tabNme=='学生列表'){ if(this.tabNme=='学生列表'){
this.getCourseStuList() this.getCourseStuList()
}else if(this.tabNme=='作业情况'){ }else if(this.tabNme=='作业情况'){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment