Authored by ccbikai

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

@@ -121,17 +121,17 @@ function rePosFooter() { @@ -121,17 +121,17 @@ function rePosFooter() {
121 121
122 //未登录 122 //未登录
123 $op.prepend( 123 $op.prepend(
124 - '<a href="http://m.yohobuy.com/signin.html">登录</a>' + 124 + '<a href="/signin.html">登录</a>' +
125 '<span class="sep-line">|</span>' + 125 '<span class="sep-line">|</span>' +
126 - '<a href="http://m.yohobuy.com/reg.html">注册</a>' 126 + '<a href="/reg.html">注册</a>'
127 ); 127 );
128 } else { 128 } else {
129 129
130 //已登录 130 //已登录
131 $op.prepend( 131 $op.prepend(
132 'Hi,' + 132 'Hi,' +
133 - '<a class="user-name" href="http://m.yohobuy.com/home?tmp=' + Math.random() + '">' + user[0] + '</a>' +  
134 - '<a href="http://m.yohobuy.com/passport/signout/index?token=' + user[3] + '">退出</a>' 133 + '<a class="user-name" href="/home?tmp=' + Math.random() + '">' + user[0] + '</a>' +
  134 + '<a href="/passport/signout/index?token=' + user[3] + '">退出</a>'
135 ); 135 );
136 } 136 }
137 137
@@ -220,6 +220,8 @@ function search(opt) { @@ -220,6 +220,8 @@ function search(opt) {
220 220
221 } 221 }
222 222
  223 +require('./suspend-cart'); //悬浮购物车
  224 +
223 $.ajax({ 225 $.ajax({
224 type: 'GET', 226 type: 'GET',
225 url: '/search/filter', 227 url: '/search/filter',
@@ -61,6 +61,8 @@ var $listNav = $('#list-nav'), @@ -61,6 +61,8 @@ var $listNav = $('#list-nav'),
61 navHammer, 61 navHammer,
62 searching; 62 searching;
63 63
  64 +require('./suspend-cart'); //悬浮购物车
  65 +
64 if ($('.swiper-container .swiper-slide').length > 1) { 66 if ($('.swiper-container .swiper-slide').length > 1) {
65 swiper = new Swiper('.swiper-container', { 67 swiper = new Swiper('.swiper-container', {
66 lazyLoading: true, 68 lazyLoading: true,
@@ -71,6 +71,8 @@ var $listNav = $('#list-nav'), @@ -71,6 +71,8 @@ var $listNav = $('#list-nav'),
71 navHammer, 71 navHammer,
72 searching; 72 searching;
73 73
  74 +require('./suspend-cart'); //悬浮购物车
  75 +
74 $('#today a').text(month + '月' + date + '号'); 76 $('#today a').text(month + '月' + date + '号');
75 77
76 if ($('.swiper-container .swiper-slide').length > 1) { 78 if ($('.swiper-container .swiper-slide').length > 1) {
  1 +/**
  2 + * 悬浮购物车
  3 + * @author: xuqi<qi.xu@yoho.cn>
  4 + * @date: 2015/11/1
  5 + */
  6 +
  7 +var $ = require('jquery');
  8 +
  9 +var $cart = $('#suspend-cart');
  10 +
  11 +$.ajax({
  12 + type: 'GET',
  13 + url: '/cart/index/count',
  14 + success: function(data) {
  15 + if (data.code === 200) {
  16 + $cart.find('.cart-count').html(data.data.cart_good_count).removeClass('hide');
  17 + }
  18 + }
  19 +});