Commit 888a3173 authored by zhengke's avatar zhengke

修改

parent 906db301
......@@ -507,7 +507,11 @@
"path": "personal/pointBalance"//点数余额
},{
"path": "personal/pointRecharge"//充值点数
}
},{
"path":"personal/studentAppointmentList" //学生约课列表
},{
"path":"personal/studentAppointmentInfo" //学生约课详情
}
]
},
//抖音商品短视频
......
<style>
.orderInfo_Content {
width: 100%;
height:100%;
padding-top:15px;
background-color: #F3F5F7;
position: relative;
}
.orderInfo_List {
width: 94%;
padding:10px 15px;
margin:0 auto 10px;
background-color: #fff;
min-height: 100px;
border-radius:10px;
}
.stuInfo_Title{
color:#111111;
font-size: 16px;
font-weight: bold;
margin-left:5px;
}
.stuinfo_List{
width:100%;
height:43px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom:1px solid #EFEEEB;
}
.stuinfo_List:last-child{
border: 0;
}
.stuinfo_Title{
color:#111111;
font-size:14px;
}
.stuinfo_RightCon{
font-weight: bold;
}
.stu_OrderRoom{
color: #111111;
font-size: 14px;
margin-top:5px;
}
.stuinfo_platInfo{
width:100%;
height:96px;
background-color: #E2CC9D;
color:#BBA16B;
padding:10px;
border-radius: 9px;
margin:20px 0 10px 0;
}
.orderInfoBtn{
width:90%;
height:40px;
border-radius: 4px;
background-color: #40766E;
color:#fff;
text-align: center;
line-height: 40px;
position: absolute;
bottom:10px;
margin-left:20px;
}
</style>
<template>
<view class="quick-box" 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">
<image mode="aspectFill" :src="dataList.TeacherLogo" style="width: 25px; height: 25px;border-radius: 50%;" ></image>
<text class="teacherName">{{dataList.TeacherName}}</text>
</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 class="stuinfo_List">
<view class="stuinfo_Title">上课状态</view>
<view class="stuinfo_Title stuinfo_RightCon">{{dataList.OrderStatusName}}</view>
</view>
<view class="stuinfo_List" v-if="dataList.OrderStaus==1">
<view class="stuinfo_Title">花费点数</view>
<view class="stuinfo_Title stuinfo_RightCon">56点</view>
</view>
</view>
<view class="orderInfo_List">
<view class="stu_OrderRoom">房间信息</view>
<view class="stuinfo_platInfo">
<text>平台名称:抖音;房间号589;入场码888</text>
</view>
</view>
<view class="orderInfoBtn" v-if="dataList.OrderStaus==1">
支付 56点
</view>
</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: {},
msg:{
OrderId:0,
},
//内容数据
dataList: {},
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,
});
},
onLoad(option) {
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
}
console.log(option,'option');
this.msg.OrderId = option.OrderId;
this.getData();
},
methods: {
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
// this.showAuth=false;
this.getContent();
},
//关闭登录窗口
gbAuth() {
uni.navigateBack()
},
//获取列表数据
getData(){
uni.showLoading({
title: '加载中'
});
this.request2({
url: "/api/AppletPoint/GetPointOrderInfo",
data: this.msg,
},
(res) => {
uni.hideLoading();
if (res.resultCode == 1) {
this.dataList = res.data;
console.log(res,'数据来也');
}
}
);
},
},
};
</script>
<style>
.order_Content {
width: 100%;
height:100%;
padding-top:15px;
background-color: #F3F5F7;
}
.order_List {
width: 94%;
padding:10px 15px;
margin:0 auto 10px;
background-color: #fff;
min-height: 100px;
border-radius:10px;
position: relative;
}
.student_Title{
display: flex;
justify-content: space-between;
border-bottom:1px solid #EFEEEB;
align-items: center;
padding-bottom:10px;
}
.student_ClassName{
width:130px;
color:#111111;
font-size:14px;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
margin:-5px 0 0 30px;
}
.stu_InfoBtn{
width:70px;
height:25px;
background-color: #40766E;
color:#fff;
border-radius: 6px;
text-align: center;
line-height: 25px;
font-size:12px;
}
.teacherName{
color:#111111;
font-size:14px;
margin-left:3px;
}
.stu_tookie{
font-size:12px;
}
.stu_plateList{
width:100%;
height:32px;
background-color: #E2CC9D;
border-radius: 2px;
color:#BBA16B;
padding-left:10px;
font-size:12px;
line-height: 32px;
margin-bottom:15px;
}
.stu_Dian{
margin:-6px 10px 0 10px;
}
.stu_StutasImg{
width:22px;
height:36px;
position: absolute;
left:10px;
top:-4px;
}
</style>
<template>
<view class="quick-box" 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="order_List" v-for="(item,index) in dataList" :key="index" @click="goDetail(item)">
<image v-if="item.OrderStaus==1" src="../../../static/images/dzf.png" class="stu_StutasImg"></image>
<image v-if="item.OrderStaus==2" src="../../../static/images/dsk.png" class="stu_StutasImg"></image>
<image v-if="item.OrderStaus==3" src="../../../static/images/ygs.png" class="stu_StutasImg"></image>
<image v-if="item.OrderStaus==4" src="../../../static/images/ywc.png" class="stu_StutasImg"></image>
<view class="student_Title">
<view class="student_ClassName">{{item.CourseName}}</view>
<view class="stu_InfoBtn" v-if="item.OrderStaus==1">去支付</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:13px 0;">
<view style="display:flex;align-items: center;">
<image mode="aspectFill" :src="item.TeacherLogo" style="width: 25px; height: 25px;border-radius: 50%;" ></image>
<text class="teacherName">{{item.TeacherName}}</text>
</view>
<view class="stu_tookie" style="display: flex;align-items: center;margin-left: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 style="font-size: 12px;">{{item.OrderStatusName}}</view> -->
</view>
<view class="stu_plateList" :style="{'color:#969696':item.OrderStaus==4}">
平台名称:抖音;房间号678;入场码888
</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,
OrderStaus:0,
TeacherId:0,
CourseId:0,
ID:0,
StartTime:'',
EndTime:''
},
headData: [], //头部切换数据
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.getHeadList();
}
},
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();
},
//获取头部数据
getHeadList() {
this.request2({
url: "/api/AppletPoint/GetOrderStausEnumList",
data: {},
},
(res) => {
if (res.resultCode == 1) {
this.headData = res.data;
var obj = {
Id: 0,
Name: '全部'
}
this.headData.unshift(obj);
this.msg.OrderStaus=this.headData[this.current].Id;
this.getContent();
}
}
);
},
//获取列表数据
getContent(num){
if (num == 1) {
this.dataList = [];
}
uni.showLoading({
title: '加载中'
});
this.request2({
url: "/api/AppletPoint/GetPointOrderPageList",
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.OrderStaus = 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/studentAppointmentInfo?OrderId='+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