Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
郭成尧
7 years ago
Commit
3585212c9e95c3dff3f2bb652459bf54ec139f0e
1 parent
dd889c9e
throttling
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
20 deletions
public/js/activity/grade/detail.js
public/js/activity/grade/detail.js
View file @
3585212
...
...
@@ -54,6 +54,9 @@ class GradeDetailPage extends Page {
this
.
noListData
=
false
;
this
.
graphData
=
{};
this
.
timer
=
null
;
this
.
cacheMouthDetailResult
=
[];
this
.
graphRender
();
this
.
monthDetailRender
(
true
);
...
...
@@ -81,30 +84,36 @@ class GradeDetailPage extends Page {
* 滑动事件处理
*/
dataZoomEvent
()
{
let
optionData
=
this
.
eGradeGraph
.
getOption
();
let
endIndex
=
optionData
.
dataZoom
[
0
].
endValue
;
if
(
this
.
timer
)
{
clearTimeout
(
this
.
timer
);
}
let
tapData
=
this
.
graphData
.
seriesData
[
endIndex
];
this
.
timer
=
setTimeout
(()
=>
{
let
optionData
=
this
.
eGradeGraph
.
getOption
();
let
endIndex
=
optionData
.
dataZoom
[
0
].
endValue
;
this
.
year
=
tapData
.
year
;
this
.
month
=
tapData
.
month
;
this
.
page
=
0
;
let
tapData
=
this
.
graphData
.
seriesData
[
endIndex
];
this
.
refreshEchart
(
endIndex
);
this
.
monthDetailRender
(
true
);
this
.
year
=
tapData
.
year
;
this
.
month
=
tapData
.
month
;
this
.
page
=
0
;
if
(
window
.
_yas
&&
window
.
_yas
.
sendCustomInfo
)
{
// 埋点
let
C_ID
=
window
.
_ChannelVary
[
window
.
cookie
(
'_Channel'
)];
window
.
_yas
.
sendCustomInfo
({
op
:
'YB_GRADE_DETAIL_GRAPH_DATAZOOM'
,
appop
:
'YB_H5_GRADE_DETAIL_GRAPH_DATAZOOM'
,
param
:
JSON
.
stringify
({
C_ID
:
C_ID
})
},
true
);
}
this
.
refreshEchart
(
endIndex
);
this
.
monthDetailRender
(
true
);
if
(
window
.
_yas
&&
window
.
_yas
.
sendCustomInfo
)
{
// 埋点
let
C_ID
=
window
.
_ChannelVary
[
window
.
cookie
(
'_Channel'
)];
window
.
_yas
.
sendCustomInfo
({
op
:
'YB_GRADE_DETAIL_GRAPH_DATAZOOM'
,
appop
:
'YB_H5_GRADE_DETAIL_GRAPH_DATAZOOM'
,
param
:
JSON
.
stringify
({
C_ID
:
C_ID
})
},
true
);
}
},
200
);
}
/**
...
...
@@ -208,6 +217,19 @@ class GradeDetailPage extends Page {
this
.
page
++
;
this
.
requesting
=
true
;
let
cacheResult
=
this
.
cacheMouthDetailResult
[
`
$
{
this
.
year
}:
$
{
this
.
month
}:
$
{
this
.
page
}
`
];
if
(
cacheResult
)
{
if
(
isInit
)
{
this
.
view
.
gradeBillList
.
html
(
cacheResult
);
}
else
{
this
.
view
.
gradeBillList
.
append
(
cacheResult
);
}
this
.
requesting
=
false
;
return
;
}
this
.
ajax
({
url
:
'/activity/grade/monthDetail'
,
data
:
{
...
...
@@ -225,6 +247,7 @@ class GradeDetailPage extends Page {
this
.
view
.
gradeBillList
.
append
(
monthDetailPage
);
}
this
.
cacheMouthDetailResult
[
`
$
{
this
.
year
}:
$
{
this
.
month
}:
$
{
this
.
page
}
`
]
=
monthDetailPage
;
return
;
}
...
...
Please
register
or
login
to post a comment