Merge branch 'feature/yoho-coin-new' of git.dev.yoho.cn:web/yohobuy into feature/yoho-coin-new
Showing
8 changed files
with
47 additions
and
3 deletions
static/js/me/currency.js
0 → 100644
1 | +var $ = require('jquery'); | ||
2 | +var page = 0; | ||
3 | + | ||
4 | +$(window).scroll(function() { | ||
5 | + if ($(window).scrollTop() + $(window).height() > $('body').height() - 1) { | ||
6 | + page++; | ||
7 | + $.ajax({ | ||
8 | + type: 'POST', | ||
9 | + url: '/home/currencyDetail', | ||
10 | + dataType: 'html', | ||
11 | + data: { | ||
12 | + page: page | ||
13 | + }, | ||
14 | + success: function(data) { | ||
15 | + console.log(data); | ||
16 | + } | ||
17 | + }); | ||
18 | + return; | ||
19 | + } | ||
20 | +}); |
1 | .yoho-coin-detail-page { | 1 | .yoho-coin-detail-page { |
2 | background: #f0f0f0; | 2 | background: #f0f0f0; |
3 | padding-bottom: pxToRem(40px); | 3 | padding-bottom: pxToRem(40px); |
4 | - | 4 | + .money{ |
5 | + width: 100%; | ||
6 | + height: pxToRem(70px); | ||
7 | + background:#fff; | ||
8 | + margin-bottom: pxToRem(20px); | ||
9 | + line-height: pxToRem(70px); | ||
10 | + font-size: pxToRem(30px); | ||
11 | + text-indent: 1em; | ||
12 | + span{ | ||
13 | + color: #f00; | ||
14 | + font-weight: bold; | ||
15 | + } | ||
16 | + } | ||
5 | .coin-detail { | 17 | .coin-detail { |
6 | background: #fff; | 18 | background: #fff; |
7 | border-top: 1px solid #e0e0e0; | 19 | border-top: 1px solid #e0e0e0; |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | <div class="yoho-coin-detail-page yoho-page"> | 2 | <div class="yoho-coin-detail-page yoho-page"> |
3 | + {{# money}} | ||
4 | + <div class="money">你拥有的有货币:<span>{{ money}}</span></div> | ||
5 | + {{/ money}} | ||
3 | <ul class="coin-detail"> | 6 | <ul class="coin-detail"> |
4 | {{# currency}} | 7 | {{# currency}} |
5 | <li> | 8 | <li> |
@@ -77,7 +77,7 @@ | @@ -77,7 +77,7 @@ | ||
77 | 优惠券 | 77 | 优惠券 |
78 | <span class="iconfont num">{{coupon_num}} </span> | 78 | <span class="iconfont num">{{coupon_num}} </span> |
79 | </a> | 79 | </a> |
80 | - <a class="list-item" href="/home/currency"> | 80 | + <a class="list-item" href="/home/currencyDetail"> |
81 | <span class="iconfont icon"></span> | 81 | <span class="iconfont icon"></span> |
82 | YOHO 币 | 82 | YOHO 币 |
83 | <span class="iconfont num">{{yoho_coin_num}} </span> | 83 | <span class="iconfont num">{{yoho_coin_num}} </span> |
@@ -257,7 +257,7 @@ class HomeController extends AbstractAction | @@ -257,7 +257,7 @@ class HomeController extends AbstractAction | ||
257 | $currency = UserModel::getYohoCoinData($this->_uid); | 257 | $currency = UserModel::getYohoCoinData($this->_uid); |
258 | 258 | ||
259 | $currency['pageFooter'] = true; | 259 | $currency['pageFooter'] = true; |
260 | - $this->_view->display('currency', $currency); | 260 | + $this->_view->display('currency-new', $currency); |
261 | } | 261 | } |
262 | 262 | ||
263 | /** | 263 | /** |
-
Please register or login to post a comment