购物车删除数据处理
parent
ab67d715ed
commit
fce22b48c2
|
@ -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){//减少数量
|
||||||
this.dataList[cur].num--;
|
if(this.dataList[cur].num!=0){
|
||||||
|
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');
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,8 +102,9 @@
|
||||||
methods:{
|
methods:{
|
||||||
//返回事件
|
//返回事件
|
||||||
backEv(){
|
backEv(){
|
||||||
this.fromWhere = uni.getStorageSync('outside')*1;
|
if(uni.getStorageSync('outside')*1==2){
|
||||||
console.log(this.fromWhere,106);
|
this.fromWhere = uni.getStorageSync('outside')*1;
|
||||||
|
}
|
||||||
switch (this.fromWhere){
|
switch (this.fromWhere){
|
||||||
case 1:
|
case 1:
|
||||||
case 2:
|
case 2:
|
||||||
|
|
Loading…
Reference in New Issue