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

调整

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