Commit 1a06ce29 authored by youjie's avatar youjie

no message

parent 9d7cd923
{
"description": "项目配置文件",
"packOptions": {
"ignore": []
},
"setting": {
"urlCheck": true,
"scopeDataCheck": false,
"coverView": true,
"es6": false,
"postcss": true,
"compileHotReLoad": false,
"lazyloadPlaceholderEnable": false,
"preloadBackgroundData": false,
"minified": true,
"autoAudits": false,
"newFeature": false,
"uglifyFileName": false,
"uploadWithSourceMap": true,
"useIsolateContext": true,
"nodeModules": false,
"enhance": true,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"showShadowRootInWxmlPanel": true,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"disableUseStrict": false,
"minifyWXML": true
},
"compileType": "miniprogram",
"libVersion": "2.24.3",
"appid": "wx29511169b040c1b6",
"projectname": "thinkApp",
"debugOptions": {
"hidedInDevtools": []
},
"scripts": {},
"staticServerOptions": {
"baseURL": "",
"servePath": ""
},
"isGameTourist": false,
"condition": {
"search": {
"list": []
},
"conversation": {
"list": []
},
"game": {
"list": []
},
"plugin": {
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": {
"list": []
}
}
}
\ No newline at end of file
<template>
<view class="classList-box">
<view class="classList-content-box" v-for="item in 5">
<view class="content-time">
<view class="time-Wire">
<view class="time-round"></view>
</view>
<view class="time-date">
<view class="time-num">
<view>01/</view>
<view>05日</view>
</view>
<view class="time-text">
星期一
</view>
</view>
</view>
<van-swipe-cell class="content-right activeOne"
id="swipe-cell"
:right-width="116"
async-close>
<view class="content-text-box">
<view class="right-box">
<view v-for="(item,index) in 6" class="Festival-box activeOne">
<view>第一节</view>
<view>
09:30
</view>
</view>
</view>
</view>
<view slot="right" class="van-swipe-cell__right">
<van-button square type="danger" custom-style="height:100%;">删除</van-button>
</view>
</van-swipe-cell>
</view>
</view>
</template>
<script>
import {
ref,
toRefs,
reactive,
getCurrentInstance,
onMounted
} from 'vue'
export default {
components: {
},
props: ['day'],
setup(props) {
const {
proxy
} = getCurrentInstance()
const data = reactive({
})
const methods = {
}
onMounted(() => {
})
return {
...toRefs(data),
...methods
}
},
}
</script>
<style scoped>
.classList-content-box{
display: flex;
justify-content: space-between;
padding: 0 50rpx 0 0;
}
.content-time{
display: flex;
flex-shrink: 0;
margin-right: 59rpx;
padding: 0 0 0 33rpx;
}
.time-Wire{
width: 1rpx;
height: 100%;
background: #A9A9A9;
position: relative;
flex-shrink: 0;
}
.time-round{
width: 15rpx;
height: 15rpx;
background: #111111;
border-radius: 50%;
position: absolute;
left: -6rpx;
top: 50rpx;
}
.time-date{
display: flex;
flex-direction: column;
margin-left: 33rpx;
padding: 40rpx 0 0 0;
}
.time-num{
display: flex;
font-size: 26rpx;
font-weight: 800;
color: #111111;
}
.time-num view:first-child{
font-size: 22rpx;
padding: 3rpx 0 0 0;
font-weight: 400;
}
.time-text{
font-size: 26rpx;
color: #111111;
font-weight: 500;
}
.content-right{
position: relative;
flex-grow: 1;
border-radius: 24rpx;
padding: 0 0 0 38rpx;
overflow: hidden;
margin-bottom: 50rpx;
}
.content-text-box{
padding: 5rpx 0 34rpx 0;
}
.content-right.activeOne{
background: #FDEAD5;
}
.content-right.activeTwo{
background: #EDD9FF;
}
.content-right.activeThree{
background: #D7F2E9;
}
.content-right.activeFour{
background: #FFF1F4;
}
.content-right.activeFive{
background: #E5F3FE;
}
.content-right.activeSix{
background: #EDF8F9;
}
.right-box{
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.Festival-box{
display: flex;
margin-top: 29rpx;
padding: 7rpx 19rpx;
border-radius: 10rpx;
color: #ffffff;
margin-right: 31rpx;
font-size: 28rpx;
}
.Festival-box:nth-child(2n){
margin-right: 0;
}
.Festival-box view:last-child{
margin-left: 15rpx;
font-size: 26rpx;
padding: 3rpx 0 0 0;
}
.Festival-box.activeOne{
background: #FF9626;
}
.Festival-box.activeTwo{
background: #B966FF;
}
.Festival-box.activeThree{
background: #35B881;
}
.Festival-box.activeFour{
background: #FE606A;
}
.Festival-box.activeFive{
background: #0588F8;
}
.Festival-box.activeSix{
background: #33BED9;
}
.van-swipe-cell__right {
position: absolute;
top: 0;
bottom: 0;
height: 100%;
right: -111rpx;
width:232px;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
</style>
......@@ -171,6 +171,25 @@
"path": "mySubscribe"//约课记录
}
]
}, {
"root": "pages/bookAclass", //约课分包
"pages": [{
"path": "index",
"style": {
"navigationBarTitleText": "上课计划",
"navigationBarBackgroundColor": "#F5F5F5",
"backgroundColor": "#F5F5F5"
}
},
{
"path": "addPlan",
"style": {
"navigationBarTitleText": "添加计划",
"navigationBarBackgroundColor": "#F5F5F5",
"backgroundColor": "#F5F5F5"
}
}
]
}
],
"tabBar": {
......
This diff is collapsed.
<template>
<view class="index-box">
<!-- <Navbar>
<view class="navbar">
<van-icon name="arrow-left" size="36rpx" @click="back" />
<view class="dateStr">
上课计划
</view>
</view>
</Navbar> -->
<view class="titleHeader">
<view class="titleHeader-year">
<view>{{year}}{{month}}</view>
<view>计划 0节课</view>
</view>
<view class="titleHeader-dateStr">
<view v-for="item in titleList"
class="titleHeader-content">
<view class="titleHeader-name">{{item.name}}</view>
<view class="titleHeader-num">{{item.num}}</view>
<view class="titleHeader-mark">
<view v-for="(item,index) in item.listNum" :key="index"
:class="{'activeOne':index==0,'activeTwo':index==1,
'activeThree':index==2,'activeFour':index==3,
'activeFive':index==4,'activeSix':index==5}"></view>
</view>
</view>
</view>
</view>
<view class="content-box">
<scroll-view scroll-y="true" style="width:100%;height: 100%;">
<classList></classList>
</scroll-view>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1656570277000_611.png"
class="addicon"
style="width: 157rpx;height: 157rpx;"
@click="addPlan"/>
</view>
<!-- <view class="noCourse-box">
<view class="noCourse">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1656556494000_644.png" mode=""
style="width: 426rpx;height: 344rpx;"></image>
</view>
<view class="addTitle">
<view @click="addPlan">
添加上课计划
</view>
</view>
</view> -->
</view>
</template>
<script>
import {
ref,
toRefs,
reactive,
getCurrentInstance,
onMounted
} from 'vue'
import {
DateFormat,
getToday
} from '../../utils/date.js'
import Navbar from '../../components/navbar.vue'
import classList from '../../components/bookAclass/classList.vue'
export default {
components: {
Navbar,
classList
},
props: ['day'],
setup(props) {
const {
proxy
} = getCurrentInstance()
const data = reactive({
year: "",
month:"",
day:"",
weekTime:"",
msg: {
StartDate: "",
EndDate: "",
},
titleList:[
{name:'星期一',num:'',listNum:0},
{name:'星期二',num:'',listNum:0},
{name:'星期三',num:'',listNum:0},
{name:'星期四',num:'',listNum:0},
{name:'星期五',num:'',listNum:0},
{name:'星期六',num:'',listNum:0},
{name:'星期日',num:'',listNum:0},
]
})
const methods = {
addPlan(){
uni.navigateTo({
url: '/pages/bookAclass/addPlan',
});
},
back() {
uni.navigateBack({
delta: 1
});
},
// 获取当前日期
getDateData(d) {
let date = new Date()
if (d) {
date = new Date(d)
}
data.year = date.getFullYear()
data.month = date.getMonth() + 1
data.day = date.getDate()
},
// 取消约课
CancelClass(){
uni.showModal({
title: '提示',
content: '将要取消该约课,是否继续',
success: function (res) {
if (res.confirm) {
let Msg = {
ExamId: item.ExamId
}
proxy.$request("/LeaveStudent/RemovePlanAppointment", Msg).then(res => {
if(res.Code ==1){
uni.showToast({
title:'删除成功',
icon:'none',
duration: 500
})
}
})
} else if (res.cancel) {
}
}
});
},
// 实现方法
getMonday(dates) {
let arr = [],weekOne='';
let todayTimeStr = new Date(new Date().toLocaleDateString()).getTime();
var day = (new Date().getDay() - 1) * 24 * 60 * 60 * 1000;
weekOne = todayTimeStr - day;
if(dates == 0){//本周
weekOne = todayTimeStr - day;//周一 0点的时间戳
}
// 一天的时间戳
let dayTime = 24 * 60 * 60 * 1000;
if(dates == -1){//上一周
weekOne = data.weekTime - 7 * 24 * 60 * 60 * 1000;
}else if(dates==1){//下一周
weekOne = data.weekTime + 7 * 24 * 60 * 60 * 1000;
}
data.weekTime = weekOne;
for(let i=0;i<7;i++){
let timeOne_year = new Date(new Date(weekOne + i * dayTime)).getFullYear();
let timeOne_month = new Date(new Date(weekOne + i * dayTime)).getMonth() + 1>=10?new Date(new Date(weekOne + i *
dayTime)).getMonth() + 1:'0' + (new Date(new Date(weekOne + i *
dayTime)).getMonth() + 1);
let timeOne_date = new Date(new Date(weekOne + i * dayTime)).getDate()>=10?new Date(new Date(weekOne + i *
dayTime)).getDate():'0'+new Date(new Date(weekOne + i *
dayTime)).getDate();
arr.push(timeOne_year+'-'+timeOne_month+'-'+timeOne_date);
}
return arr;
},
getList(){
uni.showLoading({
title: '加载中...'
})
proxy.$request("/LeaveStudent/GetStuPlanAppointment", data.msg).then(res => {
if(res.Code ==1){
uni.hideLoading()
}
})
}
}
onMounted(() => {
let timeArr = methods.getMonday(0);
let timeList = []
for(let i=0;i<7;i++){
data.titleList.forEach((item,index) => {
if(i==index){
item.num = timeArr[i].slice(8,10)
}
});
}
data.msg.StartDate = timeList[0]
data.msg.EndDate = timeList[6]
methods.getList()
methods.getDateData()
methods.getList()
})
return {
...toRefs(data),
...methods
}
},
}
</script>
<style scoped>
.index-box{
background: #F7F5F6;
position: fixed;
bottom: 0;
top: 0;
left: 0;
right: 0;
}
.navbar {
display: flex;
align-items: center;
height: 100%;
padding: 0 30rpx;
background: #F5F5F5;
}
.navbar .dateStr {
flex-grow: 1;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
margin-right: 6rpx;
text-align: center;
}
.noCourse-box{
position: fixed;
left: 0;
right: 0;
top: 475rpx;
}
.noCourse {
margin-top: 163rpx;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.titleHeader{
position: fixed;
top: 0;
/* 131rpx */
left: 0;
right: 0;
padding: 0 36rpx;
}
.titleHeader-year{
display: flex;
justify-content: center;
font-size: 36rpx;
font-weight: 800;
color: #111111;
padding: 41rpx 0 37rpx 0;
}
.titleHeader-dateStr{
display: flex;
flex-wrap: nowrap;
}
.titleHeader-content{
width: 89rpx;
overflow: hidden;
flex-shrink: 0;
display: flex;
flex-direction: column;
color: #111111;
border-radius: 20rpx;
padding: 17rpx 5rpx;
}
.titleHeader-content.activeOne{
background: #E4E5FB;
}
.titleHeader-name{
font-size: 24rpx;
font-weight: 400;
text-align: center;
}
.titleHeader-num{
font-size: 30rpx;
font-weight: 500;
text-align: center;
padding: 23rpx 0;
}
.titleHeader-mark{
display: flex;
padding: 0 28rpx;
justify-content: center;
flex-wrap: wrap;
}
.titleHeader-mark view{
width: 8rpx;
height: 8rpx;
border-radius: 50%;
margin-right: 5rpx;
margin-bottom: 5rpx;
}
.titleHeader-mark view.activeOne{
background: #FC952A;
}
.titleHeader-mark view.activeTwo{
background: #B966FF;
}
.titleHeader-mark view.activeThree{
background: #35B881;
}
.titleHeader-mark view.activeFour{
background: #FE606A;
}
.titleHeader-mark view.activeFive{
background: #0588F8;
}
.titleHeader-mark view.activeSix{
background: #33BED9;
}
.addTitle{
display: flex;
justify-content: center;
padding: 84rpx 0 0 0;
text-align: center;
}
.addTitle view{
width: 292rpx;
height: 80rpx;
background: #4C50E7;
border-radius: 40rpx;
line-height: 80rpx;
font-size: 28rpx;
font-weight: 500;
color: #ffffff;
}
.content-box{
position: fixed;
top: 329rpx;
/* 460rpx */
left: 0;
right: 0;
bottom: 0;
background: #ffffff;
border-radius: 50rpx 50rpx 0 0;
padding: 80rpx 0 0 0;
/* 42rpx */
}
.addicon{
position: fixed;
right: 50rpx;
top: 269rpx;
/* 400rpx */
z-index: 2;
}
</style>
......@@ -308,10 +308,14 @@
return res
},
goappointment() {
let day = currentDate.value + '-' + activeDay.value;
uni.navigateTo({
url: '/pages/appointment/index?day=' + day,
url: '/pages/bookAclass/index',
});
// let day = currentDate.value + '-' + activeDay.value;
// uni.navigateTo({
// url: '/pages/appointment/index?day=' + day,
// });
},
initSwiper(){
const date=new Date()
......
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