• This project
    • Loading...
  • Sign in

fe / YOHOBUYWAP · Files

Go to a project

GitLab

  • Go to group
  • Project
  • Activity
  • Files
  • Commits
  • Pipelines 0
  • Builds 0
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Members
  • Labels
  • Wiki
  • Forks
  • Network
  • Create a new issue
  • YOHOBUYWAP
  • static
  • js
  • product
  • suspend-cart.js
  • suspend cart count
    a79dfef1
    by xuqi
    2015-11-03 05:11:32 +0800  
    Browse Files
suspend-cart.js 371 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/**
 * 悬浮购物车
 * @author: xuqi<qi.xu@yoho.cn>
 * @date: 2015/11/1
 */

var $ = require('jquery');

var $cart = $('#suspend-cart');

$.ajax({
    type: 'GET',
    url: '/cart/index/count',
    success: function(data) {
        if (data.code === 200) {
            $cart.find('.cart-count').html(data.data.cart_goods_count).removeClass('hide');
        }
    }
});