Commit 3e602c91 authored by zhengke's avatar zhengke

修改

parent 7ab1e81b
......@@ -517,8 +517,12 @@
"path": "confirmAppointment"//预约课程
},{
"path": "traineeList"//预约的学员列表
}
]
},{
"path": "personal/teacherOrderList" //约课列表-老师
},{
"path": "personal/teacherOrderInfo" //约课列表-老师详情
}
]
},
//抖音商品短视频
{
......
<style>
.teacherOrderInfo .orderInfo_Content {
width: 100%;
height:100%;
padding-top:15px;
background-color: #F3F5F7;
position: relative;
}
.teacherOrderInfo .orderInfo_List {
width: 94%;
padding:10px 15px;
margin:0 auto 10px;
background-color: #fff;
min-height: 100px;
border-radius:10px;
font-size:13px;
}
.teacherOrderInfo .stuInfo_Title{
color:#111111;
font-size: 16px;
font-weight: bold;
margin-left:5px;
}
.teacherOrderInfo .stuinfo_List{
width:100%;
height:50px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom:1px solid #EFEEEB;
}
.stuinfo_List:last-child{
border: 0;
}
.teacherOrderInfo .teacherOrder_List{
width:100%;
min-height:50px;
margin-bottom:20px;
padding-bottom:5px;
border-bottom:1px solid #EFEEEB;
}
.teacherOrder_List:last-child{
border:0;
}
.teacherOrderInfo .stuinfo_Title{
color:#111111;
font-size:14px;
}
.teacherOrderInfo .stuinfo_RightCon{
font-weight: bold;
}
.teacherOrderInfo .stu_OrderRoom{
color: #111111;
font-size: 14px;
margin-top:5px;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom:20px;
}
.teacherOrderInfo .stuinfo_platInfo{
width:100%;
height:96px;
background-color: #E2CC9D;
color:#BBA16B;
padding:10px;
border-radius: 9px;
margin:20px 0 10px 0;
}
.teacherOrderInfo .orderInfoBtn{
width:93%;
height:40px;
border-radius: 4px;
background-color: #40766E;
color:#fff;
text-align: center;
line-height: 40px;
position: absolute;
bottom:20px;
margin-left:15px;
}
.teacherOrderInfo .teacherName{
margin-left:5px;
width:130px;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
.teacherOrderInfo .Torder_InnerList{
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom:10px;
}
.teacherOrderInfo .teach_InfoBtn{
display:inline-block;
width:60px;
height:25px;
background-color: #40766E;
color:#fff;
border-radius: 6px;
text-align: center;
line-height: 25px;
font-size:12px;
}
.teacherOrderInfo .teacherOrder_List:last-child{
margin-bottom:0;
}
.teacherOrderInfo .teacher_plateList{
width:100%;
height:35px;
background-color: #F8F5EA;
border-radius: 2px;
color:#B7A266;
padding-left:10px;
font-size:12px;
line-height: 35px;
margin:15px 0;
}
</style>
<template>
<view class="quick-box teacherOrderInfo" style="height:100vh;background:#F3F5F7;">
<u-empty v-if="dataList.length==0" text="暂无数据" mode="data"></u-empty>
<view class="orderInfo_Content" v-else>
<view class="orderInfo_List">
<view style="display:flex;align-items: center;">
<image style="width:22px;height:36px;" src="../../../static/images/dzf.png"></image>
<text class="stuInfo_Title">{{dataList.CourseName}}</text>
</view>
<view class="stuinfo_List">
<view class="stuinfo_Title">上课时间</view>
<view class="stuinfo_Title stuinfo_RightCon">{{dataList.StudyDate}}</view>
</view>
<view class="stuinfo_List">
<view class="stuinfo_Title">课程时长</view>
<view class="stuinfo_Title stuinfo_RightCon">{{dataList.StudyDuration}}{{dataList.DurationUnit}}</view>
</view>
<view class="stuinfo_List">
<view class="stuinfo_Title">课程类型</view>
<view class="stuinfo_Title stuinfo_RightCon">{{dataList.CourseClassTypeName}}</view>
</view>
</view>
<view class="orderInfo_List">
<view class="stu_OrderRoom">
<view>订单列表</view>
<view>订单数:{{dataList.OrderList.length}}</view>
</view>
<view class="teacherOrder_List" v-for="(subItem,subIndex) in dataList.OrderList">
<view style="text-align: right;margin:10px 0;">
<text v-if="subItem.OrderStaus==2" class="teach_InfoBtn" @click="goSureOrder(subItem)">去确认</text>
<text v-if="subItem.OrderStaus==3" style="color:#BBA16B;">{{subItem.OrderStausName}}</text>
<text class="teach_InfoBtn" style="margin-left:10px;" v-if="subItem.OrderStaus==3" @click="sureWancheng(subItem)">确认完成</text>
<text v-if="subItem.OrderStaus==4" style="color:#969696;">{{subItem.OrderStausName}}</text>
</view>
<view class="Torder_InnerList">
<view style="display:flex;align-items: center;">
<image mode="aspectFill" :src="subItem.UserPhoto" style="width: 28px; height: 28px;border-radius: 50%;" ></image>
<text class="teacherName">{{subItem.UserName}}</text>
</view>
<view>
<image style="width:12px;height:12px;margin-right:3px;" src="../../../static/images/tookie.png" alt=""></image>
{{subItem.StudyDate}} ({{subItem.StudyDuration}}{{subItem.DurationUnit}})
</view>
</view>
<view class="Torder_InnerList">
<view>
支付点数:{{subItem.ActualPointNum}}
</view>
<view>
下单时间:{{subItem.CreateDate}}
</view>
</view>
<template v-if="subItem.OrderStaus==2">
<textarea style="height: 50px;width:100%;margin-bottom:10px;" placeholder="请输入房间信息" v-model="sureMsg.RoomInfo"/>
</template>
<view class="teacher_plateList" v-if="subItem.RoomInfo&&subItem.OrderStaus!=2">
{{subItem.RoomInfo}}
</view>
</view>
</view>
</view>
<u-popup v-model="showModal" mode="center" length="80%">
<view style='display: flex;flex-direction: column;align-items: center;background: #fff;'>
<view style="display: flex;flex-direction: column;height:80px ;margin-left: 15px;width: 100%;">
<Text style='margin:10px;'>实际点数</Text>
<input class="uni-input inputM" style='margin-left: 10px;margin-top: 5px;' v-model="comMsg.ActualPointNum" placeholder="输入点数" />
</view>
<view style="display: flex;flex-direction: row;align-items: center;height: 50px;border-top: 1px solid #F5F5F5;width: 100%;">
<view style="width: 50%;display: flex;align-items: center;justify-content: center" @click="showModal=false">
<Text>取消</Text>
</view>
<view style="width: 50%;color: #a0cfff;display: flex;align-items: center;justify-content: center" @click="confirm">
<Text>确定</Text>
</view>
</view>
</view>
</u-popup>
<u-modal v-model="show" :content="content" :show-cancel-button='true' @confirm='queren'></u-modal>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth='gbAuth'></auth>
</view>
</template>
<script>
import auth from "@/components/auth/index";
import tabbar from "@/components/tabbar/index";
export default {
components: {
auth
},
data() {
return {
pageTitle: "课程详情",
loading: true,
mainColor: "",
u: {},
msg:{
CourseId:0,
},
sureMsg:{
CourseId:0,
TeacherId:0,
RoomInfo:'',
ID:0
},
comMsg:{
ActualPointNum:0,
ID:0
},
//内容数据
dataList: {},
show:false,
content:'',
showAuth:false,
showModal:false,
};
},
created() {
this.mainColor = this.$uiConfig.mainColor;
},
mounted() {
let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync("basedata") ?
wx.getStorageSync("basedata").bar_title : [];
pages.forEach((x) => {
if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name;
}
});
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
onLoad(option) {
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
}
console.log(option,'option');
this.msg.CourseId = option.ID;
this.getData();
},
methods: {
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.getContent();
},
//关闭登录窗口
gbAuth() {
uni.navigateBack()
},
//获取列表数据
getData(){
uni.showLoading({
title: '加载中'
});
this.request2({
url: "/api/AppletPoint/GetPointTeacherCourseDetail",
data: this.msg,
},
(res) => {
uni.hideLoading();
if (res.resultCode == 1) {
this.dataList = res.data;
console.log(res,'数据来也');
}
}
);
},
//确认订单
goSureOrder(item){
console.log(item,'item');
this.sureMsg.CourseId = item.CourseId;
this.sureMsg.TeacherId = this.dataList.TeacherId;
this.sureMsg.ID = item.ID;
this.show = true;
this.content = '是否确认?'
},
queren(){
this.request2({
url: "/api/AppletPoint/GetConfirmTeacherCourseOrder",
data: this.sureMsg,
},
(res) => {
uni.hideLoading();
if (res.resultCode == 1) {
this.getData();
}
}
);
},
//确认完成
sureWancheng(item){
this.showModal=true;
this.comMsg.ID = item.ID;
console.log(item)
this.comMsg.ActualPointNum = item.TotalPointNum;
},
confirm(){
this.request2({
url: "/api/AppletPoint/GetCompleteTeacherCourseOrder",
data: this.comMsg,
},
(res) => {
if (res.resultCode == 1) {
this.getData();
this.showModal=false;
}
}
);
}
},
};
</script>
<style>
.teacherOrderList .order_Content {
width: 100%;
height:100%;
padding-top:15px;
background-color: #F3F5F7;
}
.teacherOrderList .teacherOrder_List {
width: 94%;
padding:10px 15px;
margin:0 auto 10px;
background-color: #fff;
border-radius:10px;
position: relative;
}
.teacherOrderList .student_Title{
display: flex;
justify-content: space-between;
border-bottom:1px solid #EFEEEB;
align-items: center;
padding-bottom:10px;
}
.teacherOrderList .teacher_ClassName{
width:130px;
color:#111111;
font-size:14px;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
margin-left:20px;
font-weight: bold;
}
.teacherOrderList .teacherName{
color:#111111;
font-size:14px;
margin-left:5px;
}
.teacherOrderList .stu_tookie{
font-size:12px;
}
.teacherOrderList .stu_Dian{
color:gray;
margin:-6px 10px 0 10px;
}
.teacherOrderList .stu_StutasImg{
width:22px;
height:36px;
position: absolute;
left:10px;
top:-4px;
}
</style>
<template>
<view class="quick-box teacherOrderList" style="height:100vh;background:#F3F5F7;">
<view class="course-head">
<u-tabs name="Name" :list="headData" v-if="headData&&headData.length>1" :is-scroll="false" :current="current" :bar-width="80" :font-size="28"
:active-color="mainColor" :bold="false" @change="getChild"></u-tabs>
</view>
<u-empty v-if="dataList.length==0" text="暂无数据" mode="data"></u-empty>
<scroll-view v-else :scroll-y="true" style="background-color: #f0f4f7;" :enable-back-to-top="true" :enable-flex="true"
@scrolltolower="lower" :style="{ 'height': `calc(100% - ${scrollHeight})`}">
<view class="order_Content">
<view class="teacherOrder_List" v-for="(item,index) in dataList" :key="index" @click="goDetail(item)">
<image src="../../../static/images/dzf.png" class="stu_StutasImg"></image>
<view class="student_Title">
<view class="teacher_ClassName">{{item.CourseName}}</view>
<!-- <text v-if="item.OrderStaus==2" style="color:#4699FC;">待确认</text>
<text v-if="item.OrderStaus==3" style="color:#BBA16B;">待上课</text>
<text v-if="item.OrderStaus==4" style="color:#969696;">完成</text> -->
</view>
<view style="display: flex;align-items: center;margin:15px 0 8px 0;">
<view style="display:flex;align-items: center;">
<text class="teacherName">{{item.OrderNum}}</text>
</view>
<view class="stu_tookie" style="display: flex;align-items: center;margin:3px 0 0 20px;">
<image style="width:12px;height:12px;margin-right:3px;" src="../../../static/images/tookie.png" alt=""></image>
{{item.StudyDate}} ({{item.StudyDuration}}{{item.DurationUnit}})
<text class="stu_Dian">.</text>{{item.CourseClassTypeName}}<text class="stu_Dian">.</text>
</view>
</view>
</view>
<view style="padding:10px 0;">
<u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="0" :margin-bottom="0" bg-color="#f0f4f7" />
</view>
</view>
</scroll-view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth='gbAuth'></auth>
</view>
</template>
<script>
import auth from "@/components/auth/index";
import tabbar from "@/components/tabbar/index";
export default {
components: {
auth
},
data() {
return {
pageTitle: "约课列表",
loading: true,
mainColor: "",
u: {},
scrollHeight: 0,
pageCount: 1,
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
msg:{
pageIndex:1,
pageSize:5,
CourseStudyState:0
},
headData:[{
Name:'不限',
Id:0
},{
Name:'未上课',
Id:1
},{
Name:'已上课',
Id:2
}],
current: 0,
//内容数据
dataList: [],
index: 0,
showAuth:false,
};
},
created() {
this.mainColor = this.$uiConfig.mainColor;
},
mounted() {
let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync("basedata") ?
wx.getStorageSync("basedata").bar_title : [];
pages.forEach((x) => {
if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name;
}
});
uni.setNavigationBarTitle({
title: this.pageTitle,
});
setTimeout(() => {
this.getHeadHeight();
}, 1000);
},
onLoad(option) {
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else {
this.current = option.status || 0;
this.getContent(1);
}
},
methods: {
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
// this.showAuth=false;
this.getContent();
},
//关闭登录窗口
gbAuth() {
uni.navigateBack()
},
getHeadHeight() {
let that = this;
const query = uni.createSelectorQuery().in(this);
query
.select(".course-head")
.boundingClientRect((data) => {
that.scrollHeight = data.height + "px";
})
.exec();
},
//获取列表数据
getContent(num){
if (num == 1) {
this.dataList = [];
}
uni.showLoading({
title: '加载中'
});
this.request2({
url: "/api/AppletPoint/GetPointTeacherCoursePageList",
data: this.msg,
},
(res) => {
uni.hideLoading();
if (res.resultCode == 1) {
console.log(res,'数据来也');
this.dataList = this.dataList.concat(res.data.pageData);
this.pageCount = res.data.pageCount;
}
}
);
},
//点击头部切换
getChild(i) {
this.current = i;
this.msg.CourseStudyState = this.headData[this.current].Id;
this.getContent(1);
},
//滚动加载
lower(e) {
if (this.msg.pageIndex < this.pageCount) {
this.msg.pageIndex++;
this.status = "loading";
this.getContent();
} else {
this.status = "nomore";
}
},
//跳转到详情
goDetail(item){
uni.navigateTo({ url: '/pages/appointment/personal/teacherOrderInfo?ID='+item.ID})
},
},
};
</script>
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