Commit a674d8c2 authored by 罗超's avatar 罗超

2

parent 6f8db03d
<style scoped>
.popupbox {
width: 60vw;
background-color: #FFF;
height: 60vh;
box-sizing: border-box;
position: relative;
}
.popupbox .title {
height: 100rpx;
color: #111;
font-size: 30rpx;
font-weight: 500;
display: flex;
justify-content: center;
align-items: center;
}
.subtitle {
color: #666;
font-size: 26rpx;
font-weight: 500;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 10rpx;
}
.infoBox {
height: calc(100% - 150rpx);
box-sizing: border-box;
padding: 0 20rpx;
overflow-y: auto;
}
.infoItem {
border-bottom: 1px solid #999;
margin-bottom: 10rpx;
}
.infoRow {
display: flex;
flex-wrap: nowrap;
}
.label {
width: 80rpx;
color: #666;
font-size: 26rpx;
white-space: nowrap;
}
.value {
font-size: 28rpx;
color: #111;
flex-grow: 1;
}
.infoRow .subBtn {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FFFFFF;
background-color: #4C50E7;
padding: 10rpx 20rpx;
border-radius: 10rpx;
margin: 10rpx auto;
}
</style>
<template>
<view>
<van-popup :show="showpop" round closeable @close="taggleShow(false)">
<view class="popupbox">
<view class="title">
提示
</view>
<view class="subtitle">
当前时段已有预约列表,是否切换?
</view>
<view class="infoBox">
<view v-for="(info,index) in infoList" :key="index" class="infoItem">
<view class="infoRow">
<view class="label">
老师:
</view>
<view class="value">
{{info.TeacherName}}
</view>
</view>
<view class="infoRow">
<view class="label">
教室:
</view>
<view class="value">
{{info.RoomName}}
</view>
</view>
<view class="infoRow">
<view class="label">
时间:
</view>
<view class="value">
{{info.CourseSTime}}/{{info.CourseETime}}
</view>
</view>
<view class="infoRow">
<view class="label">
学员:
</view>
<view class="value" style="white-space: wrap;">
<view v-for="(item,index) in info.StuList" :key="index" style="display: inline-block;">
{{item.StuName}},
</view>
</view>
</view>
<view class="infoRow">
<view class="subBtn" @click="chooseTime(info)">
预约该时段
</view>
</view>
</view>
</view>
</view>
</van-popup>
</view>
</template>
<script>
import {
reactive,
toRefs,
watch
} from "vue";
export default {
components: {
},
props: {
show: {
type: Boolean,
default: false
},
infoList: {
type: Array,
default: () => []
}
},
setup(props, ctx) {
let data = reactive({
showpop: false,
msg: {
pageIndex: 1,
pageSize: 10,
StartTime: '',
EntTime: '',
State: 0,
TeacherId: 0,
Q_SelectNormal: 1,
},
})
let methods = {
taggleShow(val) {
ctx.emit("close", val)
},
chooseTime(item) {
ctx.emit("change", item)
}
}
watch(() => props.show, (val) => {
data.showpop = val
})
let that = methods;
return {
...toRefs(data),
...methods,
};
},
}
</script>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class=""> <view class="">
<Navbar> <Navbar>
<view class="navbar"> <view class="navbar">
<van-icon name="arrow-left" size="36rpx" @click="back"/> <van-icon name="arrow-left" size="36rpx" @click="back" />
<i class="iconfont icon-calendar" style="font-size: 60rpx;" @click="isShowCalendar=true"></i> <i class="iconfont icon-calendar" style="font-size: 60rpx;" @click="isShowCalendar=true"></i>
<view class="dateStr" @click="isShowCalendar=true"> <view class="dateStr" @click="isShowCalendar=true">
{{dateStr}} {{dateStr}}
...@@ -28,8 +28,10 @@ ...@@ -28,8 +28,10 @@
<text class="teacherInfoName">{{item.TeacherName}}</text> <text class="teacherInfoName">{{item.TeacherName}}</text>
<text class="teacherInfoBtn">可报入</text> <text class="teacherInfoBtn">可报入</text>
</view> </view>
<view class="TeacherIntro"> <view class="TeacherIntro" v-if="item.TeacherIntro" v-html="item.TeacherIntro">
{{item.TeacherIntro||'暂无教师介绍'}} </view>
<view class="TeacherIntro" v-else>
暂无教师介绍
</view> </view>
</view> </view>
</view> </view>
...@@ -136,16 +138,24 @@ ...@@ -136,16 +138,24 @@
</view> </view>
</view> </view>
</view> </view>
<view class="noCourse" v-if="courselist.length==0&&basics.IsNextAppoint"> <view class="noCourse" v-if="courselist.length==0&&teacherList.length>0">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/noCourse.png" mode="" <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/noCourse.png" mode=""
style="width: 166rpx;height: 166rpx;"></image> style="width: 166rpx;height: 166rpx;"></image>
<view class="noCourseText"> <view class="noCourseText">
暂无可约课程 暂无可约课程
</view> </view>
</view> </view>
<view class="noCourse" v-if="teacherList.length==0">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/noCourse.png" mode=""
style="width: 166rpx;height: 166rpx;"></image>
<view class="noCourseText">
暂无可约老师
</view>
</view>
<van-overlay :show="showlay" :lockScroll="false"> <van-overlay :show="showlay" :lockScroll="false">
<view class="laybox"> <view class="laybox">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/yuyuesuccess.png" mode="widthFix" style="width: 100%;height: 162rpx;border-radius: 24rpx 24rpx 0 0;"></image> <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/yuyuesuccess.png"
mode="widthFix" style="width: 100%;height: 162rpx;border-radius: 24rpx 24rpx 0 0;"></image>
<view class="layboxTitle"> <view class="layboxTitle">
预约成功 预约成功
</view> </view>
...@@ -160,6 +170,7 @@ ...@@ -160,6 +170,7 @@
</view> </view>
</view> </view>
</van-overlay> </van-overlay>
<OtherTeacherTime :show="showOtherTime" :infoList="OtherTimeList" @close="closeOtherTeacherTime" @change="changeTime"/>
</view> </view>
</template> </template>
...@@ -176,9 +187,11 @@ ...@@ -176,9 +187,11 @@
getToday getToday
} from '../../utils/date.js' } from '../../utils/date.js'
import Navbar from '../../components/navbar.vue' import Navbar from '../../components/navbar.vue'
import OtherTeacherTime from '../../components/subscribe/otherTeacherTime.vue'
export default { export default {
components: { components: {
Navbar Navbar,
OtherTeacherTime
}, },
props: ['day'], props: ['day'],
setup(props) { setup(props) {
...@@ -187,7 +200,7 @@ ...@@ -187,7 +200,7 @@
} = getCurrentInstance() } = getCurrentInstance()
const data = reactive({ const data = reactive({
isShowCalendar: false, isShowCalendar: false,
showlay:false, showlay: false,
date: "2月1号", date: "2月1号",
dateStr: "", dateStr: "",
year: "", year: "",
...@@ -203,16 +216,20 @@ ...@@ -203,16 +216,20 @@
courselist: [], courselist: [],
schoolName: "", schoolName: "",
roomName: "", roomName: "",
latestTime:"00:00",//最后预约的课时
showOtherTime:false,
OtherTimeList:[]
}) })
const methods = { const methods = {
onConfirmCalendar(val) { onConfirmCalendar(val) {
data.isShowCalendar = false data.isShowCalendar = false
this.getDateData(val.detail) this.getDateData(val.detail)
data.msg.Date = DateFormat(val.detail) data.msg.Date = DateFormat(val.detail)
data.current=0 data.current = 0
this.getTeacherList() this.getTeacherList()
console.log(86, data.msg.Date) console.log(86, data.msg.Date)
}, },
// 获取日期
getDateData(d) { getDateData(d) {
let date = new Date() let date = new Date()
if (d) { if (d) {
...@@ -255,7 +272,13 @@ ...@@ -255,7 +272,13 @@
data.schoolName = data.teacherList[val.detail.current].SchoolName data.schoolName = data.teacherList[val.detail.current].SchoolName
data.roomName = data.teacherList[val.detail.current].RoomName data.roomName = data.teacherList[val.detail.current].RoomName
methods.courseGroup() methods.courseGroup()
data.courselist.map(e=>{
if(e.State==4){
data.latestTime=e.StartTime
}
})
}, },
//获取老师列表
getTeacherList() { getTeacherList() {
uni.showLoading({ uni.showLoading({
title: '加载中...' title: '加载中...'
...@@ -268,6 +291,12 @@ ...@@ -268,6 +291,12 @@
data.schoolName = data.teacherList[0].SchoolName data.schoolName = data.teacherList[0].SchoolName
data.roomName = data.teacherList[0].RoomName data.roomName = data.teacherList[0].RoomName
methods.courseGroup() methods.courseGroup()
data.courselist.map(e=>{
if(e.State==4){
data.latestTime=e.StartTime
}
})
} else { } else {
data.courselist = [] data.courselist = []
} }
...@@ -294,26 +323,34 @@ ...@@ -294,26 +323,34 @@
}) })
data.courselist = Array.from(new Set(data.courselist)) data.courselist = Array.from(new Set(data.courselist))
}, },
//获取约课的基础信息
getBaseInfo() { getBaseInfo() {
proxy.$request("/AppletCenter/GetScrollAppointmentBaseInfo", {}).then(res => { proxy.$request("/AppletCenter/GetScrollAppointmentBaseInfo", {}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
data.basics = res.Data; data.basics = res.Data;
const date = new Date() const date = new Date()
const y = date.getFullYear() const y = date.getFullYear()
const m = date.getMonth() + 1 const m = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date
.getMonth() + 1
const d = date.getDate() const d = date.getDate()
const maxStr = y + '-' + m + '-' + (d + res.Data.AppointDay - 1) const maxStr = y + '-' + m + '-' + (d + res.Data.AppointDay - 1)
data.maxDateStr = new Date(maxStr).getTime() data.maxDateStr = new Date(maxStr).getTime()
if (res.Data.AdvanceDay) { if (res.Data.AdvanceDay) {
const minStr = y + '-' + m + '-' + (d + res.Data.AdvanceDay) const minStr = y + '-' + m + '-' + ((d + res.Data.AdvanceDay) < 10 ? '0' + (d +
res.Data.AdvanceDay) : (d + res.Data.AdvanceDay))
data.minDateStr = new Date(minStr).getTime() data.minDateStr = new Date(minStr).getTime()
this.getDateData(minStr) this.getDateData(minStr)
data.msg.Date = minStr data.msg.Date = minStr
} }
if (res.Data.Scroll_OpenSchool == 1) {
let schoolId = uni.getStorageInfoSync('userInfo').School_Id
data.msg.School_Id = schoolId
}
this.getTeacherList() this.getTeacherList()
} }
}) })
}, },
//更新约课的基础信息
updateBaseInfo() { updateBaseInfo() {
proxy.$request("/AppletCenter/GetScrollAppointmentBaseInfo", {}).then(res => { proxy.$request("/AppletCenter/GetScrollAppointmentBaseInfo", {}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
...@@ -321,13 +358,14 @@ ...@@ -321,13 +358,14 @@
} }
}) })
}, },
updateTeacherList(){ updateTeacherList() {
uni.showLoading({ uni.showLoading({
title: '加载中...' title: '加载中...'
}) })
proxy.$request("/AppletCenter/GetScrollAppointmentTeacherList", data.msg).then(res => { proxy.$request("/AppletCenter/GetScrollAppointmentTeacherList", data.msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
data.teacherList = res.Data; data.teacherList = res.Data;
console.log(355,data.latestTime)
if (data.teacherList.length > 0) { if (data.teacherList.length > 0) {
data.courselist = data.teacherList[data.current].CourseTimeList data.courselist = data.teacherList[data.current].CourseTimeList
data.schoolName = data.teacherList[data.current].SchoolName data.schoolName = data.teacherList[data.current].SchoolName
...@@ -345,31 +383,33 @@ ...@@ -345,31 +383,33 @@
url: '/pages/appointment/mySubscribe', url: '/pages/appointment/mySubscribe',
}); });
}, },
goIndex(){ goIndex() {
uni.switchTab({ uni.switchTab({
url:'/pages/index/index' url: '/pages/index/index'
}) })
}, },
//选课
checkCourse(index) { checkCourse(index) {
if(data.basics.AdvanceDay==1){ if (data.basics.AdvanceDay == 1) {
const lateTime =new Date( getToday()+' '+data.basics.ScrollETime).getTime() const lateTime = new Date(getToday() + ' ' + data.basics.ScrollETime).getTime()
const nowTime=new Date().getTime() const nowTime = new Date().getTime()
if(nowTime>lateTime){ const targetDay=parseInt(data.msg.Date.slice(-2))
const curDay=parseInt(getToday().slice(-2))
if (nowTime > lateTime&&(targetDay-curDay===1)) {
uni.showToast({ uni.showToast({
icon:'none', icon: 'none',
title:`${data.basics.ScrollETime}点后不可预约明天课程` title: `${data.basics.ScrollETime}点后不可预约明天课程`
}) })
return return
} }
} }
if(data.basics.AppointDate){ if (data.basics.AppointDate) {
const lateDate =new Date(data.basics.AppointDate).getTime() const lateDate = new Date(data.basics.AppointDate).getTime()
const curSubDate=new Date(data.msg.Date).getTime() const curSubDate = new Date(data.msg.Date).getTime()
console.log(curSubDate<lateDate) if (curSubDate < lateDate) {
if(curSubDate<lateDate){
uni.showToast({ uni.showToast({
icon:'none', icon: 'none',
title:`需预约${data.basics.AppointDate}之后的日期` title: `不能预约${data.basics.AppointDate}之前的日期`
}) })
return return
} }
...@@ -385,10 +425,12 @@ ...@@ -385,10 +425,12 @@
}) })
return return
} else { } else {
console.log(428,ShiftSortArr)
this.mapNextCourse(index, ShiftSortArr, RemainTime) this.mapNextCourse(index, ShiftSortArr, RemainTime)
} }
} else if (RemainTime == 0) { } else if (RemainTime == 0) {
this.subscribe() // this.subscribe(ShiftSortArr)
this.validateAppointment(ShiftSortArr)
} else { } else {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
...@@ -397,6 +439,7 @@ ...@@ -397,6 +439,7 @@
} }
}, },
//课时不足,依次加入下一节
mapNextCourse(index, ShiftSortArr = [], RemainTime) { mapNextCourse(index, ShiftSortArr = [], RemainTime) {
let nexIndex = index + 1 let nexIndex = index + 1
let nexCourse = data.courselist[nexIndex] let nexCourse = data.courselist[nexIndex]
...@@ -404,7 +447,9 @@ ...@@ -404,7 +447,9 @@
let RemainTime2 = RemainTime - nexCourse.Minutes //剩余课时 let RemainTime2 = RemainTime - nexCourse.Minutes //剩余课时
ShiftSortArr.push(nexCourse) ShiftSortArr.push(nexCourse)
if (RemainTime2 === 0) { if (RemainTime2 === 0) {
this.subscribe(ShiftSortArr) // this.subscribe(ShiftSortArr)
this.validateAppointment(ShiftSortArr)
} else if (RemainTime2 > 0) { } else if (RemainTime2 > 0) {
this.mapNextCourse(nexIndex, ShiftSortArr, RemainTime2) this.mapNextCourse(nexIndex, ShiftSortArr, RemainTime2)
} else { } else {
...@@ -420,25 +465,26 @@ ...@@ -420,25 +465,26 @@
}) })
} }
}, },
//预约已有学员的课
checkCourseType2(item) { checkCourseType2(item) {
if(data.basics.AdvanceDay==1){ if (data.basics.AdvanceDay == 1) {
const lateTime =new Date( getToday()+' '+data.basics.ScrollETime).getTime() const lateTime = new Date(getToday() + ' ' + data.basics.ScrollETime).getTime()
const nowTime=new Date().getTime() const nowTime = new Date().getTime()
if(nowTime>lateTime){ if (nowTime > lateTime) {
uni.showToast({ uni.showToast({
icon:'none', icon: 'none',
title:`${data.basics.ScrollETime}点后不可预约明天课程` title: `${data.basics.ScrollETime}点后不可预约明天课程`
}) })
return return
} }
} }
if(data.basics.AppointDate){ if (data.basics.AppointDate) {
const lateDate =new Date(data.basics.AppointDate).getTime() const lateDate = new Date(data.basics.AppointDate).getTime()
const curSubDate=new Date(data.msg.Date).getTime() const curSubDate = new Date(data.msg.Date).getTime()
if(curSubDate<lateDate){ if (curSubDate < lateDate) {
uni.showToast({ uni.showToast({
icon:'none', icon: 'none',
title:`需预约${data.basics.AppointDate}之后的日期` title: `需预约${data.basics.AppointDate}之后的日期`
}) })
return return
} }
...@@ -472,9 +518,19 @@ ...@@ -472,9 +518,19 @@
if (res.Code == 1) { if (res.Code == 1) {
methods.updateBaseInfo() methods.updateBaseInfo()
methods.updateTeacherList() methods.updateTeacherList()
data.showlay=true data.showlay = true
} }
}) })
// console.log(486, res)
// if (res[data.basics.TempleteList[0]] == 'accept') {
// } else {
// uni.showToast({
// icon: 'none',
// title: "订阅失败,请重新预约"
// })
// }
}, },
fail() { fail() {
uni.showToast({ uni.showToast({
...@@ -484,16 +540,93 @@ ...@@ -484,16 +540,93 @@
} }
}) })
}, },
back(){ back() {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
} },
// 验证约课时段
validateAppointment(ShiftSortArr) {
const techerInfo = data.teacherList[data.current]
const msg = {
Date: data.msg.Date,
AccountId: techerInfo.AccountId,
TeacherId: techerInfo.TeacherId,
ShiftSort: ShiftSortArr.map(e => e.Sort).toString(),
CourseId: data.basics.CourseId,
ChapterNo: data.basics.NextAppointChapterNo,
}
proxy.$request("/AppletCenter/ValidateToDayAppointment", msg).then(res => {
if (res.Data.State == 0 || res.Data.State == 1) {
this.subscribe(ShiftSortArr)
}else if(res.Data.State == 2||res.Data.State == 3){
console.log('验证约课时段', res)
data.OtherTimeList=res.Data.TimeList
data.showOtherTime=true
}
})
},
// IsShowBtn(s='00:00'){
// let eArr=data.latestTime.split(':')
// let eStr=eArr[0]*3600+eArr[1]*60
// let sArr=s.split(':')
// let sStr=sArr[0]*3600+sArr[1]*60
// },
closeOtherTeacherTime(val){
data.showOtherTime = val
},
//切换-预约其他老师的课
changeTime(item){
const obj = {
Date: data.msg.Date,
AccountId: item.AccountId,
TeacherId: item.TeacherId,
ShiftSort: item.ShiftSort,
CourseId: data.basics.CourseId,
ChapterNo: data.basics.NextAppointChapterNo,
}
uni.requestSubscribeMessage({
tmplIds: data.basics.TempleteList,
success(res) {
proxy.$request("/AppletCenter/SetScrollAppointment", obj).then(res => {
if (res.Code == 1) {
data.showOtherTime=false
let findIndex= data.teacherList.findIndex(e=>{
return e.TeacherId==item.TeacherId
})
console.log(findIndex)
if(findIndex){
data.current=findIndex
}
methods.updateBaseInfo()
methods.updateTeacherList()
data.showlay = true
}
})
// if (res[data.basics.TempleteList[0]] == 'accept') {
// } else {
// uni.showToast({
// icon: 'none',
// title: "订阅失败,请重新预约"
// })
// }
},
fail() {
uni.showToast({
icon: 'none',
title: "订阅失败,请重新预约"
})
}
})
},
} }
onMounted(() => { onMounted(() => {
methods.getDateData() methods.getDateData()
// methods.getTeacherList()
methods.getBaseInfo() methods.getBaseInfo()
}) })
return { return {
...toRefs(data), ...toRefs(data),
...@@ -533,15 +666,12 @@ ...@@ -533,15 +666,12 @@
.swiper-item { .swiper-item {
width: 100%; width: 100%;
height: 235rpx; height: 235rpx;
/* background-color: #f0fed1; */
margin: 0 10rpx; margin: 0 10rpx;
border-radius: 20rpx; border-radius: 20rpx;
display: flex; display: flex;
align-items: center; align-items: center;
/* overflow: hidden; */
box-shadow: 4rpx 3rpx 10rpx 0rpx rgba(212, 212, 212, 0.6); box-shadow: 4rpx 3rpx 10rpx 0rpx rgba(212, 212, 212, 0.6);
box-sizing: border-box; box-sizing: border-box;
padding: 0 40rpx;
} }
.swiper-item .imgBox { .swiper-item .imgBox {
...@@ -587,7 +717,6 @@ ...@@ -587,7 +717,6 @@
.top { .top {
width: 678rpx; width: 678rpx;
/* height: 174rpx; */
background-color: #4C50E7; background-color: #4C50E7;
border-radius: 24rpx 24rpx 0px 0px; border-radius: 24rpx 24rpx 0px 0px;
margin: 60rpx auto; margin: 60rpx auto;
...@@ -775,7 +904,6 @@ ...@@ -775,7 +904,6 @@
align-content: space-around; align-content: space-around;
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx 0 20rpx 30rpx; padding: 20rpx 0 20rpx 30rpx;
/* margin-right: 100rpx; */
position: relative; position: relative;
border-bottom: 1px solid #E9E9E9; border-bottom: 1px solid #E9E9E9;
} }
...@@ -846,7 +974,8 @@ ...@@ -846,7 +974,8 @@
color: #111111; color: #111111;
margin-top: 10rpx; margin-top: 10rpx;
} }
.laybox{
.laybox {
width: 462rpx; width: 462rpx;
height: 607rpx; height: 607rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
...@@ -855,9 +984,10 @@ ...@@ -855,9 +984,10 @@
top: 50%; top: 50%;
left: 50%; left: 50%;
z-index: 9; z-index: 9;
transform: translate(-50%,-50%); transform: translate(-50%, -50%);
} }
.laybox .layboxTitle{
.laybox .layboxTitle {
font-size: 36rpx; font-size: 36rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 800; font-weight: 800;
...@@ -865,7 +995,8 @@ ...@@ -865,7 +995,8 @@
text-align: center; text-align: center;
margin-top: 20rpx; margin-top: 20rpx;
} }
.laybox .layboxBtn1{
.laybox .layboxBtn1 {
width: 292rpx; width: 292rpx;
height: 80rpx; height: 80rpx;
background-color: #4C50E7; background-color: #4C50E7;
...@@ -878,7 +1009,8 @@ ...@@ -878,7 +1009,8 @@
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
} }
.laybox .layboxBtn2{
.laybox .layboxBtn2 {
width: 292rpx; width: 292rpx;
height: 80rpx; height: 80rpx;
background-color: #E4E5FB; background-color: #E4E5FB;
...@@ -891,7 +1023,8 @@ ...@@ -891,7 +1023,8 @@
font-weight: 500; font-weight: 500;
color: #4C50E7; color: #4C50E7;
} }
.laybox .layboxBtn3{
.laybox .layboxBtn3 {
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
font-family: PingFang SC; font-family: PingFang SC;
......
...@@ -240,10 +240,18 @@ ...@@ -240,10 +240,18 @@
</view> </view>
<view class="listItemBox3"> <view class="listItemBox3">
<view class="label"> <view class="label">
学生 教室
</view> </view>
<view class="con"> <view class="con">
{{x.StuName}} {{x.RoomName}}
</view>
</view>
<view class="listItemBox3">
<view class="label">
校区
</view>
<view class="con">
{{x.RoomSchoolName}}
</view> </view>
</view> </view>
<view class="listItemBox3"> <view class="listItemBox3">
...@@ -375,29 +383,13 @@ ...@@ -375,29 +383,13 @@
EntTime: '', EntTime: '',
State: 0, State: 0,
TeacherId: 0, TeacherId: 0,
Q_SelectNormal:1,
}, },
TeacherName: "", TeacherName: "",
pageState: "more", pageState: "more",
PageCount: 0, PageCount: 0,
timer: null, //防抖 timer: null, //防抖
List: [{ List: [],
Date: "2020-01-01",
CourseTimeList: [{
StartTime: '09:00',
Minutes: 90,
EndTime: "12:00"
}, {
StartTime: '09:00',
Minutes: 90,
EndTime: "12:00"
}],
CourseName: "内部斑",
StuName: "张三",
ChapterNo: 1,
TeacherName: "张三",
StateName: '待确认',
State: 1,
}, ],
stateList: [], stateList: [],
show: false, show: false,
AppointId: 0, AppointId: 0,
...@@ -413,6 +405,11 @@ ...@@ -413,6 +405,11 @@
}) })
let methods = { let methods = {
getList() { getList() {
if(data.msg.State==0){
data.msg.Q_SelectNormal=1
}else{
data.msg.Q_SelectNormal=0
}
data.pageState = "loading"; data.pageState = "loading";
proxy.$request("/AppletCenter/GetMyAppointPageList", data.msg).then(res => { proxy.$request("/AppletCenter/GetMyAppointPageList", data.msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
......
...@@ -150,6 +150,7 @@ ...@@ -150,6 +150,7 @@
code code
}) })
if (res && res.Data.phoneNumber) { if (res && res.Data.phoneNumber) {
console.log('dsadas', res)
data.obj.phoneNum = res.Data.phoneNumber data.obj.phoneNum = res.Data.phoneNumber
// data.obj.phoneNum = '18328620563' // data.obj.phoneNum = '18328620563'
data.obj.openid = res.Data.openid data.obj.openid = res.Data.openid
......
...@@ -22,9 +22,6 @@ ...@@ -22,9 +22,6 @@
<view class="scanBox" @click="scan"> <view class="scanBox" @click="scan">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/scan2x.png" <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/scan2x.png"
mode="aspectFit" class="scanIcon"></image> mode="aspectFit" class="scanIcon"></image>
<!-- <view class="scanText">
签到
</view> -->
</view> </view>
</view> </view>
</navbar> </navbar>
......
...@@ -2,9 +2,6 @@ ...@@ -2,9 +2,6 @@
<view class="person"> <view class="person">
<view class="info flex_between_center flex_nowrap"> <view class="info flex_between_center flex_nowrap">
<view class="left flex_start_between"> <view class="left flex_start_between">
<!-- <view class="date">
2021年12月30日
</view> -->
<view class="name"> <text v-if="pageData.StuName">Hello,{{ pageData.StuName }}</text><text <view class="name"> <text v-if="pageData.StuName">Hello,{{ pageData.StuName }}</text><text
v-if="!pageData.StuName&&pageData.StuName!==''" v-if="!pageData.StuName&&pageData.StuName!==''"
@click="jumpPage('/pages/login/login')">未登录</text> </view> @click="jumpPage('/pages/login/login')">未登录</text> </view>
...@@ -43,16 +40,24 @@ ...@@ -43,16 +40,24 @@
</view> </view>
</view> </view>
</view> </view>
<view class="courseInfo" v-if="pageData.CourseInfo.State==2">
<view class="courseInfo">
<view class="title">课程信息</view> <view class="title">课程信息</view>
<view style="display: flex;justify-content: space-between;"> <view style="display: flex; justify-content: space-between;padding: 0 22rpx;margin-top: 30rpx;">
<view style="margin-left: 17px;">
<!-- <view class="title" @click="jumpPage(`/pages/appointment/mySubscribe`)"> <view style="font-size: 13px;font-family: PingFang SC;font-weight: bold;color: #111111;">暂无课程</view>
约课记录 <view
</view> --> style="font-size: 10px;font-family: PingFang SC;font-weight: 400;color: #888888;margin-top: 10px;">
购买课程后可回顾</view>
</view>
<view>
<image style="width: 234rpx;height: 226rpx;" mode="aspectFit"
src='https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/studyindex_nan.png'>
</image>
</view>
</view> </view>
</view>
<view class="courseInfo" v-if="pageData.CourseInfo.State==1">
<view class="title">课程信息</view>
<view class="statistic"> <view class="statistic">
<view class="statisticItem"> <view class="statisticItem">
<view class="time">{{ pageData.CourseInfo.TotalHours||0 }} <view class="time">{{ pageData.CourseInfo.TotalHours||0 }}
...@@ -62,19 +67,16 @@ ...@@ -62,19 +67,16 @@
</view> </view>
<view class="statisticItem"> <view class="statisticItem">
<view class="time">{{ pageData.CourseInfo.CompleteHours||0 }} <view class="time">{{ pageData.CourseInfo.CompleteHours||0 }}
<!-- <text class="unit"></text> -->
</view> </view>
<view class="statisticName">已学课时</view> <view class="statisticName">已学课时</view>
</view> </view>
<view class="statisticItem"> <view class="statisticItem">
<view class="time">{{ pageData.CourseInfo.AbsenceNum||0 }} <view class="time">{{ pageData.CourseInfo.AbsenceNum||0 }}
<!-- <text class="unit"></text> -->
</view> </view>
<view class="statisticName">缺勤课时</view> <view class="statisticName">缺勤课时</view>
</view> </view>
<view class="statisticItem"> <view class="statisticItem">
<view class="time">{{ pageData.CourseInfo.LeaveNum||0 }} <view class="time">{{ pageData.CourseInfo.LeaveNum||0 }}
<!-- <text class="unit"></text> -->
</view> </view>
<view class="statisticName">请假课时</view> <view class="statisticName">请假课时</view>
</view> </view>
...@@ -114,14 +116,17 @@ ...@@ -114,14 +116,17 @@
<view class="className one_line">{{ <view class="className one_line">{{
pageData.CourseInfo.CourseName pageData.CourseInfo.CourseName
}}</view> }}</view>
<view class="Grade" style="margin-bottom:20rpx">{{ <view class="Grade" style="margin-bottom:20rpx" v-if="pageData.CourseInfo.ClassScrollType!==2">{{
pageData.CourseInfo.ClassName pageData.CourseInfo.ClassName
}}</view> }}</view>
<view class="Grade">等级:{{ pageData.CourseInfo.CourseRate||'' }}</view> <view class="Grade">等级:{{ pageData.CourseInfo.CourseRate||'' }}</view>
<view><text class="Grade">状态:</text> <view><text class="Grade">状态:</text>
<text class="StatusName" v-if="pageData.CourseInfo.ClassStatusName">{{ <text class="StatusName" v-if="pageData.CourseInfo.TotalHours>pageData.CourseInfo.CompleteHours">
pageData.CourseInfo.ClassStatusName 学习中
}}</text> </text>
<text class="StatusName" v-if="pageData.CourseInfo.TotalHours==pageData.CourseInfo.CompleteHours">
已结课
</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -182,10 +187,12 @@ ...@@ -182,10 +187,12 @@
pageData: { pageData: {
AssistList: [] AssistList: []
}, },
yuyueNum:0 yuyueNum: 0
}); });
const methods = { const methods = {
jumpPage(url) { jumpPage(url) {
uni.navigateTo({ uni.navigateTo({
url: url, url: url,
}); });
...@@ -201,20 +208,20 @@ ...@@ -201,20 +208,20 @@
}); });
}, },
getyuyue() { getyuyue() {
const msg={ const msg = {
pageIndex: 1, pageIndex: 1,
pageSize: 1, pageSize: 1,
StartTime: '', StartTime: '',
EntTime: '', EntTime: '',
State: 0, State: 0,
TeacherId: 0, TeacherId: 0,
Q_SelectNormal: 1,
} }
proxy.$request("/AppletCenter/GetMyAppointPageList", msg).then(res => { proxy.$request("/AppletCenter/GetMyAppointPageList", msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
data.yuyueNum=res.Data.Count data.yuyueNum = res.Data.Count
} }
}) })
}, },
}; };
let that = methods; let that = methods;
......
...@@ -5,12 +5,6 @@ ...@@ -5,12 +5,6 @@
<view class="navbar"> <view class="navbar">
<van-nav-bar title="课表" fixed title-class="navTitle"> <van-nav-bar title="课表" fixed title-class="navTitle">
<view slot="left" class="chooseDate flex flex_start_center"> <view slot="left" class="chooseDate flex flex_start_center">
<!-- <van-icon
name="arrow-left"
size="36rpx"
style="margin-right: 10rpx"
@click="back"
/> -->
<view @click="showdatetime">{{ currentDate }}</view> <view @click="showdatetime">{{ currentDate }}</view>
</view> </view>
</van-nav-bar> </van-nav-bar>
......
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