Commit 000a0252 authored by 吴颖's avatar 吴颖

Merge branch 'master' of...

Merge branch 'master' of http://gitlab.xueyoubangedu.com/shipanpan/wandouchengzhang_coach into wuying
parents 1d42ef92 fa5b3e45
<view class="noneBox"> <view class="noneBox">
<image src="../../images/none.png"></image> <image src="/images/without.png"></image>
<view>暂无内容</view> <view>暂无内容</view>
</view> </view>
\ No newline at end of file
...@@ -20,6 +20,7 @@ Page({ ...@@ -20,6 +20,7 @@ Page({
lesson_id: options.lesson_id lesson_id: options.lesson_id
}) })
console.log(options.lesson_id) console.log(options.lesson_id)
console.log(options.class_id)
this.getlessondetail() this.getlessondetail()
}, },
...@@ -47,7 +48,7 @@ Page({ ...@@ -47,7 +48,7 @@ Page({
var child_id = e.currentTarget.dataset.id var child_id = e.currentTarget.dataset.id
console.log(child_id) console.log(child_id)
wx.navigateTo({ wx.navigateTo({
url: '../../index/performance/performance?child_id=' + child_id, url: '../../index/performance/performance?child_id=' + child_id + '&lesson_id=' + this.data.lesson_id + '&class_id=' + this.data.class_id,
}) })
}, },
gocourseinstant: function () { gocourseinstant: function () {
......
...@@ -9,7 +9,6 @@ Page({ ...@@ -9,7 +9,6 @@ Page({
min: 0,//最少字数 min: 0,//最少字数
max: 300, //最多字数 max: 300, //最多字数
currentWordNumber:0, currentWordNumber:0,
currentValue: 50,
}, },
onLoad: function (options) { onLoad: function (options) {
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<view class="performance"> <view class="performance">
<view class="title">运动表现</view> <view class="title">运动表现</view>
<bar id="bar1" class="bar1" currentProgress="10" maxProgress="10" canSlide="{{true}}" progressName="运动量" slideImg="../../images/ic_slide_button_1.png" /> <bar id="bar1" class="bar1" currentProgress="10" maxProgress="10" canSlide="{{true}}" progressName="运动量" slideImg="../../images/ic_slide_button_1.png" />
<bar id="bar1" class="bar1" currentProgress="9" maxProgress="10" canSlide="{{true}}" progressName="体力" slideImg="../../images/ic_slide_button_1.png" /> <bar id="bar1" class="bar1" currentProgress="10" maxProgress="10" canSlide="{{true}}" progressName="体力" slideImg="../../images/ic_slide_button_1.png" />
<bar id="bar1" class="bar1" currentProgress="8" maxProgress="10" canSlide="{{true}}" progressName="完整度" slideImg="../../images/ic_slide_button_1.png" /> <bar id="bar1" class="bar1" currentProgress="10" maxProgress="10" canSlide="{{true}}" progressName="完整度" slideImg="../../images/ic_slide_button_1.png" />
<bar id="bar1" class="bar1" currentProgress="6" maxProgress="10" canSlide="{{true}}" progressName="柔韧度" slideImg="../../images/ic_slide_button_1.png" /> <bar id="bar1" class="bar1" currentProgress="10" maxProgress="10" canSlide="{{true}}" progressName="柔韧度" slideImg="../../images/ic_slide_button_1.png" />
<bar id="bar1" class="bar1" currentProgress="8" maxProgress="10" canSlide="{{true}}" progressName="耐力" slideImg="../../images/ic_slide_button_1.png" /> <bar id="bar1" class="bar1" currentProgress="10" maxProgress="10" canSlide="{{true}}" progressName="耐力" slideImg="../../images/ic_slide_button_1.png" />
</view> </view>
<view class="coach"> <view class="coach">
<view class="title">教练评语</view> <view class="title">教练评语</view>
......
...@@ -8,18 +8,15 @@ Page({ ...@@ -8,18 +8,15 @@ Page({
windowWidth: '', windowWidth: '',
windowHeight: '', windowHeight: '',
coach : '', coach : '',
scoreList: '', scoreList: [],
coachcomment:'', coachcomment:'',
awardList: [] awardList: [],
arr1: [],
arr2:[]
}, },
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) { onLoad: function (options) {
console.log(options.child_id) console.log(options.child_id)
this.getRpx() this.getRpx()
this.getCharts()
this.getcomment() this.getcomment()
this.getbadges() this.getbadges()
}, },
...@@ -34,10 +31,10 @@ Page({ ...@@ -34,10 +31,10 @@ Page({
lineChart = new Charts({ lineChart = new Charts({
canvasId: 'radarCanvas', canvasId: 'radarCanvas',
type: 'radar', type: 'radar',
categories: ['耐力', '体力', '柔韧度', '训练完整度', '运动量' ], categories: this.data.arr1,
legend: false,
series: [{ series: [{
name: '运动表现', data: this.data.arr2,
data: [90, 110, 125, 95, 87],
}], }],
width: this.data.windowWidth, width: this.data.windowWidth,
height: this.data.windowHeight, height: this.data.windowHeight,
...@@ -49,14 +46,14 @@ Page({ ...@@ -49,14 +46,14 @@ Page({
}); });
}, },
getcomment : function () { getcomment : function () {
const { coach_id,class_id,lesson_id,child_id } = this.data const { coach_id,class_id,lesson_id,child_id, } = this.data
let params = { let params = {
url: 'coach/comment', url: 'coach/comment',
data:{ data:{
coach_id : 5, coach_id : 5,
class_id : 16, class_id : 16,
lesson_id : 69, lesson_id : 69,
child_id : 14 child_id : 14,
}, },
callback : (data) => { callback : (data) => {
console.log(data) console.log(data)
...@@ -65,23 +62,38 @@ Page({ ...@@ -65,23 +62,38 @@ Page({
coachcomment : data, coachcomment : data,
scoreList : data.comment_score, scoreList : data.comment_score,
}) })
var arrs = [];
var newArrs =[];
for(var i = 0 ; i<this.data.scoreList.length; i++) {
// console.log(this.data.scoreList)
arrs.push(this.data.scoreList[i].comment_norm.name)
// console.log(arrs)
newArrs.push(this.data.scoreList[i].score)
// console.log(newArrs)
} }
this.setData({
arr1:arrs,
arr2: newArrs
})
console.log(this.data.arr1)
console.log(this.data.arr2)
this.getCharts()
},
} }
base.newRequest(params) base.newRequest(params)
}, },
getbadges : function () { getbadges : function () {
const { user_child_id,class_id,class_single_id } = this.data
let params = { let params = {
url: 'badges', url: 'badges',
data : { data : {
user_child_id, user_child_id : 303,
class_id, class_id : 16 ,
class_single_id class_single_id : 69,
}, },
callback : (data) =>{ callback : (data) =>{
console.log(data) console.log(data)
this.setData({ this.setData({
awardList : data
}) })
} }
} }
......
{ {
"usingComponents": {}, "usingComponents": {},
"navigationBarTitleText": "运动表现" "navigationBarTitleText": "运动评价"
} }
\ No newline at end of file
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<view class="flex-h"> <view class="flex-h">
<image src="/images/default_head.png" wx:if="{{coachcomment.child.wx_user.avatarurl == null}}"></image> <image src="/images/default_head.png" wx:if="{{coachcomment.child.wx_user.avatarurl == null}}"></image>
<image src="{{coachcomment.child.wx_user.avatarurl}}" wx:else></image> <image src="{{coachcomment.child.wx_user.avatarurl}}" wx:else></image>
<text class="name">{{coachcomment.child.wx_user.nickname ? 'coachcomment.child.wx_user.nickname' : '家长名字'}}</text> <text class="name">{{coachcomment.child.wx_user.nickname}}</text>
</view> </view>
<view class="comments">{{coachcomment.comment_reply}}</view> <view class="comments">{{coachcomment.comment_reply}}</view>
</view> </view>
...@@ -30,8 +30,9 @@ ...@@ -30,8 +30,9 @@
<view class="one"> <view class="one">
<view class="title">收获徽章</view> <view class="title">收获徽章</view>
<view class="flex-h flex-hw flex-vc"> <view class="flex-h flex-hw flex-vc">
<block wx:for='{{awardList}}' wx:key='index'> <block wx:for='{{awardList}}' wx:key='index' wx:for-item="item">
<image class="awardone" src="{{item.src}}"></image> <image class="awardone" src="/images/my/per_pic_02.png" wx:if="{{item.badges.icon == null}}"></image>
<image class="awardone" src="{{item.badges.icon}}" wx:else></image>
</block> </block>
</view> </view>
</view> </view>
\ No newline at end of file
// pages/my/teachingArea/teachingArea.js const app = getApp()
import { Base } from '../../../utils/base.js';
const base = new Base()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
cityShow: false,
cityList: [
{
name: '石家庄市'
},
{
name: '保定市'
},
{
name: '邯郸市'
},
{
name: '秦皇岛市'
},
{
name: '邢台市'
},
{
name: '承德市'
},
]
}, },
/** /**
...@@ -14,6 +36,50 @@ Page({ ...@@ -14,6 +36,50 @@ Page({
onLoad: function (options) { onLoad: function (options) {
}, },
changeCity: function (e) {
this.setData({
cityShow: true
})
},
closeCityShow: function (e) {
this.setData({
cityShow: false
})
},
chooseCity(e) {
let index = e.currentTarget.dataset.index
let list = this.data.cityList
if (list[index].isChecked) {
list[index].isChecked = false
} else {
list[index].isChecked = true
}
this.setData({
cityList: list
})
// console.log(e.currentTarget.dataset.item)
// if (e.currentTarget.dataset.item.city_name != this.data.cityChecked) {
// this.setData({
// cityList: list
// })
// }
},
cityChangeComfirm() {
for (var i = 0; i < this.data.cityList.length; i++) {
if (this.data.cityChecked == this.data.cityList[i].city_name) {
app.globalData.city_id = this.data.cityList[i].id
app.globalData.city_name = this.data.cityList[i].city_name
}
this.setData({
cityShow: false
})
}
// if (arr.length == 0) {
// base.toast('至少选择一个城市')
// }else {
// console.log(arr)
// }
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
......
<view class="place flex-h flex-vc"> <view class="place flex-h flex-vc" catchtap="changeCity">
<image src="../../../images/location.png"></image> <image src="../../../images/location.png"></image>
<view>已选城市:石家庄</view> <view>已选城市:石家庄</view>
</view> </view>
...@@ -30,3 +30,20 @@ ...@@ -30,3 +30,20 @@
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="cityBox" wx:if="{{cityShow}}" catchtap="closeCityShow">
<view class="cityContent">
<view class="cityTitle">
请选择城市
<text class="iconfont iconguanbi1" catchtap="closeCityShow"></text>
</view>
<view class="cityCenter">
<!-- <view class="cityCenter_title">已开通服务城市</view> -->
<view class="cityCenter_con flex-h flex-hw">
<block wx:for='{{cityList}}' wx:key='index'>
<text class="{{item.isChecked ? 'city_active' : ''}}" catchtap="chooseCity" data-index='{{index}}'>{{item.name}}</text>
</block>
</view>
</view>
<view class="cityConfirm" catchtap="cityChangeComfirm">确定</view>
</view>
</view>
\ No newline at end of file
...@@ -38,3 +38,71 @@ ...@@ -38,3 +38,71 @@
background: #EBEBEB; background: #EBEBEB;
margin: 0 auto; margin: 0 auto;
} }
/* 切换城市弹出框 */
.cityBox {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.3);
z-index: 20;
}
.cityContent {
width: 580rpx;
height: auto;
background: #FFFFFF;
border-radius: 10rpx;
margin: 40% auto;
padding: 54rpx 0 51rpx 0;
position: relative;
}
.cityTitle {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #1A1A1A;
width: 100%;
text-align: center;
margin-bottom: 58rpx;
}
.cityTitle text{
position: absolute;
right: 39rpx;
top: 43rpx;
color: #CCCCCC;
}
.cityCenter {
padding-left: 40rpx;
}
.cityCenter_title {
font-size: 24rpx;
color: #A6A6A6;
margin-bottom: 34rpx;
}
.cityCenter_con text {
min-width: 156rpx;
height: 56rpx;
border-radius: 28rpx;
text-align: center;
line-height: 56rpx;
font-size: 26rpx;
color: #B4BC4D;
border: 1px solid #B4BC4D;
margin: 0 15rpx 20rpx 0;
}
.city_active {
color: #fff !important;
background: linear-gradient(13deg, #AAB247 0%, #B4BC4D 100%);
}
.cityConfirm {
width: 345rpx;
height: 68rpx;
background: linear-gradient(-70deg, #FFC600 0%, #FFD400 100%);
border-radius: 34rpx;
text-align: center;
line-height: 68rpx;
margin: 29rpx auto 0 auto;
font-size: 28rpx;
color: #1A1A1A;
}
\ No newline at end of file
...@@ -8,15 +8,19 @@ Page({ ...@@ -8,15 +8,19 @@ Page({
data: { data: {
activeIndex: 1, activeIndex: 1,
datalList: [], datalList: [],
locked:false locked:false,
classList : [],
}, },
onLoad: function (options) { onLoad: function (options) {
this.getList(); wx.showLoading({
title: '加载中...',
})
this.getList()
this.getMyclasslist(); this.getMyclasslist();
this.getList();
}, },
// 抢班列表
getList: function () { getList: function () {
wx.showLoading({ wx.showLoading({
title: '加载中', title: '加载中',
...@@ -34,11 +38,11 @@ Page({ ...@@ -34,11 +38,11 @@ Page({
datalList: data, datalList: data,
locked:false locked:false
}) })
console.log(data)
} }
} }
base.newRequest(params) base.newRequest(params)
}, },
// 我的班级列表
getMyclasslist: function () { getMyclasslist: function () {
wx.showLoading({ wx.showLoading({
title: '加载中...', title: '加载中...',
...@@ -53,13 +57,14 @@ Page({ ...@@ -53,13 +57,14 @@ Page({
console.log(data) console.log(data)
wx.hideLoading(); wx.hideLoading();
this.setData({ this.setData({
datalList:data, classList: data,
locked:false locked:false
}) })
} }
} }
base.newRequest(params) base.newRequest(params)
}, },
// 抢班-我的班级列表
getrobclass : function () { getrobclass : function () {
const { coach_id, class_id} = this.data const { coach_id, class_id} = this.data
let params = { let params = {
...@@ -86,10 +91,9 @@ Page({ ...@@ -86,10 +91,9 @@ Page({
} }
}, },
goteamDetail (e) { goteamDetail (e) {
var lesson_id = e.currentTarget.dataset.id var class_id = e.currentTarget.dataset.id
console.log(lesson_id)
wx.navigateTo({ wx.navigateTo({
url: '../../team/teamDetail/teamDetail?lesson_id=' + lesson_id, url: '../../team/teamDetail/teamDetail?class_id=' + class_id,
}) })
}, },
initData:function(){ initData:function(){
......
{ {
"usingComponents": {}, "usingComponents": {
"van-empty": "/components/vant/empty/index"
},
"navigationBarTitleText": "抢班" "navigationBarTitleText": "抢班"
} }
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<text class="{{activeIndex == 2 ? 'active': ''}}" catchtap="changeTab" data-index="2">我的班级</text> <text class="{{activeIndex == 2 ? 'active': ''}}" catchtap="changeTab" data-index="2">我的班级</text>
</view> </view>
<view> <view>
<view wx:if="{{datalList.length>0}}"> <block wx:if="{{datalList.length>0}}">
<view class="tabContent" wx:if="{{activeIndex == 1 }}" wx:for="{{datalList}}" wx:key="item" data-item="{{item}}"> <view class="tabContent" wx:if="{{activeIndex == 1 }}" wx:for="{{datalList}}" wx:key="item" data-item="{{item}}">
<view class="tab_item"> <view class="tab_item">
<view class="class-title">{{item.course.name}}</view> <view class="class-title">{{item.course.name}}</view>
...@@ -16,12 +16,16 @@ ...@@ -16,12 +16,16 @@
<view class="goclass" bindtap="getrobclass">我要上课</view> <view class="goclass" bindtap="getrobclass">我要上课</view>
</view> </view>
</view> </view>
</block>
<block wx:else>
<view class="empty">
<van-empty class="custom-image" image="/images/without.png" description="暂无课程" />
</view> </view>
<none wx:else></none> </block>
</view> </view>
<view> <view>
<view wx:if="{{datalList.length>0}}"> <block wx:if="{{classList.length>0}}">
<view class="tabContent1" wx:if="{{activeIndex == 2}}" wx:for="{{datalList}}" wx:key="item" data-id="{{item.id}}" catchtap="goteamDetail"> <view class="tabContent1" wx:if="{{activeIndex == 2}}" wx:for="{{classList}}" wx:key="item" data-id="{{item.id}}" catchtap="goteamDetail">
<view class="tab_item1"> <view class="tab_item1">
<view class="top"> <view class="top">
<view class="class-title">{{item.course.name}}</view> <view class="class-title">{{item.course.name}}</view>
...@@ -34,7 +38,11 @@ ...@@ -34,7 +38,11 @@
</view> </view>
</view> </view>
</view> </view>
</block>
<block wx:else>
<view class="empty">
<van-empty class="custom-image" image="/images/without.png" description="暂无课程" />
</view> </view>
<none wx:else></none> </block>
</view> </view>
</view> </view>
\ No newline at end of file
// pages/personal/personal.js const app = getApp()
import { Base } from '../../..//utils/base.js';
const base = new Base()
Page({ Page({
/** /**
...@@ -8,7 +10,7 @@ Page({ ...@@ -8,7 +10,7 @@ Page({
showUserInfo: true, //用户信息是否显示 showUserInfo: true, //用户信息是否显示
noticeCount: 9, // 家长回复小红点 noticeCount: 9, // 家长回复小红点
show:false, show:false,
emailShow: false, subjectShow: false,
subjectList:[ subjectList:[
{ {
name: '跳绳' name: '跳绳'
...@@ -51,6 +53,7 @@ Page({ ...@@ -51,6 +53,7 @@ Page({
}) })
} }
}, },
goLogin() { goLogin() {
wx.navigateTo({ // 登录 wx.navigateTo({ // 登录
url: '/pages/sign/login/login', url: '/pages/sign/login/login',
...@@ -74,7 +77,7 @@ Page({ ...@@ -74,7 +77,7 @@ Page({
//教学科目弹窗 //教学科目弹窗
tcHold: function (e) { tcHold: function (e) {
this.setData({ this.setData({
emailShow: !this.data.emailShow subjectShow: !this.data.subjectShow
}) })
}, },
chooseOne(e) { chooseOne(e) {
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</view> </view>
</view> </view>
<van-popup show="{{ emailShow }}" closeable round bind:close="tcHold"> <van-popup show="{{ subjectShow }}" closeable round bind:close="tcHold">
<view class="tc"> <view class="tc">
<view class="top"> <view class="top">
<view class="til">请选择教学科目</view> <view class="til">请选择教学科目</view>
......
...@@ -9,7 +9,10 @@ Page({ ...@@ -9,7 +9,10 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
console.log(options) this.setData({
class_id : options.class_id
})
console.log(options.class_id)
this.getclassdetail(); this.getclassdetail();
}, },
getclassdetail: function () { getclassdetail: function () {
...@@ -34,9 +37,8 @@ Page({ ...@@ -34,9 +37,8 @@ Page({
goclassDetail:function(e){ goclassDetail:function(e){
var lesson_id = e.currentTarget.dataset.id var lesson_id = e.currentTarget.dataset.id
console.log(lesson_id)
wx.navigateTo({ wx.navigateTo({
url: '../../index/classDetail/classDetail?lesson_id=' + lesson_id url: '../../index/classDetail/classDetail?lesson_id=' + lesson_id + '&class_id=' + this.data.class_id
}) })
}, },
......
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
<text class="title">已上课时</text> <text class="title">已上课时</text>
<text class="restclass">剩余<text class="number">{{courseData.left_num_count}}</text>课时</text> <text class="restclass">剩余<text class="number">{{courseData.left_num_count}}</text>课时</text>
</view> </view>
<view class="item" wx:for="{{lessonList}}" wx:key="index" data-id="{{item.id}}" > <view class="item" wx:for="{{lessonList}}" wx:key="index" data-id="{{item.id}}" wx:for-index="idx" >
<image src="/images/select_circle.png" wx:if="{{item.lesson_status == 1}}"></image> <image src="/images/select_circle.png" wx:if="{{item.lesson_status == 1}}"></image>
<image src="/images/circle.png" wx:else></image> <image src="/images/circle.png" wx:else></image>
<view class="line"></view> <view class="line" wx:if="{{idx != lessonList.length - 1}}"></view>
<view class="{{item.lesson_status == 1 ? 'lesson' : 'unlesson'}}">第{{item.class_index}}节课</view> <view class="{{item.lesson_status == 1 ? 'lesson' : 'unlesson'}}">第{{item.class_index}}节课</view>
<view class="date">日期:{{item.class_date}}</view> <view class="date">日期:{{item.class_date}}</view>
<view class="number"> <view class="number">
......
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