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

'修改测试问题'

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