购物车删除数据处理
parent
ab67d715ed
commit
fce22b48c2
|
@ -204,7 +204,6 @@
|
|||
// 去结算、去购物事件
|
||||
gopageEv(){
|
||||
if(this.dataList.length){
|
||||
console.log(this.totalPrice,207);
|
||||
if(this.totalPrice!='0.00'){
|
||||
let newList = [];
|
||||
this.dataList.forEach(item=>{
|
||||
|
@ -262,7 +261,9 @@
|
|||
},
|
||||
deladdEvent(id,cur,index){//数量加减事件
|
||||
if(index==0){//减少数量
|
||||
this.dataList[cur].num--;
|
||||
if(this.dataList[cur].num!=0){
|
||||
this.dataList[cur].num--;
|
||||
}
|
||||
if(this.dataList[cur].num > 1){
|
||||
this.setShopNum(id,this.dataList[cur].num,'down');
|
||||
}
|
||||
|
|
|
@ -102,8 +102,9 @@
|
|||
methods:{
|
||||
//返回事件
|
||||
backEv(){
|
||||
this.fromWhere = uni.getStorageSync('outside')*1;
|
||||
console.log(this.fromWhere,106);
|
||||
if(uni.getStorageSync('outside')*1==2){
|
||||
this.fromWhere = uni.getStorageSync('outside')*1;
|
||||
}
|
||||
switch (this.fromWhere){
|
||||
case 1:
|
||||
case 2:
|
||||
|
|
Loading…
Reference in New Issue