Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wandouchengzhang_coach
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
石盼盼
wandouchengzhang_coach
Commits
691e5ac2
Commit
691e5ac2
authored
Nov 20, 2020
by
石盼盼
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'shipanpan' into 'master'
改coach_id,点击课程完结接口对接 See merge request
!29
parents
415adb62
0aaa07d7
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
59 additions
and
60 deletions
+59
-60
badgelist.js
pages/index/badgelist/badgelist.js
+24
-10
classManagement.js
pages/index/classManagement/classManagement.js
+15
-1
classManagement.wxml
pages/index/classManagement/classManagement.wxml
+1
-1
courseInstant.js
pages/index/courseInstant/courseInstant.js
+2
-1
evaluation.js
pages/index/evaluation/evaluation.js
+6
-6
performance.wxml
pages/index/performance/performance.wxml
+3
-3
parents.js
pages/my/parents/parents.js
+2
-1
teachingArea.js
pages/my/teachingArea/teachingArea.js
+2
-1
personal.js
pages/tabbar/personal/personal.js
+2
-23
teamDetail.js
pages/team/teamDetail/teamDetail.js
+2
-13
No files found.
pages/index/badgelist/badgelist.js
View file @
691e5ac2
...
@@ -6,13 +6,13 @@ Page({
...
@@ -6,13 +6,13 @@ Page({
list
:
[],
list
:
[],
status
:
false
,
status
:
false
,
num
:
0
,
num
:
0
,
arr
:[],
arr
:
[],
badge_ids
:[]
badge_ids
:
[]
},
},
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
var
arr1
=
JSON
.
parse
(
options
.
listData
)
var
arr1
=
JSON
.
parse
(
options
.
listData
)
this
.
setData
({
this
.
setData
({
arr
:
arr1
arr
:
arr1
})
})
this
.
getList
()
this
.
getList
()
},
},
...
@@ -25,13 +25,13 @@ Page({
...
@@ -25,13 +25,13 @@ Page({
callback
:
(
data
)
=>
{
callback
:
(
data
)
=>
{
wx
.
hideLoading
()
wx
.
hideLoading
()
data
.
map
((
item
,
index
)
=>
{
data
.
map
((
item
,
index
)
=>
{
Object
.
assign
(
item
,
{
status
:
false
})
Object
.
assign
(
item
,
{
status
:
false
})
});
});
this
.
setData
({
this
.
setData
({
list
:
data
list
:
data
})
})
for
(
var
i
=
0
;
i
<
this
.
data
.
list
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
data
.
list
.
length
;
i
++
)
{
for
(
var
j
=
0
;
j
<
this
.
data
.
arr
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
this
.
data
.
arr
.
length
;
j
++
)
{
if
(
this
.
data
.
arr
[
j
].
id
==
this
.
data
.
list
[
i
].
id
)
{
if
(
this
.
data
.
arr
[
j
].
id
==
this
.
data
.
list
[
i
].
id
)
{
this
.
data
.
list
[
i
].
status
=
this
.
data
.
arr
[
j
].
status
this
.
data
.
list
[
i
].
status
=
this
.
data
.
arr
[
j
].
status
}
}
...
@@ -56,7 +56,7 @@ Page({
...
@@ -56,7 +56,7 @@ Page({
var
arr
=
[];
var
arr
=
[];
var
badge_ids
=
[];
var
badge_ids
=
[];
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
list
[
i
].
status
==
true
)
{
if
(
list
[
i
].
status
==
true
)
{
arr
.
push
(
list
[
i
])
arr
.
push
(
list
[
i
])
badge_ids
.
push
(
list
[
i
].
id
)
badge_ids
.
push
(
list
[
i
].
id
)
}
}
...
@@ -66,14 +66,28 @@ Page({
...
@@ -66,14 +66,28 @@ Page({
arr
:
arr
,
arr
:
arr
,
badge_ids
:
badge_ids
badge_ids
:
badge_ids
})
})
console
.
log
(
badge_ids
)
var
s
=
badge_ids
.
toString
()
console
.
log
(
s
)
},
},
save
:
function
(
e
)
{
save
:
function
(
e
)
{
var
pages
=
getCurrentPages
();
var
pages
=
getCurrentPages
();
var
prevPage
=
pages
[
pages
.
length
-
2
];
//上一个页面
var
prevPage
=
pages
[
pages
.
length
-
2
];
//上一个页面
if
(
this
.
data
.
arr
.
length
==
0
)
{
// if (this.data.arr.length == 0) {
base
.
toast
(
'
请至少选择一个徽章
'
)
// base.toast('请至少选择一个徽章')
}
else
if
(
this
.
data
.
arr
.
length
>
3
)
{
// } 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
(
'
最多选择三个徽章
'
)
base
.
toast
(
'
最多选择三个徽章
'
)
}
else
{
}
else
{
prevPage
.
setData
({
prevPage
.
setData
({
...
...
pages/index/classManagement/classManagement.js
View file @
691e5ac2
...
@@ -11,7 +11,8 @@ Page({
...
@@ -11,7 +11,8 @@ Page({
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
coach_id
:
'
5
'
,
// coach_id: '5',
coach_id
:
''
,
class_id
:
''
,
class_id
:
''
,
lesson_id
:
''
,
lesson_id
:
''
,
classTime
:
''
,
// 上课时间
classTime
:
''
,
// 上课时间
...
@@ -30,6 +31,7 @@ Page({
...
@@ -30,6 +31,7 @@ Page({
this
.
getDate
()
this
.
getDate
()
this
.
setData
({
this
.
setData
({
// coach_id: '5',
// coach_id: '5',
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
,
...
@@ -117,6 +119,18 @@ Page({
...
@@ -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
,
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
()
{
onPullDownRefresh
()
{
this
.
setData
({
this
.
setData
({
list
:
[],
list
:
[],
...
...
pages/index/classManagement/classManagement.wxml
View file @
691e5ac2
...
@@ -37,5 +37,5 @@
...
@@ -37,5 +37,5 @@
</view>
</view>
<view class="button">
<view class="button">
<view class="course">课程完结</view>
<view class="course"
bindtap="courseEnd"
>课程完结</view>
</view>
</view>
\ No newline at end of file
pages/index/courseInstant/courseInstant.js
View file @
691e5ac2
...
@@ -165,7 +165,8 @@ Page({
...
@@ -165,7 +165,8 @@ Page({
url
:
'
coach/moment
'
,
url
:
'
coach/moment
'
,
type
:
'
POST
'
,
type
:
'
POST
'
,
data
:
{
data
:
{
coach_id
:
'
5
'
,
// coach_id: '5',
coach_id
:
app
.
globalData
.
coach_id
,
lesson_id
:
this
.
data
.
lesson_id
,
lesson_id
:
this
.
data
.
lesson_id
,
class_moment
:
JSON
.
stringify
(
arr
)
class_moment
:
JSON
.
stringify
(
arr
)
},
},
...
...
pages/index/evaluation/evaluation.js
View file @
691e5ac2
...
@@ -91,7 +91,6 @@ Page({
...
@@ -91,7 +91,6 @@ Page({
// 保存
// 保存
save
:
function
()
{
save
:
function
()
{
this
.
data
.
scoreArr
.
map
((
e
)
=>
{
this
.
data
.
scoreArr
.
map
((
e
)
=>
{
obj
[
e
.
id
]
=
e
.
score
;
if
(
e
.
score
==
0
){
if
(
e
.
score
==
0
){
base
.
toast
(
'
运动表现分值不能为0
'
)
base
.
toast
(
'
运动表现分值不能为0
'
)
return
return
...
@@ -105,22 +104,23 @@ Page({
...
@@ -105,22 +104,23 @@ Page({
this
.
data
.
scoreArr
.
map
((
e
)
=>
{
this
.
data
.
scoreArr
.
map
((
e
)
=>
{
obj
[
e
.
id
]
=
e
.
score
;
obj
[
e
.
id
]
=
e
.
score
;
});
});
//如果其中存在某一条评分未评则不能保存成功 必须全部评分完毕
let
params
=
{
let
params
=
{
url
:
'
badges/add
'
,
url
:
'
badges/add
'
,
data
:
{
data
:
{
user_child_id
:
this
.
data
.
child_id
,
user_child_id
:
this
.
data
.
child_id
,
badge_id
:
1
,
//this.data.badge_ids
,
badge_id
s
:
this
.
data
.
badge_ids
.
toString
()
,
class_id
:
this
.
data
.
class_id
,
class_id
:
this
.
data
.
class_id
,
class_single_id
:
this
.
data
.
class_single_id
,
class_single_id
:
this
.
data
.
class_single_id
,
coach_id
:
5
,
// coach_id : 5,
coach_id
:
app
.
globalData
.
coach_id
,
},
},
type
:
'
POST
'
,
type
:
'
POST
'
,
callback
:
(
data
)
=>
{
callback
:
(
data
)
=>
{
let
params
=
{
let
params
=
{
url
:
'
coach/comment_save
'
,
url
:
'
coach/comment_save
'
,
data
:
{
data
:
{
coach_id
:
5
,
// coach_id : 5,
coach_id
:
app
.
globalData
.
coach_id
,
lesson_id
:
this
.
data
.
class_single_id
,
lesson_id
:
this
.
data
.
class_single_id
,
child_id
:
this
.
data
.
child_id
,
child_id
:
this
.
data
.
child_id
,
comment_score
:
JSON
.
stringify
(
obj
),
comment_score
:
JSON
.
stringify
(
obj
),
...
@@ -128,7 +128,7 @@ Page({
...
@@ -128,7 +128,7 @@ Page({
},
},
type
:
'
POST
'
,
type
:
'
POST
'
,
callback
:
(
data
)
=>
{
callback
:
(
data
)
=>
{
//
base.toast('保存成功')
base
.
toast
(
'
保存成功
'
)
}
}
}
}
base
.
newRequest
(
params
)
base
.
newRequest
(
params
)
...
...
pages/index/performance/performance.wxml
View file @
691e5ac2
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
<view class="one">
<view class="one">
<view class="title">教练评语</view>
<view class="title">教练评语</view>
<view class="teacher">
<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">
<view class="teacher_left flex-v flex-hc">
<image src="/images/default_head.png" wx:if="{{coach.
coach.
thumb == null}}"></image>
<image src="/images/default_head.png" wx:if="{{coach.thumb == null}}"></image>
<image src="{{coach.
coach.
thumb}}" wx:else></image>
<image src="{{coach.thumb}}" wx:else></image>
<text class="name">{{coach.title}}</text>
<text class="name">{{coach.title}}</text>
</view>
</view>
<view class="teacher_right">{{coachcomment.class_comment}}</view>
<view class="teacher_right">{{coachcomment.class_comment}}</view>
...
...
pages/my/parents/parents.js
View file @
691e5ac2
...
@@ -24,7 +24,8 @@ Page({
...
@@ -24,7 +24,8 @@ Page({
let
params
=
{
let
params
=
{
url
:
'
coach/reply
'
,
url
:
'
coach/reply
'
,
data
:
{
data
:
{
coach_id
:
4
// coach_id : 4,
coach_id
:
app
.
globalData
.
coach_id
},
},
callback
:
(
data
)
=>
{
callback
:
(
data
)
=>
{
wx
.
hideLoading
()
wx
.
hideLoading
()
...
...
pages/my/teachingArea/teachingArea.js
View file @
691e5ac2
...
@@ -153,7 +153,8 @@ Page({
...
@@ -153,7 +153,8 @@ Page({
let
params
=
{
let
params
=
{
url
:
'
coach/save_area
'
,
url
:
'
coach/save_area
'
,
data
:
{
data
:
{
coach_id
:
5
,
// coach_id : 5,
coach_id
:
app
.
globalData
.
coach_id
,
city_id
,
city_id
,
first_area
,
first_area
,
second_area
,
second_area
,
...
...
pages/tabbar/personal/personal.js
View file @
691e5ac2
...
@@ -14,28 +14,6 @@ Page({
...
@@ -14,28 +14,6 @@ Page({
show
:
false
,
show
:
false
,
subjectShow
:
false
,
subjectShow
:
false
,
subjectList
:[],
subjectList
:[],
// subjectList:[
// {
// name: '跳绳'
// },
// {
// name: '篮球'
// },
// {
// name: '足球'
// },
// {
// name: '轮滑'
// },
// {
// name: '平衡车'
// },
// {
// name: '跆拳道'
// },
// ]
},
},
...
@@ -125,7 +103,8 @@ Page({
...
@@ -125,7 +103,8 @@ Page({
let
params
=
{
let
params
=
{
url
:
'
coach/save_course
'
,
url
:
'
coach/save_course
'
,
data
:
{
data
:
{
coach_id
:
4
,
// coach_id : 4,
coach_id
:
app
.
globalData
.
coach_id
,
course_ids
:
JSON
.
stringify
(
newArr
)
course_ids
:
JSON
.
stringify
(
newArr
)
},
},
type
:
'
POST
'
,
type
:
'
POST
'
,
...
...
pages/team/teamDetail/teamDetail.js
View file @
691e5ac2
...
@@ -20,7 +20,8 @@ Page({
...
@@ -20,7 +20,8 @@ Page({
let
params
=
{
let
params
=
{
url
:
'
coach/classdetail
'
,
url
:
'
coach/classdetail
'
,
data
:
{
data
:
{
coach_id
:
5
,
// coach_id : 5,
coach_id
:
app
.
globalData
.
coach_id
,
class_id
:
this
.
data
.
class_id
class_id
:
this
.
data
.
class_id
},
},
callback
:
(
data
)
=>
{
callback
:
(
data
)
=>
{
...
@@ -41,16 +42,4 @@ Page({
...
@@ -41,16 +42,4 @@ Page({
url
:
'
../../index/classDetail/classDetail?lesson_id=
'
+
lesson_id
+
'
&class_id=
'
+
this
.
data
.
class_id
url
:
'
../../index/classDetail/classDetail?lesson_id=
'
+
lesson_id
+
'
&class_id=
'
+
this
.
data
.
class_id
})
})
},
},
onShow
:
function
()
{
},
onPullDownRefresh
:
function
()
{
},
})
})
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment