/**
 * Created by zhouyong on 15-1-8.
 */
function Cart(barCodes){
    this.barCodes = barCodes;
}

@@ -92,8 +92,384 @@
 odes;%0A%7D%0A
+%0ACart.prototype = %7B%0A    parse_bar_codes_to_commodities : function()%7B%0A        var barCodes = this.barCodes;%0A        return _.map(barCodes,function(barCode)%7B%0A            for(var i in barCode)%7B%0A                var commodity = _.where(get_commodities(),%7BbarCode:i%7D);%0A                commodity.num = barCode%5Bi%5D;%0A                return commodity;%0A            %7D%0A        %7D);%0A    %7D%0A%7D;%0A

add method parse_bar_code_to_commodities in Cart