购物车删除数据处理

master
chen 2022-02-25 17:35:07 +08:00
parent ab67d715ed
commit fce22b48c2
2 changed files with 6 additions and 4 deletions

View File

@ -204,7 +204,6 @@
// //
gopageEv(){ gopageEv(){
if(this.dataList.length){ if(this.dataList.length){
console.log(this.totalPrice,207);
if(this.totalPrice!='0.00'){ if(this.totalPrice!='0.00'){
let newList = []; let newList = [];
this.dataList.forEach(item=>{ this.dataList.forEach(item=>{
@ -262,7 +261,9 @@
}, },
deladdEvent(id,cur,index){// deladdEvent(id,cur,index){//
if(index==0){// if(index==0){//
if(this.dataList[cur].num!=0){
this.dataList[cur].num--; this.dataList[cur].num--;
}
if(this.dataList[cur].num > 1){ if(this.dataList[cur].num > 1){
this.setShopNum(id,this.dataList[cur].num,'down'); this.setShopNum(id,this.dataList[cur].num,'down');
} }

View File

@ -102,8 +102,9 @@
methods:{ methods:{
// //
backEv(){ backEv(){
if(uni.getStorageSync('outside')*1==2){
this.fromWhere = uni.getStorageSync('outside')*1; this.fromWhere = uni.getStorageSync('outside')*1;
console.log(this.fromWhere,106); }
switch (this.fromWhere){ switch (this.fromWhere){
case 1: case 1:
case 2: case 2: