Authored by 郭成尧

go-back

@@ -65,6 +65,7 @@ class Grade { @@ -65,6 +65,7 @@ class Grade {
65 res.render('grade/detail', { 65 res.render('grade/detail', {
66 module: 'activity', 66 module: 'activity',
67 page: 'grade-detail', 67 page: 'grade-detail',
  68 + bgcolor: '#2b2b2b',
68 width750: true, 69 width750: true,
69 localCss: true, 70 localCss: true,
70 title: '成长值' 71 title: '成长值'
1 <div class="grade-detail-page"> 1 <div class="grade-detail-page">
  2 + {{> grade/user-defined-header}}
2 <div id="gradeGraph" class="grade-graph"></div> 3 <div id="gradeGraph" class="grade-graph"></div>
3 <div class="loading-mask" id="loadingMask"> 4 <div class="loading-mask" id="loadingMask">
4 <div class="loading-logo"></div> 5 <div class="loading-logo"></div>
@@ -7,6 +7,7 @@ import 'echarts/lib/component/markLine'; @@ -7,6 +7,7 @@ import 'echarts/lib/component/markLine';
7 import tip from 'plugin/tip'; 7 import tip from 'plugin/tip';
8 import Page from 'yoho-page'; 8 import Page from 'yoho-page';
9 import graphOptions from './graph-options'; 9 import graphOptions from './graph-options';
  10 +import yoho from 'yoho-app';
10 11
11 class GradeDetailPage extends Page { 12 class GradeDetailPage extends Page {
12 constructor() { 13 constructor() {
@@ -16,11 +17,13 @@ class GradeDetailPage extends Page { @@ -16,11 +17,13 @@ class GradeDetailPage extends Page {
16 levelStr: $('#levelStr'), 17 levelStr: $('#levelStr'),
17 gradeGraph: $('#gradeGraph'), 18 gradeGraph: $('#gradeGraph'),
18 gradeBillList: $('#gradeBillList'), 19 gradeBillList: $('#gradeBillList'),
19 - loadingMask: $('#loadingMask') 20 + loadingMask: $('#loadingMask'),
  21 + navBack: $('.nav-back')
20 }; 22 };
21 23
22 this.eGradeGraph = echarts.init(this.view.gradeGraph[0]); 24 this.eGradeGraph = echarts.init(this.view.gradeGraph[0]);
23 this.eGradeGraph.on('click', this.monthDetailInit.bind(this)); 25 this.eGradeGraph.on('click', this.monthDetailInit.bind(this));
  26 + this.view.navBack.on('click', this.back.bind(this));
24 27
25 this.beforeScroll = document.body.scrollTop; 28 this.beforeScroll = document.body.scrollTop;
26 this.year = 0; 29 this.year = 0;
@@ -132,6 +135,13 @@ class GradeDetailPage extends Page { @@ -132,6 +135,13 @@ class GradeDetailPage extends Page {
132 this.monthDetailRender(); 135 this.monthDetailRender();
133 } 136 }
134 } 137 }
  138 +
  139 + // 返回上一页
  140 + goBack() {
  141 + if (yoho.isApp) {
  142 + yoho.invokeMethod('go.back');
  143 + }
  144 + }
135 } 145 }
136 146
137 export default GradeDetailPage; 147 export default GradeDetailPage;
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 top: 0; 13 top: 0;
14 left: 0; 14 left: 0;
15 z-index: 2; 15 z-index: 2;
16 - background-color: #303030; 16 + background-color: #2b2b2b;
17 display: flex; 17 display: flex;
18 flex-direction: column; 18 flex-direction: column;
19 justify-content: center; 19 justify-content: center;