Showing
5 changed files
with
35 additions
and
30 deletions
@@ -12,14 +12,18 @@ const helpers = global.yoho.helpers; | @@ -12,14 +12,18 @@ const helpers = global.yoho.helpers; | ||
12 | */ | 12 | */ |
13 | const component = { | 13 | const component = { |
14 | index: (req, res, next) => { | 14 | index: (req, res, next) => { |
15 | + var isLogin = true; | ||
15 | var testData = { | 16 | var testData = { |
16 | - isLogin: true, | ||
17 | - head_ico: "", | ||
18 | - profile_name: "XXX", | 17 | + head_ico: isLogin ? "" : "", |
18 | + profile_name: isLogin ? "James Sen" : "登录/注册", | ||
19 | signinUrl: "/home", | 19 | signinUrl: "/home", |
20 | wait_pay_num: 1, | 20 | wait_pay_num: 1, |
21 | wait_cargo_num: 2, | 21 | wait_cargo_num: 2, |
22 | - send_cargo_num: 3 | 22 | + send_cargo_num: 3, |
23 | + address_num: 2, | ||
24 | + product_favorite_total: 10, | ||
25 | + brand_favorite_total: 21, | ||
26 | + yoho_coin_num: 100 | ||
23 | } | 27 | } |
24 | res.render('index', _.merge({ | 28 | res.render('index', _.merge({ |
25 | module: 'home', | 29 | module: 'home', |
1 | <div class="my-page yoho-page"> | 1 | <div class="my-page yoho-page"> |
2 | <div class="my-header"> | 2 | <div class="my-header"> |
3 | - {{#isLogin}} | 3 | + |
4 | <a class="user-info" href="/home/mydetails"> | 4 | <a class="user-info" href="/home/mydetails"> |
5 | <span class="user-avatar" data-avatar="{{head_ico}}"></span> | 5 | <span class="user-avatar" data-avatar="{{head_ico}}"></span> |
6 | <br><span class="username">{{profile_name}}</span> | 6 | <br><span class="username">{{profile_name}}</span> |
7 | </a> | 7 | </a> |
8 | - {{/isLogin}} | ||
9 | - {{^isLogin}} | ||
10 | - <div class="user-info"> | ||
11 | - <a class="login-btn" href="{{signinUrl}}"> | ||
12 | - 登录/注册 | ||
13 | - </a> | ||
14 | - </div> | ||
15 | - {{/isLogin}} | ||
16 | </div> | 8 | </div> |
17 | <div class="my-order"> | 9 | <div class="my-order"> |
18 | <a class="order-title" href="/home/orders"> | 10 | <a class="order-title" href="/home/orders"> |
19 | 我的订单 | 11 | 我的订单 |
20 | - <span> | 12 | + <span class="read-order"> |
21 | 查看全部订单 <span class="icon icon-right"></span> | 13 | 查看全部订单 <span class="icon icon-right"></span> |
22 | </span> | 14 | </span> |
23 | </a> | 15 | </a> |
@@ -55,23 +47,27 @@ | @@ -55,23 +47,27 @@ | ||
55 | <div class="group-list"> | 47 | <div class="group-list"> |
56 | <a class="list-item" href="/home/address"> | 48 | <a class="list-item" href="/home/address"> |
57 | 地址管理 | 49 | 地址管理 |
58 | - <span class="num">3 <span class="icon icon-right"></span></span> | 50 | + <span class="num">{{address_num}} <span class="icon icon-right"></span></span> |
59 | </a> | 51 | </a> |
60 | </div> | 52 | </div> |
61 | <div class="group-list"> | 53 | <div class="group-list"> |
62 | <a class="list-item" href="/home/favorite"> | 54 | <a class="list-item" href="/home/favorite"> |
63 | 收藏的商品 | 55 | 收藏的商品 |
64 | - <span class="num">120 <span class="icon icon-right"></span></span> | 56 | + <span class="num">{{product_favorite_total}} <span class="icon icon-right"></span></span> |
65 | </a> | 57 | </a> |
66 | <a class="list-item" href="/home/favorite?tab=brand"> | 58 | <a class="list-item" href="/home/favorite?tab=brand"> |
67 | 收藏的品牌 | 59 | 收藏的品牌 |
68 | - <span class="num">120 <span class="icon icon-right"></span></span> | 60 | + <span class="num">{{brand_favorite_total}} <span class="icon icon-right"></span></span> |
61 | + </a> | ||
62 | + <a class="list-item" href="/home/favorite?tab=brand"> | ||
63 | + 收藏的品牌 | ||
64 | + <span class="num">{{brand_favorite_total}} <span class="icon icon-right"></span></span> | ||
69 | </a> | 65 | </a> |
70 | </div> | 66 | </div> |
71 | <div class="group-list"> | 67 | <div class="group-list"> |
72 | <a class="list-item" href="/home/mycurrency"> | 68 | <a class="list-item" href="/home/mycurrency"> |
73 | YOHO 币 | 69 | YOHO 币 |
74 | - <span class="num">100 <span class="icon icon-right"></span></span> | 70 | + <span class="num">{{yoho_coin_num}} <span class="icon icon-right"></span></span> |
75 | </a> | 71 | </a> |
76 | </div> | 72 | </div> |
77 | <div class="group-list"> | 73 | <div class="group-list"> |
public/img/home/header-bg.png
0 → 100644

49 KB
public/img/home/user-icon.png
0 → 100644

5.73 KB
@@ -3,20 +3,19 @@ | @@ -3,20 +3,19 @@ | ||
3 | background: #f0f0f0; | 3 | background: #f0f0f0; |
4 | 4 | ||
5 | a { | 5 | a { |
6 | - color: #444; | 6 | + color: #000000; |
7 | } | 7 | } |
8 | 8 | ||
9 | .user-info { | 9 | .user-info { |
10 | display: block; | 10 | display: block; |
11 | position: relative; | 11 | position: relative; |
12 | padding: 0 30px; | 12 | padding: 0 30px; |
13 | - color: #fff; | 13 | + color: #000000; |
14 | font-size: 34px; | 14 | font-size: 34px; |
15 | line-height: 138px; | 15 | line-height: 138px; |
16 | height: 440px; | 16 | height: 440px; |
17 | background-size: cover; | 17 | background-size: cover; |
18 | - background: #444; | ||
19 | - /*background: resolve("home/header-bg.jpg"); */ | 18 | + background: resolve("home/header-bg.png"); |
20 | text-align: center; | 19 | text-align: center; |
21 | 20 | ||
22 | .user-avatar { | 21 | .user-avatar { |
@@ -27,7 +26,7 @@ | @@ -27,7 +26,7 @@ | ||
27 | height: 200px; | 26 | height: 200px; |
28 | border-radius: 50%; | 27 | border-radius: 50%; |
29 | border: 6px solid #a7a8a9; | 28 | border: 6px solid #a7a8a9; |
30 | - background: #a7a8a9; | 29 | + background: resolve("home/user-icon.png"); |
31 | background-size: 100%; | 30 | background-size: 100%; |
32 | } | 31 | } |
33 | 32 | ||
@@ -37,6 +36,7 @@ | @@ -37,6 +36,7 @@ | ||
37 | text-overflow: ellipsis; | 36 | text-overflow: ellipsis; |
38 | overflow: hidden; | 37 | overflow: hidden; |
39 | white-space: nowrap; | 38 | white-space: nowrap; |
39 | + font-size: 32px; | ||
40 | max-width: 260px; | 40 | max-width: 260px; |
41 | } | 41 | } |
42 | } | 42 | } |
@@ -61,8 +61,8 @@ | @@ -61,8 +61,8 @@ | ||
61 | 61 | ||
62 | .order-title { | 62 | .order-title { |
63 | display: block; | 63 | display: block; |
64 | - padding: 0 30px; | ||
65 | - font-size: 16PX; | 64 | + padding: 0 29px; |
65 | + font-size: 34px; | ||
66 | line-height: 88px; | 66 | line-height: 88px; |
67 | 67 | ||
68 | span { | 68 | span { |
@@ -73,6 +73,10 @@ | @@ -73,6 +73,10 @@ | ||
73 | &.highlight { | 73 | &.highlight { |
74 | background: #eee; | 74 | background: #eee; |
75 | } | 75 | } |
76 | + | ||
77 | + .read-order{ | ||
78 | + font-size: 30px; | ||
79 | + } | ||
76 | } | 80 | } |
77 | 81 | ||
78 | .order-type { | 82 | .order-type { |
@@ -84,7 +88,7 @@ | @@ -84,7 +88,7 @@ | ||
84 | position: relative; | 88 | position: relative; |
85 | float: left; | 89 | float: left; |
86 | color: #444; | 90 | color: #444; |
87 | - font-size: 14PX; | 91 | + font-size: 24px; |
88 | line-height: 1.5; | 92 | line-height: 1.5; |
89 | width: 170px; | 93 | width: 170px; |
90 | 94 | ||
@@ -98,7 +102,7 @@ | @@ -98,7 +102,7 @@ | ||
98 | right: 36px; | 102 | right: 36px; |
99 | width: 72px; | 103 | width: 72px; |
100 | height: 72px; | 104 | height: 72px; |
101 | - font-size: 40px; | 105 | + font-size: 34px; |
102 | line-height: 72px; | 106 | line-height: 72px; |
103 | color: #fff; | 107 | color: #fff; |
104 | background: #f03d35; | 108 | background: #f03d35; |
@@ -120,8 +124,9 @@ | @@ -120,8 +124,9 @@ | ||
120 | display: block; | 124 | display: block; |
121 | position: relative; | 125 | position: relative; |
122 | padding: 0 30px; | 126 | padding: 0 30px; |
123 | - font-size: 16PX; | 127 | + font-size: 34px; |
124 | line-height: 90px; | 128 | line-height: 90px; |
129 | + overflow: hidden; | ||
125 | 130 | ||
126 | &.highlight { | 131 | &.highlight { |
127 | background: #eee; | 132 | background: #eee; |
@@ -144,12 +149,12 @@ | @@ -144,12 +149,12 @@ | ||
144 | 149 | ||
145 | .icon { | 150 | .icon { |
146 | margin-right: 5px; | 151 | margin-right: 5px; |
147 | - font-size: 30px; | 152 | + font-size: 34px; |
148 | vertical-align: top; | 153 | vertical-align: top; |
149 | } | 154 | } |
150 | 155 | ||
151 | .num { | 156 | .num { |
152 | - color: #e0e0e0; | 157 | + color: #b0b0b0; |
153 | float: right; | 158 | float: right; |
154 | } | 159 | } |
155 | } | 160 | } |
-
Please register or login to post a comment