Browse Source

新增定时任务

master
王泽彦 9 months ago
parent
commit
598ba0e24e
  1. 813
      uniapp/pages/coach/my/index.vue

813
uniapp/pages/coach/my/index.vue

@ -1,416 +1,441 @@
<!--我的-首页--> <!--我的-首页-->
<template> <template>
<view class="main_box"> <view class="main_box">
<view style="background:#29D3B4;"> <view style="background:#29D3B4;">
<!--用户信息--> <!--用户信息-->
<view class="user_section"> <view class="user_section">
<view class="box"> <view class="box">
<view class="left" @click="openViewMyInfo()"> <view class="left" @click="openViewMyInfo()">
<image class="pic" :src="$util.img(memberInfo.head_img)"></image> <image class="pic" :src="$util.img(memberInfo.head_img)"></image>
<view class="name">{{memberInfo.name}}</view> <view class="name">{{memberInfo.name}}</view>
</view> </view>
<view class="right"> <view class="right">
<view class="btn"></view> <view class="btn"></view>
<!-- <view class="btn">切换身份</view>--> <!-- <view class="btn">切换身份</view>-->
<!-- <view class="btn" @click="openViewArrivalStatistics()">到课率统计</view> --> <!-- <view class="btn" @click="openViewArrivalStatistics()">到课率统计</view> -->
<!-- <view class="btn">到课率统计</view> --> <!-- <view class="btn">到课率统计</view> -->
<view class="btn"></view> <view class="btn"></view>
</view> </view>
</view> </view>
</view> </view>
<!--统计信息--> <!--统计信息-->
<view class="count_section"> <view class="count_section">
<view class="main"> <view class="main">
<view class="course_box"> <view class="course_box">
<view class="top"> <view class="top">
<view class="item"> <view class="item">
<view class="num">{{statisticsInfo.courseNum}}</view> <view class="num">{{statisticsInfo.courseNum}}</view>
<view class="intro">总授课数/</view> <view class="intro">总授课数/</view>
</view> </view>
<view class="item"> <view class="item">
<view class="num">{{statisticsInfo.classNum}}</view> <view class="num">{{statisticsInfo.classNum}}</view>
<view class="intro">总授班级/</view> <view class="intro">总授班级/</view>
</view> </view>
<view class="item"> <view class="item">
<view class="num">{{statisticsInfo.studentNum}}</view> <view class="num">{{statisticsInfo.studentNum}}</view>
<view class="intro">总负责学员/ <view class="intro">总负责学员/
</view> </view>
</view> </view>
</view> </view>
<view class="bottom"> <view class="bottom">
月授课数 月授课数
<text>{{statisticsInfo.courseMonthNum}}</text> <text>{{statisticsInfo.courseMonthNum}}</text>
月负责学员 月负责学员
<text>{{statisticsInfo.studentMonthNum}}</text> <text>{{statisticsInfo.studentMonthNum}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="bg_box bg_top"></view> <view class="bg_box bg_top"></view>
<view class="bg_box bg_bottom"></view> <view class="bg_box bg_bottom"></view>
</view> </view>
</view> </view>
<view class="main_section">
<view class="section_box">
<!-- <view class="item" @click="openViewSportsVenue()">
<view>我的体育场</view>
<view>xxx场馆</view>
</view> -->
<view class="item" @click="openViewDueSoon()">
<view>即将到期</view>
<view></view>
</view>
<view class="item" @click="openViewSchoolingStatisticsReal()">
<view>授课统计</view>
<view></view>
</view>
<!-- <view class="item"> --> <view class="main_section">
<view class="item" @click="openViewMyAttendance()"> <view class="section_box">
<view>我的考勤</view> <!-- <view class="item" @click="openViewSportsVenue()">
<view></view> <view>我的体育场</view>
</view> <view>xxx场馆</view>
</view> -->
<!-- <view class="item"> -->
<view class="item" @click="openViewSchoolingStatistics()">
<view>我的消息</view>
<view></view>
</view>
<view class="item" @click="teachingResearchManagement()">
<view>教研管理</view>
<view></view>
</view>
<view class="item" @click="openServiceDetail()">
<view>服务详情</view>
<view></view>
</view>
</view>
<view class="section_box"> <view class="item" @click="openViewDueSoon()">
<!-- <view class="item" @click="openViewFeedback()"> <view>即将到期</view>
<view></view>
</view>
<view class="item" @click="openViewSchoolingStatisticsReal()">
<view>授课统计</view>
<view></view>
</view>
<!-- <view class="item"> -->
<view class="item" @click="openViewMyAttendance()">
<view>我的考勤</view>
<view></view>
</view>
<!-- <view class="item"> -->
<view class="item" @click="openViewSchoolingStatistics()">
<view>我的消息</view>
<view></view>
</view>
<view class="item" @click="teachingResearchManagement()">
<view>教研管理</view>
<view></view>
</view>
<!-- <view class="item" @click="openServiceDetail()">
<view>服务详情</view>
<view></view>
</view> -->
<view class="item" @click="my_contract()">
<view>我的合同</view>
<view></view>
</view>
</view>
<view class="section_box">
<!-- <view class="item" @click="openViewFeedback()">
<view>意见反馈</view> <view>意见反馈</view>
<view></view> <view></view>
</view> --> </view> -->
<view class="item" @click="openViewSetUp()"> <view class="item" @click="openViewSetUp()">
<view>设置</view> <view>设置</view>
<view></view> <view></view>
</view> </view>
</view> </view>
</view> </view>
<!-- 底部导航--> <!-- 底部导航-->
<AQTabber/> <AQTabber />
</view> </view>
</template> </template>
<script> <script>
// import memberApi from '@/api/member.js'; // import memberApi from '@/api/member.js';
import AQTabber from "@/components/AQ/AQTabber.vue" import AQTabber from "@/components/AQ/AQTabber.vue"
import apiRoute from '@/api/apiRoute.js'; import apiRoute from '@/api/apiRoute.js';
export default { export default {
components: { components: {
AQTabber, AQTabber,
}, },
data() { data() {
return { return {
memberInfo:{}, memberInfo: {},
statisticsInfo: [] statisticsInfo: []
} }
}, },
onLoad() { onLoad() {
}, },
onShow() { onShow() {
this.init(); this.init();
}, },
methods: { methods: {
async init(){ async init() {
this.getStatistics() this.getStatistics()
}, },
my_contract(){
//() this.$navigateTo({
async getMemberInfo(){ url: '/pages/common/contract/my_contract'
let res = await apiRoute.getPersonnelInfo({}) })
if (res.code != 1) { },
uni.showToast({ //()
title: res.msg, async getMemberInfo() {
icon: 'none' let res = await apiRoute.getPersonnelInfo({})
}) if (res.code != 1) {
return uni.showToast({
} title: res.msg,
this.memberInfo = res.data icon: 'none'
}, })
return
// }
async getStatistics() { this.memberInfo = res.data
let res = await apiRoute.getStatisticsInfo({}) },
if (res.code != 1) {
uni.showToast({ //
title: res.msg, async getStatistics() {
icon: 'none' let res = await apiRoute.getStatisticsInfo({})
}) if (res.code != 1) {
return uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.statisticsInfo = res.data
this.getMemberInfo()
},
//
openViewArrivalStatistics() {
this.$navigateTo({
url: '/pages/coach/my/arrival_statistics'
})
},
//
openViewDueSoon() {
this.$navigateTo({
url: '/pages/coach/my/due_soon'
})
},
//
openViewSchoolingStatistics() {
this.$navigateTo({
url: '/pages/common/my_message'
})
},
//
teachingResearchManagement() {
this.$navigateTo({
url: '/pages/coach/my/teaching_management'
})
},
//
openViewFeedback() {
this.$navigateTo({
url: '/pages/common/feedback'
})
},
//
openViewMyInfo() {
this.$navigateTo({
url: '/pages/coach/my/info'
})
},
//
openViewSetUp() {
this.$navigateTo({
url: '/pages/coach/my/set_up'
})
},
//-
openViewMyAttendance() {
this.$navigateTo({
url: `/pages/common/my_attendance`
})
},
//
openServiceDetail() {
this.$navigateTo({
url: '/pages/coach/my/service_detail'
})
},
//
openViewSchoolingStatisticsReal() {
this.$navigateTo({
url: '/pages/coach/my/schooling_statistics'
})
},
//
openViewSportsVenue() {
uni.showModal({
title: '我的体育场',
content: '当前分配场馆:xxx场馆\n地址:xxx\n联系电话:xxx',
showCancel: false
})
},
} }
this.statisticsInfo = res.data }
this.getMemberInfo()
},
//
openViewArrivalStatistics(){
this.$navigateTo({
url: '/pages/coach/my/arrival_statistics'
})
},
//
openViewDueSoon(){
this.$navigateTo({
url: '/pages/coach/my/due_soon'
})
},
//
openViewSchoolingStatistics(){
this.$navigateTo({
url: '/pages/common/my_message'
})
},
//
teachingResearchManagement(){
this.$navigateTo({
url: '/pages/coach/my/teaching_management'
})
},
//
openViewFeedback(){
this.$navigateTo({
url: '/pages/common/feedback'
})
},
//
openViewMyInfo(){
this.$navigateTo({
url: '/pages/coach/my/info'
})
},
//
openViewSetUp(){
this.$navigateTo({
url: '/pages/coach/my/set_up'
})
},
//-
openViewMyAttendance(){
this.$navigateTo({
url: `/pages/common/my_attendance`
})
},
//
openServiceDetail(){
this.$navigateTo({
url: '/pages/coach/my/service_detail'
})
},
//
openViewSchoolingStatisticsReal(){
this.$navigateTo({
url: '/pages/coach/my/schooling_statistics'
})
},
//
openViewSportsVenue(){
uni.showModal({
title: '我的体育场',
content: '当前分配场馆:xxx场馆\n地址:xxx\n联系电话:xxx',
showCancel: false
})
},
}
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.main_box {
background: #292929;
min-height: 28vh;
}
//
.navbar_section {
border: 1px solid #29D3B4;
display: flex;
justify-content: center;
align-items: center;
background: #29D3B4;
.title {
padding: 40rpx 0rpx;
/* 小程序端样式 */
// #ifdef MP-WEIXIN
padding: 80rpx 0rpx;
// #endif
font-size: 30rpx;
color: #fff;
}
}
//
.user_section {
background-color: #29D3B4;
padding-top: 58rpx;
padding-bottom: 42rpx;
color: #fff;
font-size: 28rpx;
.box {
padding-left: 19rpx;
padding-right: 29rpx;
display: flex;
justify-content: space-between;
align-items: center;
gap: 15rpx;
.left {
display: flex;
align-items: center;
gap: 20rpx;
.pic {
width: 144rpx;
height: 144rpx;
border-radius: 50%;
}
.name {
font-size: 28rpx;
}
}
.right {
display: flex;
flex-direction: column;
gap: 20rpx;
.btn {
min-height: 28rpx;
font-size: 28rpx;
}
}
}
}
//
.count_section {
position: relative;
.main {
position: relative;
z-index: 2;
padding: 0rpx 24rpx;
display: flex;
justify-content: center;
.course_box {
padding: 42rpx 28rpx;
width: 692rpx;
border-radius: 20rpx;
background-color: #fff;
display: flex;
flex-direction: column;
gap: 32rpx;
.top {
display: flex;
justify-content: space-between;
align-items: center;
.item {
display: flex;
flex-direction: column;
align-items: center;
gap: 12rpx;
.num {
color: #29D3B4;
font-size: 56rpx;
}
.intro {
color: #AAAAAA;
font-size: 24rpx;
}
}
}
.bottom {
font-size: 24rpx;
color: #333333;
text {
color: #29D3B4;
}
}
}
}
.main_box{ .bg_box {
background: #292929; z-index: 1;
min-height: 28vh; width: 100%;
} height: 150rpx;
}
//
.navbar_section{
border: 1px solid #29D3B4;
display: flex;
justify-content: center;
align-items: center;
background: #29D3B4;
.title{
padding: 40rpx 0rpx;
/* 小程序端样式 */
// #ifdef MP-WEIXIN
padding: 80rpx 0rpx;
// #endif
font-size: 30rpx;
color: #fff;
}
}
//
.user_section {
background-color: #29D3B4;
padding-top: 58rpx;
padding-bottom: 42rpx;
color: #fff;
font-size: 28rpx;
.box{
padding-left: 19rpx;
padding-right: 29rpx;
display: flex;
justify-content: space-between;
align-items: center;
gap: 15rpx;
.left{
display: flex;
align-items: center;
gap: 20rpx;
.pic{
width: 144rpx;
height: 144rpx;
border-radius: 50%;
}
.name{
font-size: 28rpx;
}
}
.right{
display: flex;
flex-direction: column;
gap: 20rpx;
.btn{
min-height: 28rpx;
font-size: 28rpx;
}
}
}
}
//
.count_section{
position: relative;
.main{
position: relative;
z-index: 2;
padding: 0rpx 24rpx;
display: flex;
justify-content: center;
.course_box{
padding: 42rpx 28rpx;
width: 692rpx;
border-radius: 20rpx;
background-color: #fff;
display: flex;
flex-direction: column;
gap: 32rpx;
.top{
display: flex;
justify-content: space-between;
align-items: center;
.item{
display: flex;
flex-direction: column;
align-items: center;
gap: 12rpx;
.num{
color: #29D3B4;
font-size: 56rpx;
}
.intro{
color: #AAAAAA;
font-size: 24rpx;
}
}
}
.bottom{
font-size: 24rpx;
color: #333333;
text{
color: #29D3B4;
}
}
}
}
.bg_box{
z-index: 1;
width: 100%;
height: 150rpx;
}
.bg_top{
position: absolute;
top: 0;
background-color: #29D3B4;
}
.bg_bottom{
top: 50%;
position: absolute;
background-color: #292929;
}
}
.main_section{
background: #292929 100%;
padding: 0 24rpx;
padding-top: 40rpx;
padding-bottom: 150rpx;
font-size: 24rpx;
color: #333333;
display: flex;
flex-direction: column;
gap: 22rpx;
.section_box {
background: #fff;
border-radius: 16rpx;
padding: 6rpx 24rpx;
display: flex;
flex-direction: column;
.item{
padding: 24rpx 78rpx;
border-top: 1px solid #F2F2F2;
font-size: 28rpx;
display: flex;
justify-content: space-between;
}
.item:nth-child(1){
border-top: 0;
}
}
}
.bg_top {
position: absolute;
top: 0;
background-color: #29D3B4;
}
.bg_bottom {
top: 50%;
position: absolute;
background-color: #292929;
}
}
.main_section {
background: #292929 100%;
padding: 0 24rpx;
padding-top: 40rpx;
padding-bottom: 150rpx;
font-size: 24rpx;
color: #333333;
display: flex;
flex-direction: column;
gap: 22rpx;
.section_box {
background: #fff;
border-radius: 16rpx;
padding: 6rpx 24rpx;
display: flex;
flex-direction: column;
.item {
padding: 24rpx 78rpx;
border-top: 1px solid #F2F2F2;
font-size: 28rpx;
display: flex;
justify-content: space-between;
}
.item:nth-child(1) {
border-top: 0;
}
}
}
</style> </style>
Loading…
Cancel
Save