Showing
5 changed files
with
241 additions
and
0 deletions
apps/activity/controllers/grade.js
0 → 100644
@@ -59,6 +59,8 @@ const storeHome = require(`${cRoot}/store-home`); | @@ -59,6 +59,8 @@ const storeHome = require(`${cRoot}/store-home`); | ||
59 | 59 | ||
60 | const couponList = require(`${cRoot}/coupon-list`); | 60 | const couponList = require(`${cRoot}/coupon-list`); |
61 | 61 | ||
62 | +const grade = require(`${cRoot}/grade`); | ||
63 | + | ||
62 | const disableBFCache = require('../../doraemon/middleware/disable-BFCache'); | 64 | const disableBFCache = require('../../doraemon/middleware/disable-BFCache'); |
63 | 65 | ||
64 | // routers | 66 | // routers |
@@ -312,4 +314,6 @@ router.get('/coupon-list', auth, couponList.index); // 优惠券领取页 | @@ -312,4 +314,6 @@ router.get('/coupon-list', auth, couponList.index); // 优惠券领取页 | ||
312 | router.get('/coupon-list/receive', couponList.receive); // 个人优惠券领取 | 314 | router.get('/coupon-list/receive', couponList.receive); // 个人优惠券领取 |
313 | router.get('/coupon-list/receiveAll', couponList.receiveAll); // 全场优惠券领取 | 315 | router.get('/coupon-list/receiveAll', couponList.receiveAll); // 全场优惠券领取 |
314 | 316 | ||
317 | +router.get('/grade/detail', auth, grade.detail); // 成长值明细 | ||
318 | + | ||
315 | module.exports = router; | 319 | module.exports = router; |
apps/activity/views/action/grade/detail.hbs
0 → 100644
1 | +<div class="grade-detail-page"> | ||
2 | + <div id="gradeGraph" class="grade-graph"></div> | ||
3 | + <div class="grade-detail-area"> | ||
4 | + <div class="box-entry"> | ||
5 | + </div> | ||
6 | + <hr class="box-entry-line"> | ||
7 | + <div class="grade-bill-box"> | ||
8 | + <div class="grade-level"> | ||
9 | + 您当前的会员等级为:银卡会员 | ||
10 | + </div> | ||
11 | + <div class="grade-bill-title"> | ||
12 | + 成长值来源 | ||
13 | + </div> | ||
14 | + <div class="grade-bill-list"> | ||
15 | + <div class="grade-bill"> | ||
16 | + <div class="grade-bill-left"> | ||
17 | + <div class="order">订单22423498</div> | ||
18 | + <div class="time">2018-02-22 18:32:32</div> | ||
19 | + </div> | ||
20 | + <div class="grade-bill-right"> | ||
21 | + <span>+80</span> | ||
22 | + </div> | ||
23 | + </div> | ||
24 | + <div class="grade-bill"> | ||
25 | + <div class="grade-bill-left"> | ||
26 | + <div class="order">订单22423498</div> | ||
27 | + <div class="time">2018-02-22 18:32:32</div> | ||
28 | + </div> | ||
29 | + <div class="grade-bill-right"> | ||
30 | + <span>+80</span> | ||
31 | + </div> | ||
32 | + </div> | ||
33 | + </div> | ||
34 | + </div> | ||
35 | + </div> | ||
36 | +</div> |
public/js/activity/grade-detail.page.js
0 → 100644
1 | +import 'activity/grade-detail.page.css'; | ||
2 | +import $ from 'yoho-jquery'; | ||
3 | +import echarts from 'echarts'; | ||
4 | +import Page from 'yoho-page'; | ||
5 | + | ||
6 | + | ||
7 | +class GradeDetailPage extends Page { | ||
8 | + constructor() { | ||
9 | + super(); | ||
10 | + | ||
11 | + this.view = { | ||
12 | + gradeGraph: $('#gradeGraph') | ||
13 | + }; | ||
14 | + | ||
15 | + this.eGadeGraph = echarts.init(this.view.gradeGraph[0]); | ||
16 | + | ||
17 | + let option = { | ||
18 | + backgroundColor: '#2d2d2d', | ||
19 | + grid: { | ||
20 | + show: false | ||
21 | + }, | ||
22 | + tooltip: { | ||
23 | + trigger: 'none' | ||
24 | + }, | ||
25 | + dataZoom: [{ | ||
26 | + type: 'inside', | ||
27 | + startValue: '2月', | ||
28 | + endValue: '5月', | ||
29 | + zoomOnMouseWheel: false, | ||
30 | + filterMode: 'none' | ||
31 | + }], | ||
32 | + xAxis: { | ||
33 | + type: 'category', | ||
34 | + boundaryGap: false, | ||
35 | + axisLine: { | ||
36 | + show: false | ||
37 | + }, | ||
38 | + axisTick: { | ||
39 | + show: false | ||
40 | + }, | ||
41 | + data: [{ | ||
42 | + value: '1月', | ||
43 | + textStyle: { | ||
44 | + color: '#fff', | ||
45 | + fontSize: 12 | ||
46 | + } | ||
47 | + }, { | ||
48 | + value: '2月', | ||
49 | + textStyle: { | ||
50 | + color: '#fff', | ||
51 | + fontSize: 12 | ||
52 | + } | ||
53 | + }, { | ||
54 | + value: '3月', | ||
55 | + textStyle: { | ||
56 | + color: '#fff', | ||
57 | + fontSize: 12 | ||
58 | + } | ||
59 | + }, { | ||
60 | + value: '4月', | ||
61 | + textStyle: { | ||
62 | + color: '#fff', | ||
63 | + fontSize: 12 | ||
64 | + } | ||
65 | + }, { | ||
66 | + value: '5月', | ||
67 | + textStyle: { | ||
68 | + color: '#000', | ||
69 | + fontWeight: 'bold', | ||
70 | + fontSize: 18, | ||
71 | + backgroundColor: '#fff' | ||
72 | + } | ||
73 | + }, { | ||
74 | + value: '6月', | ||
75 | + textStyle: { | ||
76 | + color: '#fff', | ||
77 | + fontSize: 12 | ||
78 | + } | ||
79 | + }] | ||
80 | + }, | ||
81 | + yAxis: { | ||
82 | + type: 'value', | ||
83 | + show: false, | ||
84 | + }, | ||
85 | + series: [{ | ||
86 | + data: [820, 932, 901, 934, 1290, 1330, 1320], | ||
87 | + color: ['#A59075'], | ||
88 | + symbol: 'circle', | ||
89 | + symbolSize: 8, | ||
90 | + type: 'line', | ||
91 | + label: { | ||
92 | + normal: { | ||
93 | + show: true, | ||
94 | + position: 'top' | ||
95 | + } | ||
96 | + }, | ||
97 | + }] | ||
98 | + }; | ||
99 | + | ||
100 | + this.eGadeGraph.setOption(option); | ||
101 | + | ||
102 | + this.eGadeGraph.on('click', event => { | ||
103 | + console.log('当前是:' + event.name); | ||
104 | + }); | ||
105 | + } | ||
106 | +} | ||
107 | + | ||
108 | +export default new GradeDetailPage(); |
public/scss/activity/grade-detail.page.css
0 → 100644
1 | +.grade-detail-page { | ||
2 | + .grade-graph { | ||
3 | + width: 100%; | ||
4 | + height: 500px; | ||
5 | + margin-left: auto; | ||
6 | + margin-right: auto; | ||
7 | + } | ||
8 | + | ||
9 | + .grade-detail-area { | ||
10 | + margin-top: 32px; | ||
11 | + } | ||
12 | + | ||
13 | + .box-entry { | ||
14 | + width: 580px; | ||
15 | + height: 42px; | ||
16 | + margin-left: auto; | ||
17 | + margin-right: auto; | ||
18 | + background-color: #222; | ||
19 | + border: 4px solid #000; | ||
20 | + border-radius: 21px; | ||
21 | + } | ||
22 | + | ||
23 | + .box-entry-line { | ||
24 | + margin-top: -21px; | ||
25 | + margin-left: auto; | ||
26 | + margin-right: auto; | ||
27 | + width: 520px; | ||
28 | + height: 1px; | ||
29 | + border: none; | ||
30 | + border-top: 1px solid #000; | ||
31 | + } | ||
32 | + | ||
33 | + .grade-bill-box { | ||
34 | + margin-top: -12px; | ||
35 | + margin-left: auto; | ||
36 | + margin-right: auto; | ||
37 | + width: 480px; | ||
38 | + height: 750px; | ||
39 | + box-shadow: 0 16px 16px 0 #ddd; | ||
40 | + background: #fff; | ||
41 | + border: none; | ||
42 | + padding-top: 32px; | ||
43 | + color: #444; | ||
44 | + | ||
45 | + .grade-level { | ||
46 | + text-align: center; | ||
47 | + } | ||
48 | + | ||
49 | + .grade-bill-title { | ||
50 | + text-align: center; | ||
51 | + margin-top: 32px; | ||
52 | + } | ||
53 | + | ||
54 | + .grade-bill-list > .grade-bill { | ||
55 | + padding: 5px 16px; | ||
56 | + display: flex; | ||
57 | + justify-content: space-between; | ||
58 | + border-bottom: 1px solid #eee; | ||
59 | + | ||
60 | + &:last-child { | ||
61 | + border-bottom: none; | ||
62 | + } | ||
63 | + | ||
64 | + .grade-bill-left > .order { | ||
65 | + font-size: 16px; | ||
66 | + } | ||
67 | + | ||
68 | + .grade-bill-left > .time { | ||
69 | + font-size: 14px; | ||
70 | + font-weight: 300; | ||
71 | + } | ||
72 | + | ||
73 | + .grade-bill-right { | ||
74 | + display: flex; | ||
75 | + align-items: center; | ||
76 | + font-size: 14px; | ||
77 | + font-weight: 300; | ||
78 | + color: #ccc; | ||
79 | + } | ||
80 | + } | ||
81 | + } | ||
82 | +} |
-
Please register or login to post a comment