Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
wangxuelai
wechatapp.shangjiadao.com
Commits
4faa408b
Commit
4faa408b
authored
Aug 08, 2019
by
sujie@126.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'course_lvtz' of git.server:wangxuelai/wechatapp.shangjiadao.com into sj-dev-v6
parents
2877b80d
ea6d614c
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
83 additions
and
174 deletions
+83
-174
index.js
business/pages/circleeditor/index.js
+2
-3
index.js
business/pages/circleindex/index.js
+15
-48
index.wxml
business/pages/circleindex/index.wxml
+2
-42
index.js
business/pages/classmgt/index.js
+1
-1
index.wxml
business/pages/classmgt/index.wxml
+1
-1
classdetail.js
business/pages/classservice/classdetail.js
+3
-3
classdetail.wxml
business/pages/classservice/classdetail.wxml
+1
-1
classlist.js
business/pages/classservice/classlist.js
+1
-1
classlist.wxml
business/pages/classservice/classlist.wxml
+1
-1
index.js
src/pages/myclassrecord/index.js
+45
-62
index.wxml
src/pages/myclassrecord/index.wxml
+11
-11
No files found.
business/pages/circleeditor/index.js
View file @
4faa408b
...
...
@@ -84,8 +84,7 @@ Page({
sid
,
from
:
from
||
0
})
this
.
loadCircleData
(
id
);
this
.
oddjobschools
();
// this.oddjobschools();
wx
.
hideShareMenu
()
if
(
id
!=
0
){
this
.
loadCircleDetail
(
id
);
...
...
@@ -152,7 +151,7 @@ Page({
capacity
:
data
.
capacity
,
},
needPsd
:
needPsd
,
selectedTeachers
:
data
.
school_teacher
_classe
s
||
[],
selectedTeachers
:
data
.
school_teachers
||
[],
courseSelect
:
data
.
course
,
total
:
data
.
total
},()
=>
{
...
...
business/pages/circleindex/index.js
View file @
4faa408b
...
...
@@ -108,45 +108,7 @@ Page({
{
tabname
:
"未上"
,
scheduleType
:
1
},
{
tabname
:
"已上"
,
scheduleType
:
2
}
],
// schedulesList: [
// {
// id:1,
// date: '2018-07',
// list: [
// {
// circlename: '艺术培训1班',
// id: 11,
// date: '7月12日 12:00-16:00',
// num: 3,
// student: '李四',
// teacher: '老师吴',
// state: 1,
// calltime: '7月12日 16:00',
// },
// {
// circlename: '艺术培训2班',
// id: 11,
// date: '7月6日 12:00-16:00',
// num: 3,
// student: '张三',
// teacher: '老师刘',
// state: 2,
// calltime: '6月13日 12:00',
// },
// {
// circlename: '艺术培训2班',
// id: 11,
// date: '7月2日 12:00-16:00',
// num: 3,
// student: '老李',
// teacher: '老师刘',
// state: 4,
// calltime: '6月16日 12:00',
// }
// ]
// }
// ],
schedulesList
:[],
schedulesTotal
:
0
,
...
...
@@ -290,15 +252,15 @@ Page({
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
let
teacherArr
=
[]
if
(
res
.
data
.
school_teacher
_classe
s
){
res
.
data
.
school_teacher
_classe
s
.
forEach
(
item
=>
{
if
(
res
.
data
.
school_teachers
){
res
.
data
.
school_teachers
.
forEach
(
item
=>
{
teacherArr
.
push
(
item
.
nickname
)
})
teacherArr
=
teacherArr
.
join
(
'、'
);
}
else
{
teacherArr
=
[]
}
res
.
data
.
school_teacher
_classe
s
=
teacherArr
res
.
data
.
school_teachers
=
teacherArr
if
(
res
.
data
&&
res
.
data
.
deleted_at
)
{
wx
.
showModal
({
title
:
'提示'
,
...
...
@@ -393,9 +355,10 @@ Page({
switch
(
type
)
{
case
'init'
:
//页面进来第一次加载
this
.
setData
({
schedulesListOrigin
:
data
.
list
,
schedulesList
:
this
.
transformList
(
data
.
list
)
},
()
=>
{
if
(
this
.
data
.
schedulesTotal
>
this
.
data
.
schedulesList
.
length
)
{
if
(
this
.
data
.
schedulesTotal
>
this
.
data
.
schedulesList
Origin
.
length
)
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
...
...
@@ -409,9 +372,10 @@ Page({
break
;
case
'down'
:
// 页面下拉刷新
this
.
setData
({
schedulesListOrigin
:
data
.
list
,
schedulesList
:
this
.
transformList
(
data
.
list
)
},
()
=>
{
if
(
this
.
data
.
schedulesTotal
>
this
.
data
.
schedulesList
.
length
)
{
if
(
this
.
data
.
schedulesTotal
>
this
.
data
.
schedulesList
Origin
.
length
)
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
...
...
@@ -425,14 +389,17 @@ Page({
wx
.
stopPullDownRefresh
();
break
;
case
'up'
:
// 页面上拉刷新
let
list
=
this
.
data
.
schedulesList
;
let
_list
=
list
.
concat
(
this
.
transformList
(
data
.
list
));
// let list = this.data.schedulesList;
let
listOrigin
=
this
.
data
.
schedulesListOrigin
;
let
_list
=
this
.
transformList
(
listOrigin
.
concat
(
data
.
list
));
let
_listOrigin
=
listOrigin
.
concat
(
data
.
list
);
this
.
setData
({
schedulesListOrigin
:
_listOrigin
,
schedulesList
:
_list
// [`schedulesList[${this.data.page - 1}]`]: data.list
},
()
=>
{
console
.
log
(
1111111111111
,
this
.
data
.
schedulesList
)
if
(
this
.
data
.
schedulesTotal
>
this
.
data
.
schedulesList
.
length
)
{
if
(
this
.
data
.
schedulesTotal
>
this
.
data
.
schedulesListOrigin
.
length
)
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
...
...
business/pages/circleindex/index.wxml
View file @
4faa408b
...
...
@@ -28,7 +28,7 @@
</view>
</view>
<view class="teacher-classroom">
{{circleInfo.school_teacher
_classes.length>0?circleInfo.school_teacher_classe
s:'暂无'}}/{{circleInfo.class_room?circleInfo.class_room.title:'暂无'}}
{{circleInfo.school_teacher
s.length>0?circleInfo.school_teacher
s:'暂无'}}/{{circleInfo.class_room?circleInfo.class_room.title:'暂无'}}
</view>
</view>
<!-- <view class="operate-btn-box">
...
...
@@ -101,52 +101,12 @@
</view>
<view class="content-item">
<view class="item-label">老师</view>
<view class="item-text" wx:if="{{child.teacher}}">
<view class="item-line" wx:for="{{child.teacher}}" wx:key="">
{child.nickname}
</view>
</view>
<view class="item-text" wx:else>
暂无
</view>
<view class="item-text">{{child.school_teacher?child.school_teacher.nickname:'暂无'}}</view>
</view>
</view>
</view>
</view>
</block>
<!-- <block class="commonlist-partwrap" wx:for="{{schedulesList}}" wx:key=""> -->
<!-- <view class="commonlist-header">{{item.date}}</view> -->
<!-- <view class="commonlist-box">
<view class="commonlist-item" wx:for="{{schedulesList}}" wx:key="">
<view class="item-titlebox">
<view class="item-title">{{item.end_time}}{{item.end_time}}</view>
<view class="itme-state" data-schedule="{{item}}" catchtap="scheduleOpt" data-index="{{index}}">操作</view>
</view>
<view class="item-contentbox">
<view class="content-item">
<view class="item-label">授课:</view>
<view class="item-text">{{item.date}}课时</view>
</view>
<view class="content-item">
<view class="item-label">课次:</view>
<view class="item-text">{{item.index}}</view>
</view>
<view class="content-item">
<view class="item-label">老师</view>
<view class="item-text" wx:if="{{item.teacher}}">
<view class="item-line" wx:for="{{item.teacher}}" wx:key="">
{item.nickname}
</view>
</view>
<view class="item-text" wx:else>
暂无
</view>
</view>
</view>
</view>
</view> -->
<!-- </block> -->
</view>
<view class="empty-content" wx:else>
<image class='empty-img' src='{{imageRoot}}2b/potentialcustomer/emptyimg.png?{{imageVersion}}'></image>
...
...
business/pages/classmgt/index.js
View file @
4faa408b
...
...
@@ -110,7 +110,7 @@ Page({
}
else
{
if
(
data
.
total
)
{
data
.
list
.
forEach
(
item
=>
{
let
itemT
=
item
.
school_teacher
_classe
s
;
let
itemT
=
item
.
school_teachers
;
let
teacherArr
=
[]
if
(
itemT
){
itemT
.
forEach
((
ele
)
=>
{
...
...
business/pages/classmgt/index.wxml
View file @
4faa408b
...
...
@@ -26,7 +26,7 @@
<view class="item-contentbox">
<view class="content-item">
<view class="item-label">老师:</view>
<view class="item-text">{{item.school_teacher
_classe
s.length>0?item.teacherArr:'暂无'}}</view>
<view class="item-text">{{item.school_teachers.length>0?item.teacherArr:'暂无'}}</view>
</view>
<view class="content-item">
<view class="item-label">学员:</view>
...
...
business/pages/classservice/classdetail.js
View file @
4faa408b
...
...
@@ -291,15 +291,15 @@ Page({
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
let
teacherArr
=
[]
if
(
res
.
data
.
school_teacher
_classe
s
){
res
.
data
.
school_teacher
_classe
s
.
forEach
(
item
=>
{
if
(
res
.
data
.
school_teachers
){
res
.
data
.
school_teachers
.
forEach
(
item
=>
{
teacherArr
.
push
(
item
.
nickname
)
})
teacherArr
=
teacherArr
.
join
(
'、'
);
}
else
{
teacherArr
=
[]
}
res
.
data
.
school_teacher
_classe
s
=
teacherArr
res
.
data
.
school_teachers
=
teacherArr
if
(
res
.
data
&&
res
.
data
.
deleted_at
)
{
wx
.
showModal
({
...
...
business/pages/classservice/classdetail.wxml
View file @
4faa408b
...
...
@@ -28,7 +28,7 @@
</view>
</view>
<view class="teacher-classroom">
{{circleInfo.school_teacher
_classes?circleInfo.school_teacher_classe
s:'暂无'}}/{{circleInfo.class_room?circleInfo.class_room.title:'暂无'}}
{{circleInfo.school_teacher
s?circleInfo.school_teacher
s:'暂无'}}/{{circleInfo.class_room?circleInfo.class_room.title:'暂无'}}
</view>
</view>
<!-- <view class="operate-btn-box">
...
...
business/pages/classservice/classlist.js
View file @
4faa408b
...
...
@@ -99,7 +99,7 @@ Page({
}
else
{
if
(
data
.
total
)
{
data
.
list
.
forEach
(
item
=>
{
let
itemT
=
item
.
school_teacher
_classe
s
;
let
itemT
=
item
.
school_teachers
;
let
teacherArr
=
[]
if
(
itemT
){
itemT
.
forEach
((
ele
)
=>
{
...
...
business/pages/classservice/classlist.wxml
View file @
4faa408b
...
...
@@ -9,7 +9,7 @@
<view class="item-contentbox">
<view class="content-item">
<view class="item-label">老师:</view>
<view class="item-text">{{item.school_teacher
_classe
s.length>0?item.teacherArr:'暂无'}}</view>
<view class="item-text">{{item.school_teachers.length>0?item.teacherArr:'暂无'}}</view>
</view>
<view class="content-item">
<view class="item-label">课程:</view>
...
...
src/pages/myclassrecord/index.js
View file @
4faa408b
...
...
@@ -20,60 +20,7 @@ Page({
hasmore
:
true
,
emptyPage
:
false
,
courselist
:
[
{
id
:
1
,
date
:
'2018-07'
,
list
:
[
{
circlename
:
'艺术培训1班'
,
id
:
11
,
date
:
'7月12日 12:00-16:00'
,
num
:
3
,
student
:
'李四'
,
teacher
:
'老师吴'
,
state
:
1
,
calltime
:
'7月12日 16:00'
,
},
{
circlename
:
'艺术培训2班'
,
id
:
11
,
date
:
'7月6日 12:00-16:00'
,
num
:
3
,
student
:
'张三'
,
teacher
:
'老师刘'
,
state
:
2
,
calltime
:
'6月13日 12:00'
,
},
{
circlename
:
'艺术培训2班'
,
id
:
11
,
date
:
'7月2日 12:00-16:00'
,
num
:
3
,
student
:
'老李'
,
teacher
:
'老师刘'
,
state
:
4
,
calltime
:
'6月16日 12:00'
,
}
]
},
{
id
:
1
,
date
:
'2018-06'
,
list
:
[
{
circlename
:
'艺术培训3班'
,
id
:
11
,
date
:
'6月12日 12:00-16:00'
,
num
:
3
,
student
:
'学员发'
,
teacher
:
'老师孙'
,
state
:
3
,
calltime
:
'6月13日 11:00'
,
}
]
}
]
courselist
:
[]
},
/**
...
...
@@ -153,9 +100,10 @@ Page({
switch
(
type
)
{
case
'init'
:
//页面进来第一次加载
this
.
setData
({
courseList
:
[
data
.
list
]
courseListOrigin
:
data
.
list
,
courseList
:
this
.
transformList
(
data
.
list
)
},
()
=>
{
if
(
data
.
total
>
this
.
caculateArrLength
(
this
.
data
.
courseList
)
)
{
if
(
data
.
total
>
this
.
data
.
courseListOrigin
.
length
)
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
...
...
@@ -169,9 +117,10 @@ Page({
break
;
case
'down'
:
// 页面下拉刷新
this
.
setData
({
courseList
:
[
data
.
list
]
courseListOrigin
:
data
.
list
,
courseList
:
this
.
transformList
(
data
.
list
)
},
()
=>
{
if
(
data
.
total
>
this
.
caculateArrLength
(
this
.
data
.
courseList
)
)
{
if
(
data
.
total
>
this
.
data
.
courseListOrigin
.
length
)
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
...
...
@@ -185,10 +134,14 @@ Page({
wx
.
stopPullDownRefresh
();
break
;
case
'up'
:
// 页面上拉刷新
let
listOrigin
=
this
.
data
.
courseList
;
let
_list
=
this
.
transformList
(
listOrigin
.
concat
(
data
.
list
));
let
_listOrigin
=
listOrigin
.
concat
(
data
.
list
);
this
.
setData
({
[
`courseList[
${
this
.
data
.
page
-
1
}
]`
]:
data
.
list
courseListOrigin
:
_listOrigin
,
courseList
:
_list
},
()
=>
{
if
(
this
.
data
.
classTatol
>
this
.
caculateArrLength
(
this
.
data
.
courseList
)
)
{
if
(
this
.
data
.
classTatol
>
this
.
data
.
courseListOrigin
.
length
)
{
let
page
=
this
.
data
.
page
+
1
;
this
.
setData
({
page
,
...
...
@@ -203,7 +156,7 @@ Page({
default
:
break
;
}
if
(
this
.
caculateArrLength
(
this
.
data
.
courseList
)
==
0
)
{
if
(
this
.
data
.
courseListOrigin
.
length
==
0
)
{
this
.
setData
({
emptyPage
:
true
})
...
...
@@ -213,7 +166,6 @@ Page({
emptyPage
:
false
,
})
}
console
.
log
(
this
.
data
.
emptyPage
)
}
}).
catch
((
e
)
=>
{
this
.
setData
({
...
...
@@ -228,4 +180,35 @@ Page({
})
return
_length
;
},
transformList
(
list
){
var
list_middle
=
[];
for
(
var
i
in
list
)
{
var
d
=
list
[
i
];
var
date
=
d
.
schedule
.
call_time
.
slice
(
0
,
7
);
if
(
list_middle
.
hasOwnProperty
(
date
))
{
list_middle
[
date
].
push
(
d
);
}
else
{
list_middle
[
date
]
=
[
d
]
}
}
var
list_after
=
[];
for
(
var
i
in
list_middle
)
{
var
d
=
list_middle
[
i
];
if
(
d
.
length
>
0
)
{
// for(var i in d){
// var m = d[i].start_time.slice(4,10).split('-');
// var startT = d[i].start_time.slice(11,16);
// var endT = d[i].end_time.slice(11,16);
// var newMonth = m[1]+'月'+m[2]+'日';
// }
list_after
.
push
({
month
:
i
,
statics
:
d
});
}
}
return
list_after
},
})
\ No newline at end of file
src/pages/myclassrecord/index.wxml
View file @
4faa408b
<wxs src="./../../../filter/index.wxs" module="filter" />
<view class="container">
<view class="commonlist-bigwrap" wx:if="{{course
l
ist}}">
<block class="commonlist-partwrap" wx:for="{{course
l
ist}}" wx:key="">
<view class="commonlist-header">{{item.
date
}}</view>
<view class="commonlist-bigwrap" wx:if="{{course
L
ist}}">
<block class="commonlist-partwrap" wx:for="{{course
L
ist}}" wx:key="">
<view class="commonlist-header">{{item.
month
}}</view>
<view class="commonlist-box">
<view class="commonlist-item" wx:for="{{item.
list
}}" wx:key="" wx:for-item="child">
<view class="commonlist-item" wx:for="{{item.
statics
}}" wx:key="" wx:for-item="child">
<view class="item-titlebox">
<view class="item-title">{{child.c
irclenam
e}}</view>
<view class="itme-state state-{{child.
state}}">{{filter.courseFilter(child.stat
e)}}</view>
<view class="item-title">{{child.c
lass.titl
e}}</view>
<view class="itme-state state-{{child.
type}}">{{filter.courseFilter(child.typ
e)}}</view>
</view>
<view class="item-contentbox">
<view class="content-item">
<view class="item-label">授课时间:</view>
<view class="item-text">{{
child.date
}}</view>
<view class="item-text">{{
filter.matchTime(child.schedule.start_time,'month')}} {{filter.matchTime(child.schedule.start_time,'hour')}}-{{filter.matchTime(child.schedule.end_time,'hour')
}}</view>
</view>
<view class="content-item">
<view class="item-label">授课:</view>
<view class="item-text">{{child.
num
}}课时</view>
<view class="item-text">{{child.
expend
}}课时</view>
</view>
<view class="content-item">
<
!-- <
view class="content-item">
<view class="item-label">学员:</view>
<view class="item-text">{{child.student}}</view>
</view>
</view>
-->
<view class="content-item">
<view class="item-label">老师:</view>
<view class="item-text">{{child.
teacher}} {{child.call
time}}点名</view>
<view class="item-text">{{child.
school_teacher?school_teacher.nickname:'暂无'}} {{child.schedule.call_
time}}点名</view>
</view>
</view>
</view>
...
...
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