Commit 1353d170 authored by 吴颖's avatar 吴颖

'修改页面样式'

parents 6a512a9f 549de51d
......@@ -6,13 +6,13 @@ Page({
list: [],
status: false,
num: 0,
arr:[],
badge_ids:[]
arr: [],
badge_ids: []
},
onLoad: function (options) {
var arr1 = JSON.parse(options.listData)
this.setData({
arr : arr1
arr: arr1
})
this.getList()
},
......@@ -25,13 +25,13 @@ Page({
callback: (data) => {
wx.hideLoading()
data.map((item, index) => {
Object.assign(item, { status: false })
Object.assign(item, { status: false })
});
this.setData({
list: data
})
for(var i =0; i< this.data.list.length;i++){
for(var j =0; j< this.data.arr.length;j++) {
for (var i = 0; i < this.data.list.length; i++) {
for (var j = 0; j < this.data.arr.length; j++) {
if (this.data.arr[j].id == this.data.list[i].id) {
this.data.list[i].status = this.data.arr[j].status
}
......@@ -56,7 +56,7 @@ Page({
var arr = [];
var badge_ids = [];
for (var i = 0; i < list.length; i++) {
if(list[i].status==true){
if (list[i].status == true) {
arr.push(list[i])
badge_ids.push(list[i].id)
}
......@@ -66,14 +66,28 @@ Page({
arr: arr,
badge_ids: badge_ids
})
console.log(badge_ids)
var s = badge_ids.toString()
console.log(s)
},
save: function (e) {
var pages = getCurrentPages();
var prevPage = pages[pages.length - 2]; //上一个页面
if (this.data.arr.length == 0) {
base.toast('请至少选择一个徽章')
} else if (this.data.arr.length > 3) {
// if (this.data.arr.length == 0) {
// base.toast('请至少选择一个徽章')
// } else if (this.data.arr.length > 3) {
// base.toast('最多选择三个徽章')
// } else {
// prevPage.setData({
// arr: this.data.arr,
// badge_ids: this.data.badge_ids
// })
// wx.navigateBack({
// delta: 1
// })
// }
if (this.data.arr.length > 3) {
base.toast('最多选择三个徽章')
} else {
prevPage.setData({
......
......@@ -11,7 +11,8 @@ Page({
* 页面的初始数据
*/
data: {
coach_id: '5',
// coach_id: '5',
coach_id: '',
class_id: '',
lesson_id: '',
classTime: '', // 上课时间
......@@ -30,6 +31,7 @@ Page({
this.getDate()
this.setData({
// coach_id: '5',
coach_id : app.globalData.coach_id,
class_id: options.class_id,
lesson_id: options.lesson_id,
courseTime: options.classTime,
......@@ -117,6 +119,18 @@ Page({
url: '/pages/index/evaluation/evaluation?child_id=' + child_id + '&class_id=' + class_id + '&class_single_id=' + class_single_id + '&course_id=' + course_id,
})
},
courseEnd : function (){
let params = {
url : 'coach/end_lesson',
data : {
coach_id : app.globalData.coach_id,
lesson_id : this.data.lesson_id
},
callback : (data) => {
}
}
base.newRequest(params)
},
onPullDownRefresh() {
this.setData({
list: [],
......
......@@ -37,5 +37,5 @@
</view>
<view class="button">
<view class="course">课程完结</view>
<view class="course" bindtap="courseEnd">课程完结</view>
</view>
\ No newline at end of file
......@@ -165,7 +165,8 @@ Page({
url: 'coach/moment',
type: 'POST',
data: {
coach_id: '5',
// coach_id: '5',
coach_id : app.globalData.coach_id,
lesson_id: this.data.lesson_id,
class_moment: JSON.stringify(arr)
},
......
......@@ -91,7 +91,6 @@ Page({
// 保存
save: function () {
this.data.scoreArr.map((e) => {
obj[e.id] = e.score;
if(e.score == 0){
base.toast('运动表现分值不能为0')
return
......@@ -105,22 +104,23 @@ Page({
this.data.scoreArr.map((e) => {
obj[e.id] = e.score;
});
//如果其中存在某一条评分未评则不能保存成功 必须全部评分完毕
let params = {
url: 'badges/add',
data: {
user_child_id: this.data.child_id,
badge_id: 1,//this.data.badge_ids,
badge_ids: this.data.badge_ids.toString(),
class_id: this.data.class_id,
class_single_id: this.data.class_single_id,
coach_id: 5,
// coach_id : 5,
coach_id: app.globalData.coach_id,
},
type: 'POST',
callback: (data) => {
let params = {
url: 'coach/comment_save',
data: {
coach_id: 5,
// coach_id : 5,
coach_id: app.globalData.coach_id,
lesson_id: this.data.class_single_id,
child_id: this.data.child_id,
comment_score: JSON.stringify(obj),
......@@ -128,7 +128,7 @@ Page({
},
type: 'POST',
callback: (data) => {
// base.toast('保存成功')
base.toast('保存成功')
}
}
base.newRequest(params)
......
......@@ -7,10 +7,10 @@
<view class="one">
<view class="title">教练评语</view>
<view class="teacher">
<view class="flex-h flex-vc flex-hb">
<view class="flex-h flex-vc">
<view class="teacher_left flex-v flex-hc">
<image src="/images/default_head.png" wx:if="{{coach.coach.thumb == null}}"></image>
<image src="{{coach.coach.thumb}}" wx:else></image>
<image src="/images/default_head.png" wx:if="{{coach.thumb == null}}"></image>
<image src="{{coach.thumb}}" wx:else></image>
<text class="name">{{coach.title}}</text>
</view>
<view class="teacher_right">{{coachcomment.class_comment}}</view>
......
......@@ -24,7 +24,8 @@ Page({
let params = {
url: 'coach/reply',
data: {
coach_id: 4
// coach_id : 4,
coach_id: app.globalData.coach_id
},
callback: (data) => {
wx.hideLoading()
......
......@@ -153,7 +153,8 @@ Page({
let params = {
url : 'coach/save_area',
data : {
coach_id: 5,
// coach_id : 5,
coach_id: app.globalData.coach_id,
city_id,
first_area,
second_area,
......
......@@ -4,6 +4,7 @@ Page({
* 页面的初始数据
*/
data: {
success : true,
type: '1',
curImage: 'https://wdty.xueyoubangedu.com/wandou/pic_02.png'
},
......
{
"usingComponents": {},
"navigationBarTitleText": "申请成功"
"navigationBarTitleText": "豌豆教练"
}
\ No newline at end of file
<view class="box">
<!-- <view class="box">
<view class="icon">
<image src="/images/pic_01.png"></image>
</view>
......@@ -11,4 +11,17 @@
<view class="save" catchtap="prevImage">长按保存相册</view>
<view class="wx">微信号: bu15333212792<text class="copy" bindtap="copy">复制</text></view>
</view>
</view>
</view> -->
<view>
<view class="one" wx:if="{{ success }}">
<image src="/images/loading.png"></image>
<view>您的申请正在审核中</view>
</view>
<view class="two" wx:else>
<image src="/images/fail.png"></image>
<view class="fail">抱歉,您的申请未通过</view>
<view class="button">
<view class="apply" bindtap="save">重新申请</view>
</view>
</view>
</view>
\ No newline at end of file
......@@ -55,4 +55,53 @@
font-size: 24rpx;
margin-left: 18rpx;
text-decoration: underline;
}
.one{
width: 300rpx;
height: 380rpx;
margin: 236rpx auto;
text-align: center;
}
.one image{
width: 300rpx;
height: 300rpx;
}
.one view{
color: #1A1A1A;
font-size: 28rpx;
text-align: center;
}
.two{
width: 500rpx;
height: 500rpx;
margin: 263rpx auto;
text-align: center;
}
.two image{
width: 300rpx;
height: 300rpx;
}
.two .fail{
color: #1A1A1A;
font-size: 28rpx;
text-align: center;
}
.two .button{
width: 500rpx;
height: 80rpx;
background: #FFFFFF;
margin-top: 89rpx;
}
.two .button .apply{
width: 500rpx;
height: 80rpx;
border:none;
background: linear-gradient(-70deg, #FFC600 0%, #FFD400 100%);
border-radius: 40rpx;
color: #000000;
font-size: 30rpx;
text-align: center;
line-height: 80rpx;
}
\ No newline at end of file
......@@ -20,7 +20,8 @@ Page({
let params = {
url : 'coach/classdetail',
data : {
coach_id : 5,
// coach_id : 5,
coach_id : app.globalData.coach_id,
class_id : this.data.class_id
},
callback : (data) => {
......@@ -41,16 +42,4 @@ Page({
url: '../../index/classDetail/classDetail?lesson_id=' + lesson_id + '&class_id=' + this.data.class_id
})
},
onShow: function () {
},
onPullDownRefresh: function () {
},
})
\ No newline at end of file
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