李双庆 1 year ago
parent
commit
75f33e2170
  1. 4
      components/AQ/AQTabber.vue
  2. 54
      pages.json
  3. 316
      pages/coach/class/list.vue
  4. 228
      pages/coach/course/info.vue
  5. 421
      pages/coach/course/list.vue
  6. 373
      pages/coach/home/index.vue
  7. 104
      pages/coach/job/add.vue
  8. 266
      pages/coach/job/list.vue

4
components/AQ/AQTabber.vue

@ -51,13 +51,13 @@
}, },
{ {
text: "课表", text: "课表",
urlPath:'/pages/student/timetable/index',// urlPath:'/pages/coach/course/list',//
iconPath: "/static/images/tabbar/my.png", iconPath: "/static/images/tabbar/my.png",
selectedIconPath: "/static/images/tabbar/my.png" selectedIconPath: "/static/images/tabbar/my.png"
}, },
{ {
text: "班级", text: "班级",
urlPath:'/pages/student/my/my',// urlPath:'/pages/coach/class/list',//
iconPath: "/static/images/tabbar/my.png", iconPath: "/static/images/tabbar/my.png",
selectedIconPath: "/static/images/tabbar/my.png" selectedIconPath: "/static/images/tabbar/my.png"
}, },

54
pages.json

@ -58,10 +58,64 @@
"path": "pages/coach/home/index", "path": "pages/coach/home/index",
"style": { "style": {
"navigationBarTitleText": "首页", "navigationBarTitleText": "首页",
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/coach/job/add",
"style": {
"navigationBarTitleText": "发布作业",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#292929",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/coach/job/list",
"style": {
"navigationBarTitleText": "全部作业",
"navigationStyle": "default", "navigationStyle": "default",
"navigationBarBackgroundColor": "#292929",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/coach/course/list",
"style": {
"navigationBarTitleText": "课表",
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#fff", "navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
} }
},
{
"path": "pages/coach/course/info",
"style": {
"navigationBarTitleText": "课时详情",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#292929",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/coach/class/list",
"style": {
"navigationBarTitleText": "班级",
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#292929",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/coach/class/info",
"style": {
"navigationBarTitleText": "班级详情",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#292929",
"navigationBarTextStyle": "white"
}
} }
], ],
"globalStyle": { "globalStyle": {

316
pages/coach/class/list.vue

@ -0,0 +1,316 @@
<!--班级-列表-->
<template>
<view class="main_box">
<!--自定义导航栏-->
<view class="navbar_section">
<view class="title">班级</view>
</view>
<view class="main_section">
<view class="section_1">
<fui-input class="input_item" borderTop placeholder="搜索"></fui-input>
</view>
<view class="section_2">
<view class="ul">
<view class="li">
<view class="left">
<image class="pic" src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
</view>
<view class="right">
<view class="box_1">
<view class="name">
少年班
</view>
<view class="btn_box">
<view>2人即将到期</view>
</view>
</view>
<view class="box_2">
<view class="user_list">
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
</view>
<view class="num">34</view>
</view>
</view>
</view>
<view class="li">
<view class="left">
<image class="pic" src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
</view>
<view class="right">
<view class="box_1">
<view class="name">
少年班
</view>
<view class="btn_box">
<view>2人即将到期</view>
</view>
</view>
<view class="box_2">
<view class="user_list">
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
</view>
<view class="num">34</view>
</view>
</view>
</view>
<view class="li">
<view class="left">
<image class="pic" src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
</view>
<view class="right">
<view class="box_1">
<view class="name">
少年班
</view>
<view class="btn_box">
<view>2人即将到期</view>
</view>
</view>
<view class="box_2">
<view class="user_list">
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
</view>
<view class="num">34</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 底部导航-->
<AQTabber/>
</view>
</template>
<script>
import user from '@/api/user.js';
import AQTabber from "@/components/AQ/AQTabber.vue"
export default {
components: {
AQTabber,
},
data() {
return {
formData:{},
//
show_course:false,//
//
course_name:'课程',//
options_course: [
{
text: '请选择课程',
value: '',
checked: true
}, {
text: '羽毛球课程1',
value: '1'
}, {
text: '篮球课程2',
value: '2'
}
],
//
show_classroom:false,//
//
classroom_name:'课室',//
options_classroom: [
{
text: '请选择课室',
value: '',
checked: true
}, {
text: '羽毛球201',
value: '1'
}, {
text: '篮球室101',
value: '2'
}
],
}
},
onLoad() {
},
methods: {
//
clickCourse(e){
console.log(e)
this.course_name = e.text
this.show_course = true
},
//
filterTapCourse() {
//
this.$refs.ref_course.show()
this.show_course = true;
},
//
clickClassroom(e){
console.log(e)
this.classroom_name = e.text
this.show_classroom = true
},
//
filterTapClassroom() {
//
this.$refs.ref_classroom.show()
this.show_classroom = true;
},
//
openViewCourseInfo(item){
uni.navigateTo({
url: '/pages/coach/course/info'
})
},
}
}
</script>
<style lang="less" scoped>
.main_box{
background: #292929 ;
}
//
.navbar_section{
display: flex;
justify-content: center;
align-items: center;
background: #292929;
.title{
padding: 20rpx 0;
font-size: 30rpx;
color: #fff;
}
}
.main_section{
min-height: 100vh;
background: #292929 100%;
padding: 0 24rpx;
padding-top: 40rpx;
padding-bottom: 150rpx;
font-size: 24rpx;
color: #FFFFFF;
.section_1 {
border-radius: 10rpx;
background-color: #525252;
::v-deep .fui-input__wrap{
border-radius: 10rpx !important;
background-color: #525252 !important;
}
::v-deep .fui-input__background{
background-color: #525252 !important;
}
.input_item {
height: 60rpx;
::v-deep .uni-input-wrapper{
.uni-input-placeholder {
font-size: 28rpx !important;
}
}
}
::v-deep .uni-input-input {
color: #fff;
}
}
.section_2{
margin-top: 34rpx;
.ul{
display: flex;
flex-direction: column;
gap: 24rpx;
.li{
background: #404045;
padding: 50rpx 36rpx 46rpx;
border-radius: 16rpx;
display: flex;
gap: 32rpx;
.left{
.pic{
border-radius: 50%;
width: 92rpx;
height: 92rpx;
}
}
.right{
display: flex;
flex-direction: column;
gap: 28rpx;
.box_1{
display: flex;
align-items: center;
gap: 36rpx;
.name{
font-size: 28rpx;
}
.btn_box{
view{
border: 1px solid #FAD04D;
border-radius: 10rpx;
width: 182rpx;
height: 48rpx;
line-height: 42rpx;
text-align: center;
font-size: 26rpx;
color: #FAD04D;
}
}
}
.box_2{
display: flex;
align-items: center;
gap: 44rpx;
.user_list{
display: flex;
align-items: center;
gap: 14rpx;
image{
border-radius: 50%;
width: 48rpx;
height: 48rpx;
}
}
.num{}
}
}
}
}
}
}
</style>

228
pages/coach/course/info.vue

@ -0,0 +1,228 @@
<!--课程-详情-->
<template>
<view class="main_box">
<view class="main_section">
<view class="section_1">
<view class="title_box">青少儿篮球课</view>
<view class="ul">
<view class="li">
<view class="title">课程名称</view>
<view class="content">青少年篮球课</view>
</view>
<view class="li">
<view class="title">班级</view>
<view class="content">班级名称</view>
</view>
<view class="li">
<view class="title">上课时间</view>
<view class="content">2020.03.25 15:30-17:00</view>
</view>
<view class="li">
<view class="title">上课地址</view>
<view class="content">xxxx体育馆302室</view>
</view>
<view class="li">
<view class="title">课程名称</view>
<view class="content">青少年篮球课</view>
</view>
<view class="li">
<view class="title">教练</view>
<view class="content">包子皮</view>
</view>
<view class="li">
<view class="title">教练号码</view>
<view class="content">18888888888</view>
</view>
<view class="li">
<view class="title">扣除课时</view>
<view class="content">2个课时</view>
</view>
<view class="state_box">
<view>已上</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import user from '@/api/user.js';
import AQTabber from "@/components/AQ/AQTabber.vue"
export default {
components: {
AQTabber,
},
data() {
return {
formData:{},
//
show_course:false,//
//
course_name:'课程',//
options_course: [
{
text: '请选择课程',
value: '',
checked: true
}, {
text: '羽毛球课程1',
value: '1'
}, {
text: '篮球课程2',
value: '2'
}
],
//
show_classroom:false,//
//
classroom_name:'课室',//
options_classroom: [
{
text: '请选择课室',
value: '',
checked: true
}, {
text: '羽毛球201',
value: '1'
}, {
text: '篮球室101',
value: '2'
}
],
}
},
onLoad() {
},
methods: {
//
clickCourse(e){
console.log(e)
this.course_name = e.text
this.show_course = true
},
//
filterTapCourse() {
//
this.$refs.ref_course.show()
this.show_course = true;
},
//
clickClassroom(e){
console.log(e)
this.classroom_name = e.text
this.show_classroom = true
},
//
filterTapClassroom() {
//
this.$refs.ref_classroom.show()
this.show_classroom = true;
},
//
openViewCourseInfo(item){
uni.navigateTo({
url: '/pages/coach/course/info'
})
},
}
}
</script>
<style lang="less" >
.main_box{
background: #292929 ;
}
//
.navbar_section{
display: flex;
justify-content: center;
align-items: center;
background: #292929;
.title{
padding: 20rpx 0;
font-size: 30rpx;
color: #fff;
}
}
.main_section{
min-height: 100vh;
background: #292929 100%;
padding: 30rpx 24rpx;
padding-top: 40rpx;
padding-bottom: 150rpx;
font-size: 24rpx;
color: #FFFFFF;
.section_1{
border-radius: 22rpx;
padding: 20rpx 40rpx;
background: #333333 100%;
width: 100%;
.title_box{
padding: 10rpx;
padding-left: 30rpx;
font-size: 32rpx;
}
.ul{
padding: 40rpx 10rpx;
padding-bottom: 350rpx;
margin-top: 10rpx;
border-top: 1px solid #555555;
display: flex;
flex-direction: column;
gap: 40rpx;
position: relative;
.li{
display: flex;
gap: 72rpx;
.title{
width: 120rpx;
text-align: right;
}
.content{}
}
.state_box{
position: absolute;
bottom: 50rpx;
right: 10rpx;
view{
width: 154rpx;
height: 154rpx;
border-radius: 50%;
background-color: rgba(41,211,180,0.17);
color: rgba(41,211,180,1);
font-size: 26rpx;
text-align: center;
line-height: 150rpx;
transform: rotate(-35deg); /* 旋转 */
}
}
}
}
}
</style>

421
pages/coach/course/list.vue

@ -0,0 +1,421 @@
<!--课程-列表-->
<template>
<view class="main_box">
<!--自定义导航栏-->
<view class="navbar_section">
<view class="title">课表</view>
</view>
<view class="main_section">
<view class="section_1">
<view class="ul">
<view class="li">
<text>周日</text>
<text>14</text>
<text></text>
</view>
<view class="li">
<text>周一</text>
<text>14</text>
<text></text>
</view>
<view class="li">
<text>周二</text>
<text>14</text>
<text></text>
</view>
<view class="li">
<text>周日</text>
<text class="today"></text>
<text class=""></text>
</view>
<view class="li">
<text>周一</text>
<text>14</text>
<text class="select_plan"></text>
</view>
<view class="li">
<text>周二</text>
<text>14</text>
<text></text>
</view>
<view class="li">
<text>周二</text>
<text>14</text>
<text></text>
</view>
</view>
</view>
<view class="section_2">
<view class="item_box">
<fui-dropdown-menu :size="28" selectedColor="#465CFF" :options="options_course" @click="clickCourse" @close="show_course=false" ref="ref_course">
<view class="fui-filter__item" @tap="filterTapCourse">
<text>{{course_name}}</text>
<view class="fui-filter__icon" :class="{'fui-icon__ani':show_course}">
<fui-icon name="turningdown" :size="32" color="#FFF"></fui-icon>
</view>
</view>
</fui-dropdown-menu>
</view>
<view class="item_box">
<fui-dropdown-menu :size="28" selectedColor="#465CFF" :options="options_classroom" @click="clickClassroom" @close="show_classroom=false" ref="ref_classroom">
<view class="fui-filter__item" @tap="filterTapClassroom">
<text>{{classroom_name}}</text>
<view class="fui-filter__icon" :class="{'fui-icon__ani':show_classroom}">
<fui-icon name="turningdown" :size="32" color="#FFF"></fui-icon>
</view>
</view>
</fui-dropdown-menu>
</view>
</view>
<view class="section_3">
<view class="ul">
<view class="li" @click="openViewCourseInfo({id:1})">
<view class="top_box">
<view class="center_box">
<view>班级少年班</view>
<view>时间2020-05-25 15:30 - 17:30</view>
<view>课室302
</view>
<view>课程篮球少儿课
</view>
</view>
<view class="right_box">
<view class="tag" style="background:#fad24e;">上课中</view>
<!-- <view class="tag" style="background:#1cd188;">待上课</view>-->
</view>
</view>
<view class="bottom_box">
<view class="hint">
已签到学生 (15/34)
</view>
<view class="list_box">
<view class="list">
<view class="itme">
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
</view>
<view class="itme">
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
</view>
<view class="itme">
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
</view>
<view class="itme">
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
</view>
</view>
<view class="btn">
详情
</view>
</view>
</view>
</view>
<view class="li" @click="openViewCourseInfo({id:2})">
<view class="top_box">
<view class="center_box">
<view>班级少年班</view>
<view>时间2020-05-25 15:30 - 17:30</view>
<view>课室302
</view>
<view>课程篮球少儿课
</view>
</view>
<view class="right_box">
<view class="tag" style="background:#fad24e;">上课中</view>
<!-- <view class="tag" style="background:#1cd188;">待上课</view>-->
</view>
</view>
<view class="bottom_box">
<view class="hint">
已签到学生 (15/34)
</view>
<view class="list_box">
<view class="list">
<view class="itme">
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
</view>
<view class="itme">
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
</view>
<view class="itme">
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
</view>
<view class="itme">
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
</view>
</view>
<view class="btn">
详情
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 底部导航-->
<AQTabber/>
</view>
</template>
<script>
import user from '@/api/user.js';
import AQTabber from "@/components/AQ/AQTabber.vue"
export default {
components: {
AQTabber,
},
data() {
return {
formData:{},
//
show_course:false,//
//
course_name:'课程',//
options_course: [
{
text: '请选择课程',
value: '',
checked: true
}, {
text: '羽毛球课程1',
value: '1'
}, {
text: '篮球课程2',
value: '2'
}
],
//
show_classroom:false,//
//
classroom_name:'课室',//
options_classroom: [
{
text: '请选择课室',
value: '',
checked: true
}, {
text: '羽毛球201',
value: '1'
}, {
text: '篮球室101',
value: '2'
}
],
}
},
onLoad() {
},
methods: {
//
clickCourse(e){
console.log(e)
this.course_name = e.text
this.show_course = true
},
//
filterTapCourse() {
//
this.$refs.ref_course.show()
this.show_course = true;
},
//
clickClassroom(e){
console.log(e)
this.classroom_name = e.text
this.show_classroom = true
},
//
filterTapClassroom() {
//
this.$refs.ref_classroom.show()
this.show_classroom = true;
},
//
openViewCourseInfo(item){
uni.navigateTo({
url: '/pages/coach/course/info'
})
},
}
}
</script>
<style lang="less" scoped>
.main_box{
background: #292929 ;
}
//
.navbar_section{
display: flex;
justify-content: center;
align-items: center;
background: #292929;
.title{
padding: 20rpx 0;
font-size: 30rpx;
color: #fff;
}
}
.main_section{
min-height: 100vh;
background: #292929 100%;
padding-top: 40rpx;
padding-bottom: 150rpx;
font-size: 24rpx;
color: #FFFFFF;
.section_1{
background: #333333 100%;
width: 100%;
padding: 30rpx 28rpx;
.ul{
display: flex;
justify-content: space-between;
align-items: center;
.li{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 10rpx;
text{
font-size: 24rpx;
color: #FFFFFF;
text-align: center;
}
text:nth-child(2){
width: 44rpx;
height: 44rpx;
}
text:nth-child(3){
width: 8rpx;
height: 8rpx;
}
.today{
border-radius: 50%;
background: #29D3B4;
text-align: center;
line-height: 42rpx;
}
.select_plan{
background: #F59A23;
border-radius: 50%;
}
}
}
}
.section_2{
margin-top: 30rpx;
padding: 0 20rpx ;
color: #fff;
display: flex;
align-items: center;
gap: 20rpx;
.item_box {
width: 45%;
.fui-filter__item {
display: flex;
}
}
}
.section_3{
margin-top: 36rpx;
color: #fff;
font-size: 24rpx;
.ul{
padding: 0 26rpx;
display: flex;
flex-direction: column;
gap: 30rpx;
.li{
position: relative;
border-radius: 22rpx;
background: #434544 100%;
padding: 14rpx 0;
display: flex;
flex-direction: column;
.top_box{
padding: 20rpx 30rpx;
.center_box{
display: flex;
flex-direction: column;
gap: 10rpx;
view{}
}
.right_box{
.tag{
position:absolute;
top: 0rpx;
right: 0rpx;
padding: 10rpx;
width: 102rpx;
text-align: center;
font-size: 24rpx;
border-bottom-left-radius: 20rpx;
border-top-right-radius: 20rpx;
}
}
}
.bottom_box{
border-top: 1px dashed #F2F2F2;
padding: 26rpx 16rpx 0 26rpx;
.hint{
color:#D7D7D7;
}
.list_box{
margin-top: 22rpx;
display: flex;
justify-content: space-between;
align-items: center;
.list{
display: flex;
align-items: center;
gap: 14rpx;
.itme{
image{
width: 48rpx;
height: 48rpx;
border-radius: 50%;
}
}
}
.btn{
border: 1px solid #FAD04D;
border-radius: 10rpx;
background: #434544;
color: #FAD04D;
width: 110rpx;
height: 60rpx;
line-height: 55rpx;
text-align: center;
font-size: 24rpx;
}
}
}
}
}
}
}
</style>

373
pages/coach/home/index.vue

@ -1,6 +1,31 @@
<template> <template>
<view> <view class="main_box">
<!--自定义导航栏-->
<view class="navbar_section">
<view class="title">首页</view>
</view>
<view class="main_section">
<view class="section_1"> <view class="section_1">
<view class="top">
<view class="user">
<view class="pic">
<image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
</view>
<view class="name">包子皮</view>
</view>
<view class="right">
<view>
<text class="title">到课率统计</text>
<text>28%</text>
</view>
<view>
<text class="title" @click="openObjAddView()">发布作业</text>
<text></text>
</view>
</view>
</view>
<view class="bottom"></view>
<view class="text_box"> <view class="text_box">
<text>月授课数</text> <text>月授课数</text>
<text>12</text> <text>12</text>
@ -9,19 +34,155 @@
<text></text> <text></text>
</view> </view>
</view> </view>
<view class="section_2"></view>
<view class="section_3"></view> <view class="section_2">
<view class="section_3"></view> <view class="left_box">
<view>
<text>课程</text>
<text>预告</text>
</view>
<view>
<text>5/28周五 15:30~17:30</text>
<text>301室篮球少儿课程</text>
</view>
</view>
<view class="rigth_box">
<view>详情</view>
</view>
</view>
<view class="section_3">
<view class="title_box">
<view class="top_box">
<text>最近课程</text>
<view></view>
</view>
<view class="line"></view>
</view>
<view class="ul">
<view class="li">
<view class="left_box">
<view class="date_box">
<text>12</text>
<text>/</text>
<text>24</text>
</view>
<view class="ratio">
到课率80%
</view>
</view>
<view class="center_box">
<view>班级少年班</view>
<view>时间2020-05-25 15:30 - 17:30</view>
<view>课室302
</view>
<view>课程篮球少儿课
</view>
</view>
<view class="right_box">
<view class="tag" style="background:#fad24e;">上课中</view>
<!-- <view class="tag" style="background:#1cd188;">待上课</view>-->
</view>
</view>
<view class="li">
<view class="left_box">
<view class="date_box">
<text>12</text>
<text>/</text>
<text>24</text>
</view>
<view class="ratio">
到课率80%
</view>
</view>
<view class="center_box">
<view>班级少年班</view>
<view>时间2020-05-25 15:30 - 17:30</view>
<view>课室302
</view>
<view>课程篮球少儿课
</view>
</view>
<view class="right_box">
<!-- <view class="tag" style="background:#fad24e;">上课中</view>-->
<view class="tag" style="background:#1cd188;">待上课</view>
</view>
</view>
</view>
</view>
<view class="section_3">
<view class="title_box">
<view class="top_box">
<text>作业批改</text>
<view @click="openObjListView()">全部</view>
</view>
<view class="line"></view>
</view>
<view class="ul">
<view class="li">
<view class="left_box">
<view class="date_box">
<text>12</text>
<text>/</text>
<text>24</text>
</view>
<view class="ratio">
完成率80%
</view>
</view>
<view class="center_box">
<view>班级少年班</view>
<view>时间2020-05-25 15:30 - 17:30</view>
<view>课程篮球少儿课
</view>
</view>
<view class="right_box">
<!-- <view class="tag" style="background:#fad24e;">上课中</view>-->
<view class="tag" style="background:#1cd188;">待批改</view>
</view>
</view>
<view class="li">
<view class="left_box">
<view class="date_box">
<text>12</text>
<text>/</text>
<text>24</text>
</view>
<view class="ratio">
完成率80%
</view>
</view>
<view class="center_box">
<view>班级少年班</view>
<view>时间2020-05-25 15:30 - 17:30</view>
<view>课程篮球少儿课
</view>
</view>
<view class="right_box">
<!-- <view class="tag" style="background:#fad24e;">上课中</view>-->
<view class="tag" style="background:#1cd188;">待批改</view>
</view>
</view>
</view>
</view>
</view>
<!-- 底部导航-->
<AQTabber/>
</view> </view>
</template> </template>
<script> <script>
import user from '@/api/user.js'; import user from '@/api/user.js';
import fuiIcon from "@/components/firstui/fui-icon/fui-icon.vue" import AQTabber from "@/components/AQ/AQTabber.vue"
export default { export default {
components: { components: {
fuiIcon AQTabber,
}, },
data() { data() {
return { return {
@ -45,6 +206,21 @@ export default {
this.fetchData(this.um_id) this.fetchData(this.um_id)
}, },
methods: { methods: {
//-
openObjAddView(){
uni.navigateTo({
url: '/pages/coach/job/add'
})
},
//
openObjListView(){
uni.navigateTo({
url: '/pages/coach/job/list'
})
},
fetchData(um_id) { fetchData(um_id) {
user.activity_index({ user.activity_index({
um_id: um_id um_id: um_id
@ -135,14 +311,191 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.section_1{ .main_box{
border: 1px solid red; background: #292929 ;
width: 700rpx; }
//
.navbar_section{
display: flex;
justify-content: center;
align-items: center;
background: #29d3b4;
.title{
padding: 20rpx 0;
font-size: 30rpx;
color: #315d55;
}
}
.main_section{
min-height: 100vh;
background: #292929 100%;
padding: 0 24rpx;
padding-top: 40rpx;
padding-bottom: 150rpx;
font-size: 28rpx;
.section_1{
background: #FFFFFF 100%;
height: 264rpx; height: 264rpx;
border-radius: 14rpx; border-radius: 14rpx;
.text_box{ margin: 28rpx auto;
padding: 28rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
font-size: 28rpx;
.top{
display: flex;
justify-content: space-between;
align-items: center;
.user{
display: flex;
align-items: center;
gap: 20rpx;
.pic{
width: 144rpx;
height: 144rpx;
border-radius: 50%;
image{
width: 100%;
height: 100%;
}
}
}
.right{
display: flex;
flex-direction: column;
gap: 20rpx;
view{
display: flex;
gap: 10rpx;
.title{
width: 148rpx;
text-align: right;
}
}
}
}
.bottom{
padding: 0 44rpx;
}
}
.section_2{
border-radius: 60rpx;
padding: 28rpx 36rpx;
background: #29D3B4 100%;
color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
.left_box{
display: flex;
view{
display: flex;
flex-direction: column;
text{}
}
view:nth-child(1){
padding-right: 10rpx;
border-right: 2px solid #fff;
}
view:nth-child(2){
padding-left: 10rpx;
}
}
.rigth_box{
view{
width: 106rpx;
height: 50rpx;
line-height: 50rpx;
text-align: center;
border-radius: 25rpx;
background: #32baa1;
font-size: 24rpx;
}
}
}
.section_3{
margin-top: 36rpx;
color: #fff;
font-size: 24rpx;
.title_box{
display: flex;
flex-direction: column;
.top_box{
display: flex;
justify-content: space-between;
align-items: center;
text{
font-size: 30rpx;
}
}
.line{
width: 90rpx;
height: 2px;
background: #29D3B4;
}
} }
.ul{
margin-top: 30rpx;
display: flex;
flex-direction: column;
gap: 20rpx;
.li{
position: relative;
border-radius: 22rpx;
background: #434544 100%;
padding: 14rpx 0;
display: flex;
align-items: center;
.left_box{
margin-left: 28rpx;
width: 146rpx;
display: flex;
flex-direction: column;
gap: 10rpx;
.date_box{
display: flex;
font-size: 48rpx;
text:nth-child(1){
color: #29D3B4;
}
}
.ratio{
color: #AAAAAA;
}
}
.center_box{
margin-left: 52rpx;
display: flex;
flex-direction: column;
gap: 10rpx;
}
.right_box{
.tag{
position:absolute;
top: 0rpx;
right: 0rpx;
padding: 10rpx;
width: 102rpx;
text-align: center;
font-size: 24rpx;
border-bottom-left-radius: 20rpx;
border-top-right-radius: 20rpx;
}
}
}
}
}
} }
</style> </style>

104
pages/coach/job/add.vue

@ -0,0 +1,104 @@
<!--发布作业-->
<template>
<view class="main_section">
<view class="formData">
<view>
<fui-input required label="班级" borderTop placeholder="请选择班级" v-model="formData.class_name" @click="show_class=true"></fui-input>
<fui-picker layer="1" :linkage="true" :options="options_class_arr" :show="show_class" @change="changeClass" @cancel="show_class=false"></fui-picker>
</view>
<view>
<fui-input required label="课程" borderTop placeholder="请选择课程" v-model="formData.course_name" @click="show_course=true"></fui-input>
<fui-picker
layer="1"
:linkage="true"
:options="options_course_arr" :show="show_course" @change="changeCourse" @cancel="show_course=false"></fui-picker>
</view>
<view>
<fui-textarea required flexStart label="作业" placeholder="请输入内容" v-model="formData.homework"></fui-textarea>
</view>
</view>
<!-- 底部导航-->
<AQTabber/>
</view>
</template>
<script>
import user from '@/api/user.js';
import AQTabber from "@/components/AQ/AQTabber.vue"
export default {
components: {
AQTabber,
},
data() {
return {
show_class:false,
show_course:false,
options_class_arr:[
{ value: 1, text: '班级1' },
{ value: 2, text: '班级2' },
{ value: 3, text: '班级3' }
],
options_course_arr:[
{ value: 1, text: '课程1' },
{ value: 2, text: '课程2' },
{ value: 3, text: '课程3' }
],
formData:{
class_name:'',//()
class_id:'',//()
course_name:'',//()
course_id:'',//()
homework:'',//()
}
}
},
onLoad() {
},
methods: {
//-
changeClass(e) {
console.log('选择器-班级', e);
this.formData.class_id = e.value; // class_id
this.formData.class_name = e.text; // class_name
this.show_class = false; //
},
//-
changeCourse(e) {
console.log('选择器-课程', e);
this.formData.course_id = e.value; // course_id
this.formData.course_name = e.text; // course_name
this.show_course = false; //
},
}
}
</script>
<style lang="less" scoped>
.main_section{
min-height: 100vh;
background: #292929 100%;
padding: 0 24rpx;
padding-top: 40rpx;
padding-bottom: 150rpx;
font-size: 28rpx;
.formData{
display: flex;
flex-direction: column;
gap: 40rpx;
}
}
</style>

266
pages/coach/job/list.vue

@ -0,0 +1,266 @@
<!--作业列表-->
<template>
<view class="main_section">
<view class="section_3">
<view class="ul">
<view class="li">
<view class="left_box">
<view class="date_box">
<text>12</text>
<text>/</text>
<text>24</text>
</view>
<view class="ratio">
完成率80%
</view>
</view>
<view class="center_box">
<view>班级少年班</view>
<view>时间2020-05-25 15:30 - 17:30</view>
<view>课程篮球少儿课
</view>
</view>
<view class="right_box">
<!-- <view class="tag" style="background:#fad24e;">上课中</view>-->
<view class="tag" style="background:#1cd188;">待批改</view>
</view>
</view>
<view class="li">
<view class="left_box">
<view class="date_box">
<text>12</text>
<text>/</text>
<text>24</text>
</view>
<view class="ratio">
完成率80%
</view>
</view>
<view class="center_box">
<view>班级少年班</view>
<view>时间2020-05-25 15:30 - 17:30</view>
<view>课程篮球少儿课
</view>
</view>
<view class="right_box">
<!-- <view class="tag" style="background:#fad24e;">上课中</view>-->
<view class="tag" style="background:#1cd188;">待批改</view>
</view>
</view>
</view>
</view>
<!-- 底部导航-->
<AQTabber/>
</view>
</template>
<script>
import user from '@/api/user.js';
import AQTabber from "@/components/AQ/AQTabber.vue"
export default {
components: {
AQTabber,
},
data() {
return {
list: [],
likes: 0,
type: 1,
type1: 1,
activity_id: 0,
um_id: 0,
urls: 'http://medication.zeyan.wang/'
}
},
onLoad() {
const um_id = uni.getStorageSync('um_id');
this.um_id = um_id
if (um_id == '') {
uni.navigateTo({
url: '/pages/login/login'
})
}
this.fetchData(this.um_id)
},
methods: {
fetchData(um_id) {
user.activity_index({
um_id: um_id
}).then(res => {
console.log(res)
if (res.status == 200) {
if (res.data == null) {
this.list = []
} else {
this.list = res.data
}
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
},
onPullDownRefresh() {
this.fetchData(this.um_id)
},
publishing() {
uni.navigateTo({
url: '/pages/index/publishing'
})
},
like(id, um_id) {
user.activity_like({um_id: um_id, activity_id: id, type: 1}).then(res => {
if (res.status == 200) {
user.activity_index({
um_id: um_id
}).then(res => {
console.log(res)
if (res.status == 200) {
this.list = res.data
}
});
this.type = res.data.type
this.activity_id = res.data.activity_id
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
},
collection(id, um_id) {
user.activity_like({um_id: um_id, activity_id: id, type: 2}).then(res => {
if (res.status == 200) {
console.log(res)
this.fetchData(this.um_id)
this.type1 = res.data.type
this.activity_id = res.data.activity_id
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
},
coninfo(item) {
// user.coninfo({id:id}).then(res => {
// if(res.status == 200){
uni.setStorageSync('coninfo', item);
uni.navigateTo({
url: '/pages/index/coninfo'
})
// }else{
// uni.showToast({
// title: res.msg,
// icon: 'none'
// })
// }
// });
},
Comment(id) {
uni.setStorageSync('actid', id);
uni.navigateTo({
url: '/pages/index/Comment'
})
}
}
}
</script>
<style lang="less" scoped>
.main_section{
min-height: 100vh;
background: #292929 100%;
padding: 0 24rpx;
padding-top: 40rpx;
padding-bottom: 150rpx;
font-size: 28rpx;
.section_3{
margin-top: 36rpx;
color: #fff;
font-size: 24rpx;
.title_box{
display: flex;
flex-direction: column;
.top_box{
display: flex;
justify-content: space-between;
align-items: center;
text{
font-size: 30rpx;
}
}
.line{
width: 90rpx;
height: 2px;
background: #29D3B4;
}
}
.ul{
margin-top: 30rpx;
display: flex;
flex-direction: column;
gap: 20rpx;
.li{
position: relative;
border-radius: 22rpx;
background: #434544 100%;
padding: 14rpx 0;
display: flex;
align-items: center;
.left_box{
margin-left: 28rpx;
width: 146rpx;
display: flex;
flex-direction: column;
gap: 10rpx;
.date_box{
display: flex;
font-size: 48rpx;
text:nth-child(1){
color: #29D3B4;
}
}
.ratio{
color: #AAAAAA;
}
}
.center_box{
margin-left: 52rpx;
display: flex;
flex-direction: column;
gap: 10rpx;
}
.right_box{
.tag{
position:absolute;
top: 0rpx;
right: 0rpx;
padding: 10rpx;
width: 102rpx;
text-align: center;
font-size: 24rpx;
border-bottom-left-radius: 20rpx;
border-top-right-radius: 20rpx;
}
}
}
}
}
}
</style>
Loading…
Cancel
Save