Commit 1f3433e4 authored by 罗超's avatar 罗超

2

parent da76ee9a
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},{ }, {
"path": "pages/study/index", "path": "pages/study/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},{ }, {
"path": "pages/study/courseList" // "path": "pages/study/courseList" //
}, { }, {
"path": "pages/login/login", "path": "pages/login/login",
...@@ -72,9 +72,9 @@ ...@@ -72,9 +72,9 @@
"root": "pages/contract", //合同分包 "root": "pages/contract", //合同分包
"pages": [{ "pages": [{
"path": "contract" //电子合同 "path": "contract" //电子合同
},{ }, {
"path": "orderList" //订单列表 "path": "orderList" //订单列表
},{ }, {
"path": "contractDetail" //合同详情 "path": "contractDetail" //合同详情
}] }]
}, },
...@@ -110,32 +110,45 @@ ...@@ -110,32 +110,45 @@
"backgroundColor": "#f5f5f5", "backgroundColor": "#f5f5f5",
"navigationBarBackgroundColor": "#f5f5f5" "navigationBarBackgroundColor": "#f5f5f5"
} }
}, { }, {
"path": "studyComplete", "path": "studyComplete",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},{ }, {
"path": "test" "path": "test"
},{ }, {
"path":"wordStudy", "path": "wordStudy",
"style": { "style": {
"backgroundColor": "#f5f5f5", "backgroundColor": "#f5f5f5",
"navigationBarBackgroundColor": "#f5f5f5" "navigationBarBackgroundColor": "#f5f5f5"
} }
},{ }, {
"path":"readComplete", "path": "readComplete",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}] }]
},{ }, {
"root": "pages/appointment", //约课分包 "root": "pages/appointment", //约课分包
"pages":[ "pages": [{
{"path": "list"}, "path": "index",
{"path": "mySubscribe"}, "style": {
{"path": "timeSlot"}, "navigationStyle": "custom"
{"path": "record"} }
},
{
"path": "list"
},
{
"path": "mySubscribe"
},
{
"path": "timeSlot"
},
{
"path": "record"
}
] ]
} }
], ],
......
<template>
<view class="">
<Navbar>
<view class="navbar">
<i class="iconfont icon-calendar" style="font-size: 60rpx;" @click="isShowCalendar=true"></i>
<view class="dateStr">
{{dateStr}}
</view>
<view class="year">
{{year}}
</view>
</view>
</Navbar>
<view class="">
<swiper class="swiper" circular previous-margin="36rpx" next-margin="36rpx" @change="changeSwiper">
<swiper-item v-for="(item,index) in teacherList" :key="index" style="display: flex;align-items: center;">
<view class="swiper-item" :class="current== index ? 'activeSwiper' : 'swiper-item'">
<view class="imgBox">
<image :src="item.TeacherHead" mode="aspectFill" style="width: 100%;height: 100%;border-radius: 20rpx;box-shadow: 4rpx 3rpx 10rpx 0rpx #D6DCE4;"></image>
</view>
<view class="teacherInfo">
<view class="teacherInfoNameBox">
<text class="teacherInfoName">{{item.TeacherName}}</text>
<text class="teacherInfoBtn">可报入</text>
</view>
<view class="TeacherIntro">
{{item.TeacherIntro||'暂无教师介绍'}}
</view>
</view>
</view>
</swiper-item>
</swiper>
</view>
<van-calendar :show="isShowCalendar" @close="isShowCalendar=false" @confirm="onConfirmCalendar" />
<view class="top">
<view class="topinfo">
<text>当前预约课程</text>
<text @click="goappointment">更多预约</text>
</view>
<view class="topinfoCourse">
A1地3.1.2《+しのかぞく》
</view>
<view class="CourseTime">
(4课时.180分钟)
</view>
<view class="borderB">
</view>
</view>
<view class="list">
<view v-for="(item,index) in dataList" :key="index">
<view class="type1">
</view>
</view>
</view>
</view>
</template>
<script>
import {
ref,
toRefs,
reactive,
getCurrentInstance,
onMounted
} from 'vue'
import Navbar from '../../components/navbar.vue'
export default {
components: {
Navbar
},
props:['day'],
setup(props) {
const {proxy} = getCurrentInstance()
const data = reactive({
isShowCalendar: false,
date: "2月1号",
dateStr: "",
year: "",
current:0,
teacherList:[{
name:'张三'
},{
name:'李四'
},{
name:'王五'
}],
msg:{
Date:props.day,
School_Id:'-1',
},
dataList:[],
basics:{},
})
const methods = {
onConfirmCalendar(val) {
data.isShowCalendar = false
this.getDateData(val.detail)
},
getDateData(d) {
let date = new Date()
if (d) {
date = new Date(d)
}
let year = date.getFullYear()
let week = date.getDay()
let weekStr = ""
let month = date.getMonth() + 1
let day = date.getDate()
switch (week) {
case 0:
weekStr = '周日';
break;
case 1:
weekStr = '周一';
break;
case 2:
weekStr = '周二';
break;
case 3:
weekStr = '周三';
break;
case 4:
weekStr = '周四';
break;
case 5:
weekStr = '周五';
break;
case 6:
weekStr = '周六';
break;
}
data.year = year
data.dateStr = month + "月" + day + '号(' + weekStr + ')'
},
changeSwiper(val){
data.current=val.detail.current
console.log(val.detail.current)
},
getTeacherList(){
uni.showLoading({
title:'加载中...'
})
proxy.$request("/AppletCenter/GetScrollAppointmentTeacherList", data.msg).then(res => {
if (res.Code == 1) {
data.teacherList =res.Data;
uni.hideLoading()
}
})
},
getBaseInfo(){
proxy.$request("/AppletCenter/GetScrollAppointmentBaseInfo",{}).then(res => {
if (res.Code == 1) {
data.basics = res.Data;
// that.judge()
}
})
},
goappointment() {
// let day = currentDate.value + '-' + activeDay.value;
uni.navigateTo({
url: '/pages/appointment/list',
});
},
}
onMounted(() => {
methods.getDateData()
methods.getTeacherList()
methods.getBaseInfo()
})
return {
...toRefs(data),
...methods
}
},
}
</script>
<style scoped>
.navbar {
display: flex;
align-items: center;
height: 100%;
padding: 0 30rpx;
}
.navbar .dateStr {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 800;
color: #111111;
margin-right: 6rpx;
}
.navbar .year {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #888888;
}
.swiper{
height: 360rpx;
}
.swiper-item{
width:100%;
height: 235rpx;
/* background-color: #f0fed1; */
margin: 0 10rpx;
border-radius: 20rpx;
display: flex;
align-items: center;
/* overflow: hidden; */
box-shadow: 4rpx 3rpx 10rpx 0rpx rgba(212, 212, 212, 0.6);
box-sizing: border-box;
padding: 0 40rpx;
}
.swiper-item .imgBox{
width: 280rpx;
height: 360rpx;
overflow: hidden;
}
.activeSwiper{
height: 295rpx !important;
padding: 0 !important;
}
.teacherInfo{
box-sizing: border-box;
padding: 30rpx;
flex-grow: 1;
width: 378rpx;
height: 100%;
overflow: hidden;
}
.teacherInfoNameBox{
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10rpx;
}
.teacherInfoName{
font-size: 34rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
.teacherInfoBtn{
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #4C50E7;
}
.top{
width: 678rpx;
/* height: 174rpx; */
background-color: #4C50E7;
border-radius: 24rpx 24rpx 0px 0px;
margin: 60rpx auto;
box-sizing: border-box;
padding: 30rpx 40rpx;
position: relative;
}
.topinfo{
display: flex;
justify-content: space-between;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #989BF6;
margin-bottom: 10rpx;
}
.topinfoCourse{
font-size: 34rpx;
font-family: PingFang SC;
font-weight: 800;
color: #FFFFFF;
margin-bottom: 4rpx;
}
.top .borderB{
position: absolute;
bottom: 0rpx;
left: -18rpx;
z-index: 2;
width: 95vw;
height: 25rpx;
border-radius: 12rpx;
background: linear-gradient(0deg, rgba(17, 21, 177, 0.5), rgba(17, 21, 177, 0.2),rgba(17, 21, 177, 0.01));
}
.CourseTime{
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 400;
color: #FFFFFF;
}
.list .type1{
width: 678rpx;
height: 196rpx;
background: #FFFFFF;
box-shadow: 2rpx 4rpx 40rpx 0rpx rgba(212, 212, 212, 0.6);
border-radius: 16rpx;
margin: 10rpx 0;
}
.TeacherIntro{
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 400;
color: #888888;
height: 200rpx;
overflow-y: scroll;
}
</style>
<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> <template>
<swiper class="image-container" previous-margin="45rpx" next-margin="45rpx" :indicator-dots="true" indicator-active-color='#4C50E7' @change="swiperChange"> <swiper class="image-container" previous-margin="45rpx" next-margin="45rpx" :indicator-dots="true" :current="currentIndex" indicator-active-color='#4C50E7' @change="swiperChange">
<swiper-item :class="currentIndex == index ? 'swiper-item' : 'swiper-item-side'" v-for="(item, index) in imgList" :key="item[urlKey]"> <swiper-item :class="currentIndex == index ? 'swiper-item' : 'swiper-item-side'" v-for="(item, index) in imgList" :key="item[urlKey]">
<!-- <image @click="clickImg(item)" :class="currentIndex == index ? 'item-img' : 'item-img-side'" :src="item[urlKey]" lazy-load :style="dontFirstAnimation ? 'animation: none;' : ''" mode="aspectFill"></image> --> <!-- <image @click="clickImg(item)" :class="currentIndex == index ? 'item-img' : 'item-img-side'" :src="item[urlKey]" lazy-load :style="dontFirstAnimation ? 'animation: none;' : ''" mode="aspectFill"></image> -->
<view class="box" :class="currentIndex == index ? 'item-img' : 'item-img-side'" :style="{background:item.B2BBackground ? getOpacityColor(item.B2BBackground,0.3):'#FFF',}"> <view class="box" :class="currentIndex == index ? 'item-img' : 'item-img-side'" :style="{background:item.B2BBackground ? getOpacityColor(item.B2BBackground,0.3):'#FFF',}">
...@@ -91,6 +91,23 @@ ...@@ -91,6 +91,23 @@
} }
return theColor; return theColor;
} }
},
mounted() {
let i= this.imgList.findIndex(e=>e.ClassStatus==2)
if(i>=0){
this.currentIndex=i
}else{
let i1= this.imgList.findIndex(e=>e.ClassStatus==1)
if(i1>=0){
this.currentIndex=i1
}else{
let i2= this.imgList.findIndex(e=>e.ClassStatus==3)
if(i2>=0){
this.currentIndex=i2
}
}
}
} }
} }
</script> </script>
......
...@@ -544,7 +544,10 @@ ...@@ -544,7 +544,10 @@
CourseInfoMsg: { CourseInfoMsg: {
ClassId: 0, ClassId: 0,
GuestId: 0, GuestId: 0,
CourseId: 0 CourseId: 0,
ClassScrollType:0,
StuId:0
}, },
InfoData: null, InfoData: null,
current: 0, current: 0,
...@@ -569,7 +572,6 @@ ...@@ -569,7 +572,6 @@
data.videoContext.play(); data.videoContext.play();
data.controls = true; data.controls = true;
} }
console.log(544,e.detail.fullScreen, data.controls)
}, },
getCourseList() { getCourseList() {
proxy.$request("/AppletIndex/GetMyStudyCourseList", {}).then(res => { proxy.$request("/AppletIndex/GetMyStudyCourseList", {}).then(res => {
...@@ -586,6 +588,7 @@ ...@@ -586,6 +588,7 @@
}, },
getCourseInfo() { //详情 getCourseInfo() { //详情
data.CourseInfoMsg.ClassScrollType=uni.getStorageSync('userInfo').ClassScrollType
proxy.$request("/AppletIndex/GetMyStudyCourseInfo", data.CourseInfoMsg).then(res => { proxy.$request("/AppletIndex/GetMyStudyCourseInfo", data.CourseInfoMsg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
data.InfoData = res.Data data.InfoData = res.Data
......
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
<van-popup :show="showPopup" round position="bottom" custom-style="height: 50%" @close="onClose"> <van-popup :show="showPopup" round position="bottom" custom-style="height: 50%" @close="onClose">
<van-datetime-picker type="year-month" :value="getCurrentDate" @cancel="onClose" @confirm="onConfirm" /> <van-datetime-picker type="year-month" :value="getCurrentDate" @cancel="onClose" @confirm="onConfirm" />
</van-popup> </van-popup>
<swiper :style="{height:!isShowAllDay?'220rpx':'620rpx'}" circular :current-item-id="2" <swiper :style="{height:!isShowAllDay?'220rpx':'620rpx'}" circular :current="1"
@change="changeSwiper($event,preSwiperId)"> @change="changeSwiper($event,preSwiperId)">
<swiper-item v-for="(Sitem,Sindex) in swiperArr" :key="Sindex" :item-id="Sitem.id" style="height: 400rpx;"> <swiper-item v-for="(Sitem,Sindex) in swiperArr" :key="Sindex">
<view class="calendar flex flex_wrap"> <view class="calendar flex flex_wrap">
<view v-for="(item, index) in weekArr" :key="index" class="calendar-week-item no_shrink"> <view v-for="(item, index) in weekArr" :key="index" class="calendar-week-item no_shrink">
<view class="calendar-week">{{ item }}</view> <view class="calendar-week">{{ item }}</view>
...@@ -207,28 +207,22 @@ ...@@ -207,28 +207,22 @@
swiperArr: [{ swiperArr: [{
y: 2022, y: 2022,
m: 1, m: 1,
id: 1
}, { }, {
y: 2022, y: 2022,
m: 2, m: 2,
id: 2
}, { }, {
y: 2022, y: 2022,
m: 3, m: 3,
id: 3
}], }],
swiperArrDemo: [{ swiperArrDemo: [{
y: 2022, y: 2022,
m: 1, m: 1,
id: 1
}, { }, {
y: 2022, y: 2022,
m: 2, m: 2,
id: 2
}, { }, {
y: 2022, y: 2022,
m: 3, m: 3,
id: 3
}], }],
currentSwiper: 1, currentSwiper: 1,
preSwiperId: 1, preSwiperId: 1,
...@@ -319,9 +313,38 @@ ...@@ -319,9 +313,38 @@
goappointment() { goappointment() {
let day = currentDate.value + '-' + activeDay.value; let day = currentDate.value + '-' + activeDay.value;
uni.navigateTo({ uni.navigateTo({
url: '/pages/appointment/list?day=' + day, url: '/pages/appointment/index?day=' + day,
}); });
}, },
initSwiper(){
const date=new Date()
const y=date.getFullYear()
const m=date.getMonth()+1
const d=date.getDate()
let obj={
y,
m,
}
let obj1={
y,
m:m-1,
}
let obj2={
y,
m:m+1,
}
if(m==1){
obj1.y=y-1
obj1.m=12
}
if(m==12){
obj1.y=y+1
obj1.m=1
}
data.swiperArr=[obj1,obj,obj2]
data.swiperArrDemo=[obj1,obj,obj2]
console.log(data.swiperArr, data.swiperArrDemo)
},
changeSwiper(val, PreId) { changeSwiper(val, PreId) {
let CurId = val.detail.current let CurId = val.detail.current
data.currentSwiper = 1 data.currentSwiper = 1
...@@ -432,6 +455,9 @@ ...@@ -432,6 +455,9 @@
this.getAllData() this.getAllData()
} }
}, },
onLoad(options) {
this.initSwiper()
}
}; };
</script> </script>
......
@font-face { @font-face {
font-family: "iconfont"; /* Project id 2734547 */ font-family: "iconfont"; /* Project id 2734547 */
src: url('//at.alicdn.com/t/font_2734547_dmciakf5o5.woff2?t=1642156587432') format('woff2'), src: url('//at.alicdn.com/t/font_2734547_4b4m4a7c8zb.woff2?t=1643252260604') format('woff2'),
url('//at.alicdn.com/t/font_2734547_dmciakf5o5.woff?t=1642156587432') format('woff'), url('//at.alicdn.com/t/font_2734547_4b4m4a7c8zb.woff?t=1643252260604') format('woff'),
url('//at.alicdn.com/t/font_2734547_dmciakf5o5.ttf?t=1642156587432') format('truetype'); url('//at.alicdn.com/t/font_2734547_4b4m4a7c8zb.ttf?t=1643252260604') format('truetype');
} }
.iconfont { .iconfont {
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-calendar:before {
content: "\e746";
}
.icon-tuixue:before { .icon-tuixue:before {
content: "\e639"; content: "\e639";
} }
...@@ -51,4 +55,4 @@ ...@@ -51,4 +55,4 @@
.icon-radio1:before { .icon-radio1:before {
content: "\e600"; content: "\e600";
} }
\ 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