add(index){
this.toolbar=false;
this.tabBox[index].num+=1; //当前商品数量
this.orderNum+=1; //购物车数量
this.orderPriceNow[index]=parseFloat((this.tabBox[index].prePrice*this.tabBox[index].num));//当前商品金额=当前单价*当前数量
this.orderPrice = parseFloat(this.orderPriceNow.reduce((prev,cur)=>prev+cur)).toFixed(2);
console.log("收入:"+this.orderPrice)
}
minus(index){
if(this.orderNum<=1){
this.alertModal=false;
this.toolbar=true;
}
this.orderNum-=1;
this.tabBox[index].num -= 1;
this.orderPriceNow[index]=parseFloat((this.tabBox[index].prePrice*this.tabBox[index].num));
this.orderPrice= parseFloat(this.orderPriceNow.reduce((prev,cur)=>prev-cur)).toFixed(2);
// console.log("-"+this.orderPrice)
// console.log("-"+this.orderPrice)
console.log("支出:"+this.orderPrice)
}
console