Authored by yyq

bind

@@ -12,6 +12,8 @@ var $ = require('yoho-jquery'), // eslint-disable-line @@ -12,6 +12,8 @@ var $ = require('yoho-jquery'), // eslint-disable-line
12 var $cartnewTips = $('.cartnew-tips'), 12 var $cartnewTips = $('.cartnew-tips'),
13 $cartListWrap = $('#Y_CartListWrap'); 13 $cartListWrap = $('#Y_CartListWrap');
14 14
  15 +require('../common/function')
  16 +
15 // 关闭温馨提示 17 // 关闭温馨提示
16 $cartnewTips.find('.btn-close').click(function() { 18 $cartnewTips.find('.btn-close').click(function() {
17 $cartnewTips.fadeOut(); 19 $cartnewTips.fadeOut();
  1 +/* eslint-disable */
  2 +if (!Function.prototype.bind) {
  3 + Function.prototype.bind = function(oThis) {
  4 + if (typeof this !== "function") {
  5 + return;
  6 + }
  7 +
  8 + var aArgs = Array.prototype.slice.call(arguments, 1),
  9 + fToBind = this,
  10 + fNOP = function() {},
  11 + fBound = function() {
  12 + return fToBind.apply(this instanceof fNOP && oThis ? this: oThis, aArgs.concat(Array.prototype.slice.call(arguments)));
  13 + };
  14 +
  15 + fNOP.prototype = this.prototype;
  16 + fBound.prototype = new fNOP();
  17 +
  18 + return fBound;
  19 + };
  20 +}
  21 +/* eslint-ensable */