Commit 320a8062 authored by 吴颖's avatar 吴颖

'修改测试问题'

parent 68326a62
@import "/wxParse/wxParse.wxss";
@import './iconfont/iconfont.wxss';
page{
page {
font-size: 24rpx;
box-sizing: border-box;
}
page::after{
page::after {
content: '';
position: fixed;
left: 0;
......@@ -15,49 +17,60 @@ page::after{
box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.08);
z-index: 100;
}
view {
view,
text,
textarea,
input {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.row{
.row {
display: flex;
flex-direction: row;
}
.column{
.column {
display: flex;
flex-direction: column;
}
.overflow{
.overflow {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.greyItem{
.greyItem {
width: 100%;
height: 20rpx;
background: #F8F6F9;
}
/* 空白页 */
.noneBox{
.noneBox {
padding: 140rpx 0 0;
align-items: center;
font-size: 28rpx;
color: #999;
}
.noneBox image{
.noneBox image {
width: 400rpx;
height: 400rpx;
margin-bottom: 30rpx;
}
/* 详情样式 */
.desc .hellorich{
.desc .hellorich {
max-width: 100% !important;
display: block;
margin: 0 auto;
}
.helloVideo{
.helloVideo {
display: block;
max-width: 100% !important;
height: auto;
......@@ -65,50 +78,58 @@ view {
}
/* 绑定手机 */
.telBox{
.telBox {
width: 500rpx;
height: 400rpx;
position: relative;
}
.van-popup{
border-radius: 10rpx!important;
.van-popup {
border-radius: 10rpx !important;
}
.telClose{
.telClose {
position: absolute;
right: 40rpx;
top: 0;
z-index: 1;
}
.telBox .title{
.telBox .title {
text-align: center;
color: #1A1A1A;
font-size: 32rpx;
font-weight: bold;
margin: 50rpx 0 20rpx;
}
.telRow{
.telRow {
margin: 0 40rpx;
height: 100rpx;
align-items: center;
justify-content: space-between;
border-bottom: 1rpx solid #EBEBEB;
}
.telRow input{
.telRow input {
font-size: 28rpx;
}
.codeInp{
.codeInp {
width: 200rpx;
}
.getBtn{
.getBtn {
color: #9FAA4B;
font-size: 28rpx;
}
.telBox .confirmBtn{
.telBox .confirmBtn {
width: 345rpx;
height: 70rpx;
line-height: 70rpx;
background: #9FAA4B;
border-radius:35rpx;
border-radius: 35rpx;
text-align: center;
font-size: 28rpx;
color: #fff;
......@@ -119,21 +140,21 @@ view {
/* */
/* 一行 */
.text-line-one {
overflow:hidden;
text-overflow:ellipsis;
-o-text-overflow:ellipsis;
-webkit-text-overflow:ellipsis;
-moz-text-overflow:ellipsis;
white-space:nowrap;
overflow: hidden;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
-webkit-text-overflow: ellipsis;
-moz-text-overflow: ellipsis;
white-space: nowrap;
}
/* 两行 */
.text-line-two {
word-break:break-all;
display:-webkit-box;
-webkit-line-clamp:2;
-webkit-box-orient:vertical;
overflow:hidden;
word-break: break-all;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
height: 85rpx;
}
......@@ -145,11 +166,16 @@ view {
/* flex兼容性 */
/* 父元素-横向排列(主轴) */
.flex-h {
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox; /* TWEENER - IE 10 */
display: -webkit-flex; /* NEW - Chrome */
display: flex; /* NEW, Spec - Opera 12.1, Firefox 20+ */
display: -webkit-box;
/* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box;
/* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox;
/* TWEENER - IE 10 */
display: -webkit-flex;
/* NEW - Chrome */
display: flex;
/* NEW, Spec - Opera 12.1, Firefox 20+ */
/* 09版 */
-webkit-box-orient: horizontal;
/* 12版 */
......@@ -159,13 +185,19 @@ view {
-o-flex-direction: row;
flex-direction: row;
}
/* 父元素-纵向排列(主轴) */
.flex-v {
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox; /* TWEENER - IE 10 */
display: -webkit-flex; /* NEW - Chrome */
display: flex; /* NEW, Spec - Opera 12.1, Firefox 20+ */
display: -webkit-box;
/* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box;
/* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox;
/* TWEENER - IE 10 */
display: -webkit-flex;
/* NEW - Chrome */
display: flex;
/* NEW, Spec - Opera 12.1, Firefox 20+ */
/* 09版 */
-webkit-box-orient: vertical;
/* 12版 */
......@@ -177,11 +209,16 @@ view {
}
.flex-hr {
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox; /* TWEENER - IE 10 */
display: -webkit-flex; /* NEW - Chrome */
display: flex; /* NEW, Spec - Opera 12.1, Firefox 20+ */
display: -webkit-box;
/* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box;
/* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox;
/* TWEENER - IE 10 */
display: -webkit-flex;
/* NEW - Chrome */
display: flex;
/* NEW, Spec - Opera 12.1, Firefox 20+ */
/* 09版 */
-webkit-box-orient: horizontal;
/* 12版 */
......@@ -247,6 +284,7 @@ view {
.empty {
padding: 50rpx 0 !important;
}
.van-empty__description {
margin-top: 32rpx !important;
font-size: 24rpx !important;
......
......@@ -11,8 +11,7 @@ Page({
* 页面的初始数据
*/
data: {
// coach_id: '5',
coach_id: '',
coach_id: '12',
class_id: '',
lesson_id: '',
classTime: '', // 上课时间
......@@ -30,15 +29,14 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getDate()
this.setData({
// coach_id: '5',
coach_id : app.globalData.coach_id,
// coach_id : app.globalData.coach_id,
class_id: options.class_id,
lesson_id: options.lesson_id,
courseTime: options.classTime,
classTime: options.classTime.split(' ')[1], // 上课时间
})
this.getDate()
this.getDetail()
},
onShow() {
......@@ -88,10 +86,10 @@ Page({
},
showButton: function (e) {
let time = this.data.courseTime.split('')[0]
var new_date = new Date(); //新建一个日期对象,默认现在的时间
var old_date = new Date(time); //设置过去的一个时间点,"yyyy-MM-dd HH:mm:ss"格式化日期
var new_date = new Date().getTime()/1000; //新建一个日期对象,默认现在的时间
var old_date = new Date(time).getTime()/1000; //设置过去的一个时间点,"yyyy-MM-dd HH:mm:ss"格式化日期
var difftime = old_date - new_date; //上课时间与现在时间的时间差
if ((difftime/1000/60) < 1800) {
if (difftime < 1800) {
let child_id = e.currentTarget.dataset.id
let params = {
url: 'coach/sign',
......@@ -127,8 +125,6 @@ Page({
let class_id = e.currentTarget.dataset.class_id
let class_single_id = e.currentTarget.dataset.class_single_id
let course_id = e.currentTarget.dataset.course_id
console.log(course_id)
console.log(class_single_id)
wx.navigateTo({
url: '/pages/index/evaluation/evaluation?child_id=' + child_id + '&class_id=' + class_id + '&class_single_id=' + class_single_id + '&course_id=' + course_id,
})
......@@ -141,6 +137,7 @@ Page({
lesson_id : this.data.lesson_id
},
callback : (data) => {
base.toast('课程完结')
}
}
base.newRequest(params)
......@@ -157,7 +154,5 @@ Page({
this.getDetail()
}
wx.stopPullDownRefresh()
},
}
})
\ No newline at end of file
......@@ -35,7 +35,7 @@ Page({
lesson_id: this.data.lesson_id
},
callback:(data)=>{
console.log(JSON.parse(data.class_moment))
if (data.class_moment !=null) {
let class_moment = JSON.parse(data.class_moment)
let arr1 = [], arr2 = []
for(var i=0; i< class_moment.length; i++) {
......@@ -49,9 +49,7 @@ Page({
videoBox: arr1,
imgBox: arr2
})
console.log(arr1)
console.log(arr2)
console.log(data)
}
}
}
base.newRequest(params)
......
const app = getApp()
import { Base } from '../../../utils/base.js';
import {
Base
} from '../../../utils/base.js';
const base = new Base()
Page({
......@@ -19,7 +21,7 @@ Page({
child_id: options.child_id,
class_id: options.class_id,
class_single_id: options.class_single_id,
course_id : options.course_id
course_id: options.course_id
})
this.getComment()
},
......@@ -31,20 +33,27 @@ Page({
})
},
inputs : function (e) {
inputs: function (e) {
this.setData({
value: e.detail.value
value: e.detail
})
console.log(this.data.value)
},
onDrag(event) {
console.log(event)
let index = event.currentTarget.dataset.index
this.data.scoreArr[index].score = event.detail.value
this.setData({
scoreArr: this.data.scoreArr
});
},
onchange(event) {
let index = event.currentTarget.dataset.index
this.data.scoreArr[index].score = event.detail
this.setData({
scoreArr: this.data.scoreArr
});
},
gobadgelist: function (e) {
var model = JSON.stringify(this.data.imgBox)
wx.navigateTo({
......@@ -92,7 +101,7 @@ Page({
save: function () {
let Score = true
this.data.scoreArr.map((e) => {
if(e.score == 0){
if (e.score == 0) {
base.toast('运动表现分值不能为0')
Score = false;
return
......@@ -100,7 +109,7 @@ Page({
});
if (!Score) return
if (this.data.value =='') {
if (this.data.value == '') {
base.toast('教练评语不能为空')
return
}
......
{
"usingComponents": {
"van-slider": "/components/vant/slider/index"
"van-slider": "/components/vant/slider/index",
"van-field": "/components/vant/field/index"
},
"navigationBarTitleText": "运动评价"
}
\ No newline at end of file
......@@ -4,7 +4,13 @@
<view class="one" wx:for="{{scoreArr}}" wx:key="index">
<view class="bar">
<view class="tit">{{item.name}}</view>
<van-slider class="custom-class" value="{{ item.score }}" max='100' bar-height="4px" active-color="#FFC600" use-button-slot bind:drag="onDrag" data-index='{{index}}'>
<van-slider
class="custom-class"
value="{{ item.score }}" max='100' bar-height="4px"
active-color="#FFC600" use-button-slot
bind:drag="onDrag" data-index='{{index}}'
bind:change='onchange'
>
<view class="custom-button" slot="button"></view>
</van-slider>
<view class="num">{{ item.score }}</view>
......@@ -14,9 +20,17 @@
<view class="coach">
<view class="title">教练评语</view>
<view class="text">
<textarea placeholder="请输入对学生的评价" maxlength="300" bindinput="inputs" value="{{value}}">
<van-field
placeholder="请输入对学生的评价"
maxlength="300"
type="textarea"
autosize
value="{{value}}"
border="{{ false }}"
bind:change="inputs"
/>
<text class="currentWordNumber">已输入{{value.length > 0 ? value.length: 0 }}/300</text>
</textarea>
</view>
</view>
<view class="badge">
......
......@@ -23,28 +23,33 @@ page {
.coach {
width: 690rpx;
/* height: 380rpx; */
background: #FFFFFF;
border-radius: 15rpx;
margin-bottom: 20rpx;
padding: 50rpx 30rpx;
}
.coach .text{
width: 634rpx;
background: #FFFFFF;
border: 1px solid #EBEBEB;
border-radius: 5px;
}
.coach .text textarea{
padding: 26rpx;
position: relative;
}
.van-field__input {
min-height: 190rpx !important;
background: pink;
}
.vant-cell:after {
border-bottom: none !important;
}
.coach .text .currentWordNumber{
display: block;
width: 100%;
color: #B3B3B3;
font-size: 24rpx;
position: absolute;
right: 2rpx;
bottom: 30rpx;
text-align: right;
padding-right: 26rpx;
margin: 10rpx 0 30rpx 0;
}
.coach .text .hint{
color: #B3B3B3;
......
<view class="box flex-v flex-hc flex-vc">
<image src="/images/course_login.png"></image>
<image src="/images/my/login.png"></image>
<view>豌豆教练</view>
</view>
\ No newline at end of file
......@@ -184,6 +184,19 @@
{
"name": "教学区域",
"pathName": "pages/my/teachingArea/teachingArea",
"query": "",
"scene": null
},
{
"name": "课程管理",
"pathName": "pages/index/classManagement/classManagement",
"query": "classTime=2020-11-28 10:00~11:00&class_id=23&lesson_id=85",
"scene": null
},
{
"name": "运动评价",
"pathName": "pages/index/evaluation/evaluation",
"query": "child_id=341&class_id=25&class_single_id=93&course_id=1001",
"scene": null
}
]
......
......@@ -46,7 +46,7 @@ class Base {
wx.showToast({
title: res.data.meta.msg,
icon: 'none',
duration: 2000
duration: 3000
})
}
......@@ -107,7 +107,7 @@ class Base {
toast(
title,
icon = 'none',
duration = 2000,
duration = 3000,
mask = true,
callback
) {
......
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