Authored by 周少峰

Merge branch 'feature/yoho-coin-new' of git.dev.yoho.cn:web/yohobuy into feature/yoho-coin-new

  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 +});
@@ -15,3 +15,4 @@ require('./address'); @@ -15,3 +15,4 @@ require('./address');
15 require('./suggest'); 15 require('./suggest');
16 require('./browse-record'); 16 require('./browse-record');
17 require('./address-act'); 17 require('./address-act');
  18 +require('./currency');
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>
  1 +{{> layout/header}}
  2 + {{ iHelp}}
  3 +{{> layout/footer}}
@@ -77,7 +77,7 @@ @@ -77,7 +77,7 @@
77 优惠券 77 优惠券
78 <span class="iconfont num">{{coupon_num}} &#xe604;</span> 78 <span class="iconfont num">{{coupon_num}} &#xe604;</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">&#xe635;</span> 81 <span class="iconfont icon">&#xe635;</span>
82 YOHO 82 YOHO
83 <span class="iconfont num">{{yoho_coin_num}} &#xe604;</span> 83 <span class="iconfont num">{{yoho_coin_num}} &#xe604;</span>
@@ -286,3 +286,8 @@ @@ -286,3 +286,8 @@
286 seajs.use('js/me/logistic'); 286 seajs.use('js/me/logistic');
287 </script> 287 </script>
288 {{/if}} 288 {{/if}}
  289 +{{#if currency}}
  290 +<script>
  291 + seajs.use('js/me/currency');
  292 +</script>
  293 +{{/if}}
@@ -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 /**