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
e9f58828
Commit
e9f58828
authored
Dec 13, 2019
by
lvtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
f2fda00a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
22 deletions
+97
-22
classreviewindex.js
business/pages/classservice/classreviewindex.js
+92
-17
classreviewindex.wxml
business/pages/classservice/classreviewindex.wxml
+1
-1
constants.js
constants/constants.js
+4
-4
No files found.
business/pages/classservice/classreviewindex.js
View file @
e9f58828
...
...
@@ -46,6 +46,11 @@ Page({
page
:
1
,
perPage
:
10
,
classList
:
[],
circleTotal
:
0
,
circlelistLoading
:
false
,
circlehasmore
:
true
,
circlePage
:
1
,
circlePerpage
:
10
,
sid
:
0
,
id
:
0
,
selectStudentShow
:
false
,
// 选择学生点评
...
...
@@ -117,9 +122,7 @@ Page({
my
:
my
||
0
,
id
,
});
this
.
getClassList
();
this
.
getClassList
(
'init'
);
},
/**
...
...
@@ -186,10 +189,20 @@ Page({
onShareAppMessage
:
function
()
{
},
getClassList
()
{
getClassList
(
type
)
{
console
.
log
(
type
,
this
.
data
.
circlehasmore
,
this
.
data
.
circlelistLoading
)
if
(
!
this
.
data
.
circlehasmore
)
{
return
;
}
if
(
this
.
data
.
circlelistLoading
)
{
return
}
this
.
setData
({
circlelistLoading
:
true
})
erpClassListGet
({
page
:
this
.
data
.
p
age
,
perPage
:
999
,
page
:
this
.
data
.
circleP
age
,
perPage
:
10
,
school_id
:
this
.
data
.
sid
,
my
:
this
.
data
.
my
}).
then
((
res
)
=>
{
...
...
@@ -197,19 +210,75 @@ Page({
code
,
data
}
=
res
;
wx
.
hideLoading
();
this
.
setData
({
circlelistLoading
:
false
})
if
(
code
!=
200
)
{
// 失败的处理
}
else
{
data
.
list
=
data
.
list
.
map
((
itme
)
=>
{
return
{
id
:
itme
.
id
,
title
:
itme
.
title
}
})
this
.
setData
({
classList
:
data
.
list
,
selectClass
:
this
.
data
.
id
?
data
.
list
.
find
(
ele
=>
ele
.
id
==
this
.
data
.
id
)
:
data
.
list
[
0
]
})
this
.
getGalleryList
(
'init'
);
if
(
data
.
total
==
0
)
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'您还没有班级,请先创建班级'
,
showCancel
:
false
,
confirmColor
:
'#65B8F4'
,
success
:
function
(){
wx
.
navigateTo
({
url
:
`/business/pages/circleeditor/index?sid=
${
that
.
data
.
sid
}
&id=0`
})
}
})
return
;
}
if
(
data
.
total
)
{
this
.
data
.
circleTotal
=
data
.
total
;
}
switch
(
type
){
case
'init'
:
data
.
list
=
data
.
list
.
map
((
itme
)
=>
{
return
{
id
:
itme
.
id
,
title
:
itme
.
title
}
})
this
.
setData
({
classList
:
data
.
list
,
selectClass
:
this
.
data
.
id
?
data
.
list
.
find
(
ele
=>
ele
.
id
==
this
.
data
.
id
)
:
data
.
list
[
0
]
})
this
.
getGalleryList
(
'init'
);
if
(
data
.
total
>
this
.
data
.
classList
.
length
)
{
this
.
data
.
circlePage
=
this
.
data
.
circlePage
+
1
;
}
else
{
// 没有更多了
this
.
setData
({
circlehasmore
:
false
})
}
break
;
case
'up'
:
// 页面上拉刷新
let
list
=
this
.
data
.
classList
;
let
_listGet
=
data
.
list
.
map
(
item
=>
{
return
{
id
:
item
.
id
,
title
:
item
.
title
}
});
let
_list
=
list
.
concat
(
_listGet
);
this
.
setData
({
classList
:
_list
})
if
(
data
.
total
>
this
.
data
.
classList
.
length
)
{
this
.
data
.
circlePage
=
this
.
data
.
circlePage
+
1
;
}
else
{
// 没有更多了
this
.
setData
({
circlehasmore
:
false
})
}
break
;
default
:
break
;
}
}
}).
catch
((
e
)
=>
{
this
.
setData
({
...
...
@@ -1064,4 +1133,10 @@ Page({
[
`galleryList[
${
bigindex
}
][
${
index
}
]`
]:
clock
,
})
},
scrolltolowerClass
(
e
)
{
console
.
log
(
this
.
data
.
circlehasmore
)
if
(
this
.
data
.
circlehasmore
)
{
this
.
getClassList
(
'up'
)
}
},
})
\ No newline at end of file
business/pages/classservice/classreviewindex.wxml
View file @
e9f58828
...
...
@@ -91,7 +91,7 @@
</view>
<view class="select-student-dailog" wx:if="{{selectClassShow}}" bindtap="hideSelectClass" data-flag="{{1}}">
<view class="dailog-content dailog-class-content">
<scroll-view class="student-list class-list" scroll-y="true">
<scroll-view class="student-list class-list" scroll-y="true"
lower-threhold="200" bindscrolltolower="scrolltolowerClass"
>
<view class="class-item {{selectClass.id == item.id ? 'act-class' : ''}}" wx:for="{{classList}}" wx:key="index" data-item="{{item}}" bindtap="selectClassHandle">{{item.title}}</view>
</scroll-view>
<view class="line-16"></view>
...
...
constants/constants.js
View file @
e9f58828
export
default
{
imageRoot
:
'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/'
,
//
host: 'https://qxapi.qingxiao.online/daka',
//
host2: 'https://wx.m.shangjiadao.cn',
host
:
'https://qxapi.qingxiao.online/daka'
,
host2
:
'https://wx.m.shangjiadao.cn'
,
storageVersion
:
'4.0'
,
imageVersion
:
'20191104'
,
host
:
'https://clock.wp53.cn'
,
host2
:
'https://test.wp53.cn'
,
//
host: 'https://clock.wp53.cn',
//
host2: 'https://test.wp53.cn',
appId
:
'wxc1246ea029394785'
,
miniProgram
:
{
clock
:
'wxdeee20e52a1fd7ee'
...
...
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