Commit da76ee9a authored by 罗超's avatar 罗超

2

parent d5d2cd2b
......@@ -129,6 +129,14 @@
"navigationStyle": "custom"
}
}]
},{
"root": "pages/appointment", //约课分包
"pages":[
{"path": "list"},
{"path": "mySubscribe"},
{"path": "timeSlot"},
{"path": "record"}
]
}
],
"tabBar": {
......
......@@ -6,6 +6,13 @@
.row{
display: flex;
align-items: center;
}
.basics-block{
width: 50%;
box-sizing: border-box;
padding-left: 10rpx;
text-align: left;
font-size: 26rpx;
}
.box-top{
display: flex;
......@@ -54,28 +61,27 @@
padding: 10px;
font-size: 13px;
color: #111;
height: 100%;
height: 100%;
display: flex;
flex-wrap: wrap;
align-content: space-around;
}
</style>
<template>
<div class="Appointmentlist">
<view class="basics">
<view class="basics-box">
<view class="row" style="justify-content: space-between;">
<view class="row">
提前几天预约:{{basics.AdvanceDay}}
</view>
<view class="row">
可预约时间:{{basics.ScrollETime}}
</view>
<view class="row basics-block" >
提前几天预约:{{basics.AdvanceDay||0}}
</view>
<view class="row basics-block">
可预约时间:{{basics.ScrollETime||'无'}}
</view>
<view class="row" style="justify-content: space-between;">
<view class="row">
可预约的天数:{{basics.AppointDay}}
</view>
<view class="row">
是否可以继续预约:{{basics.IsNextAppoint?'是':'否'}}
</view>
<view class="row basics-block">
可预约的天数:{{basics.AppointDay||0}}
</view>
<view class="row basics-block">
是否可以继续预约:{{basics.IsNextAppoint?'是':'否'}}
</view>
</view>
</view>
......@@ -100,7 +106,7 @@
<scroll-view :scroll-y="true" style="height: calc(100vh - 100rpx - 200rpx);width: calc(100vw);">
<view class="center" v-for='(x,y) in dataList' :key = 'y' @click="gotimelist(x)">
<view class="center-box">
<view class="center-top row" >
<view class="center-top row">
<image :src='x.TeacherHead' mode="aspectFill" style="width:38px ;height: 38px;border-radius: 50%;"></image>
<view style="margin-left: 15px;padding-bottom:10px ;">
<div style="font-size: 13px;color: #111;font-weight: bold">{{x.TeacherName}}</div>
......@@ -120,8 +126,7 @@
<view v-else>
<van-empty description="暂无约课老师" />
</view>
<van-calendar :show="dateshow" @confirm="onConfirm" :default-date='defaultDate' @close='dateshow=false'/>
<van-calendar :show="dateshow" color="#2961fe" @confirm="onConfirm" :default-date='defaultDate' @close='dateshow=false'/>
</div>
</template>
......
<template>
<view class="">
</view>
</template>
<script>
import { ref,toRefs, reactive,getCurrentInstance} from 'vue'
export default {
setup(){
const data=reactive({
})
return{
...toRefs(data)
}
}
}
</script>
<style>
</style>
<template>
<view class="">
<view class="box-top">
<view class="box-top-item flex" @click="showCalendar">
<view class="ellipsis">
<text v-if="date.length==2">{{date[0]}}-{{date[1]}}</text>
<text v-else>选择日期</text>
</view>
<van-icon name="arrow-down" size='12' style='margin-left: 5px;'/>
</view>
<picker mode="selector" range-key="Name" style="width: 50%;"
:range="stateList" @change="getState">
<view class="box-top-item flex" style="width: 100%;height: 100rpx;" >
<view class="ellipsis">
{{stateName}}
</view>
<van-icon name="arrow-down" size='12' style='margin-left: 5px;'/>
</view>
</picker>
</view>
<van-calendar
:show="isShowcalendar"
type="range"
@close="isShowcalendar=false"
@confirm="onConfirmCalendar"
/>
</view>
</template>
<script>
import { toRefs, reactive,getCurrentInstance} from 'vue'
import {DateFormat} from '../../utils/date.js'
export default{
setup(){
const data=reactive({
msg:{
State:1,
},
isShowcalendar:false,
date:[],
stateName:"不限",
stateList:[
{
Name:"待确认",
Id:1,
},
{
Name:"待上课",
Id:2
},{
Name:"已上课",
Id:3
},{
Name:"缺席",
Id:4
}
]
})
const methods={
showCalendar(){
data.isShowcalendar=true
},
getState(e){
let i = e.detail.value;
data.stateName=data.stateList[i].Name;
let id=data.stateList[i].Id
},
onConfirmCalendar(e){
data.isShowcalendar=false
let dateS = DateFormat(e.detail[0],'/')
let dateE = DateFormat(e.detail[1],'/')
data.date=[dateS,dateE]
console.log(68,data.date)
}
}
return{
...toRefs(data),
...methods
}
},
onLoad() {
uni.setNavigationBarTitle({
title:"约课记录"
})
}
}
</script>
<style scoped>
.flex{
display: flex;
align-items: center;
}
.box-top{
display: flex;
box-shadow: 0 4rpx 24rpx rgba(100,101,102,.12);
height: 100rpx;
background: #FFF;
}
.box-top-item{
width: 50%;
justify-content: center;
font-size: 13px;
}
.ellipsis{
font-size: 24rpx;
max-width: 80%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
</style>
......@@ -33,7 +33,15 @@
color: #0000ff;
font-size: 24rpx;
}
.Order_Type{
box-sizing: border-box;
padding: 4rpx 14rpx;
font-size: 20rpx;
background-color: #2961fe;
margin-left: 20rpx;
color: #FFFFFF;
border-radius: 20rpx;
}
.courseName {
font-size: 40rpx;
margin-bottom: 20rpx;
......@@ -109,6 +117,12 @@
<view class="Order_Top">
<view class="Order_label">订单号:</view>
<view class="Order_Number">#{{item.OrderId}}</view>
<view class="Order_Type" v-if="item.ClassScrollType===1">
跟班
</view>
<view class="Order_Type" style="background-color: #29CC40;" v-if="item.ClassScrollType===2">
约课
</view>
</view>
<view class="p-lc-c">
<view class="p-lc-item">
......
......@@ -43,6 +43,9 @@
</view>
</view>
</view>
<view class="" @click="jumpPage(`/pages/appointment/record`)">
约课记录
</view>
<view class="courseInfo">
<view class="title">课程信息</view>
<view class="statistic">
......@@ -106,7 +109,7 @@
}}</view>
<view class="Grade">等级:{{ pageData.CourseInfo.CourseRate||'' }}</view>
<view><text class="Grade">状态:</text>
<text class="StatusName">{{
<text class="StatusName" v-if="pageData.CourseInfo.ClassStatusName">{{
pageData.CourseInfo.ClassStatusName
}}</text>
</view>
......
This diff is collapsed.
......@@ -72,3 +72,11 @@ export let getdate = (time, tomorrow) => {
let d = year + "-" + month + '-' + day
return d
}
export let DateFormat = (time, separator='-') => {
let date = new Date(time)
let year = date.getFullYear()
let month = date.getMonth() < 9 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
let day = date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()
let d = year + separator + month + separator + day
return d
}
......@@ -308,4 +308,4 @@ export let netUrlTobase64 = async (url, suc) => {
});
})
return toBase64Url
}
}
\ No newline at end of file
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