|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
- <u-navbar title="中国舞十级班" >
|
|
|
-
|
|
|
+ <u-navbar title="中国舞十级班">
|
|
|
+
|
|
|
</u-navbar>
|
|
|
<!-- 头部 -->
|
|
|
<view class="header">
|
|
@@ -12,114 +12,298 @@
|
|
|
<view class="times">
|
|
|
已上 10 节 / 共 36 课次
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
</view>
|
|
|
<view class="state">
|
|
|
进行中
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
</view>
|
|
|
<!-- 课次 -->
|
|
|
<view class="class-times">
|
|
|
-
|
|
|
- <view class="item-box" v-for="(item,index) in classList" :key="item.id">
|
|
|
- <view class="item" >
|
|
|
- <view class="class">
|
|
|
-
|
|
|
- 课程 {{item.id+=1}}
|
|
|
- </view>
|
|
|
- <view
|
|
|
- :class="{state0:item.state==0,state1:item.state==1,state2:item.state==2,state3:item.state==3,state4:item.state==4}">
|
|
|
- {{item.text}}
|
|
|
- </view>
|
|
|
- <view class="boder-right">
|
|
|
-
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+ <view class="item-box" v-for="(item,index) in classList" :key="index">
|
|
|
+ <view class="item">
|
|
|
+ <view class="class">
|
|
|
+
|
|
|
+ 课程 {{item.id + 1}}
|
|
|
+ </view>
|
|
|
+ <!-- <view
|
|
|
+ :class="{state0:item.state==0,state1:item.state==1,state2:item.state==2,state3:item.state==3,state4:item.state==4}">
|
|
|
+ {{item.text}}
|
|
|
+ </view> -->
|
|
|
+ <view class="state0" v-if="item.state == 0">
|
|
|
+ {{item.text}}
|
|
|
+ </view>
|
|
|
+ <view class="state1" v-if="item.state == 1">
|
|
|
+ {{item.text}}
|
|
|
+ </view>
|
|
|
+ <view class="state2" v-if="item.state == 2">
|
|
|
+ {{item.text}}
|
|
|
+ </view>
|
|
|
+ <view class="state3" v-if="item.state == 3">
|
|
|
+ {{item.text}}
|
|
|
+ </view>
|
|
|
+ <view class="boder-right">
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import * as mineApi from '@/apis/parents/mine.js'
|
|
|
+
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- classList:[
|
|
|
- {id:0,class:"课程1", state:1,text:"停课"},
|
|
|
- {id:1,state:1,text:"停课"},
|
|
|
- {id:2,state:1,text:"停课"},
|
|
|
- {id:3,state:1,text:"停课"},
|
|
|
- {id:4,state:1,text:"停课"},
|
|
|
- {id:5,state:1,text:"停课"},
|
|
|
- {id:6,state:2,text:"到课"},
|
|
|
- {id:7,state:3,text:"旷课"},
|
|
|
- {id:8,state:4,text:"请假"},
|
|
|
- {id:9,state:0,},
|
|
|
- {id:10,state:0,},
|
|
|
- {id:11,state:0,},
|
|
|
- {id:12,state:0,},
|
|
|
- {id:13,state:0,},
|
|
|
- {id:14,state:0,},
|
|
|
- {id:15,state:0,},
|
|
|
- {id:16,state:0,},
|
|
|
- {id:17,state:0,},
|
|
|
- {id:18,state:0,},
|
|
|
- {id:19,state:0,},
|
|
|
- {id:20,state:0,},
|
|
|
- {id:21,state:0,},
|
|
|
- {id:22,state:0,},
|
|
|
- {id:23,state:0,},
|
|
|
- {id:24,state:0,},
|
|
|
- {id:25,state:0,},
|
|
|
- {id:26,state:0,},
|
|
|
- {id:27,state:0,},
|
|
|
- {id:28,state:0,},
|
|
|
- {id:29,state:0,},
|
|
|
- {id:30,state:0,},
|
|
|
- {id:31,state:0,},
|
|
|
- {id:32,state:0,},
|
|
|
- {id:33,state:0,},
|
|
|
- {id:34,state:0,},
|
|
|
- {id:35,state:0,},
|
|
|
-
|
|
|
+ buyId: '',
|
|
|
+ classList: [{
|
|
|
+ id: 0,
|
|
|
+ class: "课程1",
|
|
|
+ state: 1,
|
|
|
+ text: "停课"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ state: 1,
|
|
|
+ text: "停课"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 2,
|
|
|
+ state: 1,
|
|
|
+ text: "停课"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 3,
|
|
|
+ state: 1,
|
|
|
+ text: "停课"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 4,
|
|
|
+ state: 1,
|
|
|
+ text: "停课"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 5,
|
|
|
+ state: 1,
|
|
|
+ text: "停课"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 6,
|
|
|
+ state: 2,
|
|
|
+ text: "到课"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 7,
|
|
|
+ state: 3,
|
|
|
+ text: "旷课"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 8,
|
|
|
+ state: 4,
|
|
|
+ text: "请假"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 9,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 10,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 11,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 12,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 13,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 14,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 15,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 16,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 17,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 18,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 19,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 20,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 21,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 22,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 23,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 24,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 25,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 26,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 27,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 28,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 29,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 30,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 31,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 32,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 33,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 34,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 35,
|
|
|
+ state: 0,
|
|
|
+ text: ""
|
|
|
+ },
|
|
|
+
|
|
|
]
|
|
|
-
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onLoad(op) {
|
|
|
+ if(op.id) {
|
|
|
+ this.buyId = op.id;
|
|
|
+ this.getLoadCourseRollcall();
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
+ getLoadCourseRollcall() {
|
|
|
+ uni.showLoading({
|
|
|
+ title: "加载中",
|
|
|
+ mask: true,
|
|
|
+ })
|
|
|
+ mineApi.loadCourseRollcall({
|
|
|
+ buyId: this.buyId
|
|
|
+ }).then((res) => {
|
|
|
+ uni.hideLoading();
|
|
|
+ // this.courseList = res.data;
|
|
|
+ }).catch(error => {
|
|
|
+ uni.showToast({
|
|
|
+ title: error,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
- page{
|
|
|
+ page {
|
|
|
padding-bottom: 140rpx;
|
|
|
}
|
|
|
+
|
|
|
// 头部
|
|
|
- .header{
|
|
|
- background: linear-gradient(90deg, rgba(0,156,185,1) 0%,rgba(13,186,199,1) 100%);
|
|
|
+ .header {
|
|
|
+ background: linear-gradient(90deg, rgba(0, 156, 185, 1) 0%, rgba(13, 186, 199, 1) 100%);
|
|
|
padding: 24rpx 32rpx;
|
|
|
color: #fff;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- .infos{
|
|
|
- .title{
|
|
|
+
|
|
|
+ .infos {
|
|
|
+ .title {
|
|
|
font-size: 40rpx;
|
|
|
font-family: PingFangSC-medium;
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
- .times{
|
|
|
+
|
|
|
+ .times {
|
|
|
font-family: PingFangSC-regular;
|
|
|
margin-top: 8rpx;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- .state{
|
|
|
+
|
|
|
+ .state {
|
|
|
margin-left: auto;
|
|
|
border-radius: 8rpx;
|
|
|
background-color: rgba(13, 186, 199, 1);
|
|
@@ -133,67 +317,73 @@
|
|
|
line-height: 48rpx;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- // 课次
|
|
|
- .class-times{
|
|
|
- background-color: #F2F4F4;
|
|
|
-
|
|
|
- display: flex;
|
|
|
- flex-wrap: wrap;
|
|
|
-
|
|
|
- .item-box{
|
|
|
- width: 33.3%;
|
|
|
- padding: 24rpx 0;
|
|
|
- background-color: #fff;
|
|
|
- margin-bottom:16rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .item{
|
|
|
-
|
|
|
-
|
|
|
- border-right: 1px #e8e8e8 solid;
|
|
|
-
|
|
|
- text-align: center;
|
|
|
- .class{
|
|
|
- color: rgba(51, 51, 51, 1);
|
|
|
- font-size: 32rpx;
|
|
|
- text-align: center;
|
|
|
- font-family: PingFangSC-medium;
|
|
|
- height: 44rpx;
|
|
|
- line-height: 44rpx;
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
- .state0{
|
|
|
- margin-top: 8rpx;
|
|
|
- height: 36rpx;
|
|
|
- }
|
|
|
- .state1{
|
|
|
- color: rgba(238, 49, 56, 1);
|
|
|
- font-family: PingFangSC-regular;
|
|
|
- margin-top: 8rpx;
|
|
|
- height: 36rpx;
|
|
|
- }
|
|
|
- .state2{
|
|
|
- color: rgba(13, 186, 199, 1);
|
|
|
- font-family: PingFangSC-regular;
|
|
|
- margin-top: 8rpx;
|
|
|
- height: 36rpx;
|
|
|
- }
|
|
|
- .state3{
|
|
|
- color: rgba(255, 107, 0, 1);
|
|
|
- font-family: PingFangSC-regular;
|
|
|
- margin-top: 8rpx;
|
|
|
- height: 36rpx;
|
|
|
- }
|
|
|
- .state4{
|
|
|
- color: rgba(129, 97, 255, 1);
|
|
|
- font-family: PingFangSC-regular;
|
|
|
- margin-top: 8rpx;
|
|
|
- height: 36rpx;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
+
|
|
|
+ // 课次
|
|
|
+ .class-times {
|
|
|
+ background-color: #F2F4F4;
|
|
|
+
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+
|
|
|
+ .item-box {
|
|
|
+ width: 33.3%;
|
|
|
+ padding: 24rpx 0;
|
|
|
+ background-color: #fff;
|
|
|
+ margin-bottom: 16rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .item {
|
|
|
+
|
|
|
+
|
|
|
+ border-right: 1px #e8e8e8 solid;
|
|
|
+
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ .class {
|
|
|
+ color: rgba(51, 51, 51, 1);
|
|
|
+ font-size: 32rpx;
|
|
|
+ text-align: center;
|
|
|
+ font-family: PingFangSC-medium;
|
|
|
+ height: 44rpx;
|
|
|
+ line-height: 44rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ .state0 {
|
|
|
+ margin-top: 8rpx;
|
|
|
+ height: 36rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .state1 {
|
|
|
+ color: rgba(238, 49, 56, 1);
|
|
|
+ font-family: PingFangSC-regular;
|
|
|
+ margin-top: 8rpx;
|
|
|
+ height: 36rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .state2 {
|
|
|
+ color: rgba(13, 186, 199, 1);
|
|
|
+ font-family: PingFangSC-regular;
|
|
|
+ margin-top: 8rpx;
|
|
|
+ height: 36rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .state3 {
|
|
|
+ color: rgba(255, 107, 0, 1);
|
|
|
+ font-family: PingFangSC-regular;
|
|
|
+ margin-top: 8rpx;
|
|
|
+ height: 36rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .state4 {
|
|
|
+ color: rgba(129, 97, 255, 1);
|
|
|
+ font-family: PingFangSC-regular;
|
|
|
+ margin-top: 8rpx;
|
|
|
+ height: 36rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
</style>
|