路径:/pages/goods_details/index.vue
找到函数returns用下面的代码将其替换
returns: function() {
let pages = getCurrentPages();
if (this.fromType) {
let obj = {
id: this.id,
cartNum: this.cartNum
}
let prevPage = pages[pages.length - 2];
if(pages.length>1){
prevPage.$vm.otherFun(obj);
return uni.navigateBack();
}else{
this.backTap();
}
} else {
if(pages.length>1){
this.backTap();
}else{
uni.reLaunch({
url: '/pages/index/index'
})
}
}
},