听书页面
This commit is contained in:
@@ -346,6 +346,7 @@
|
||||
this.adressMoRen = this.addressList[this.adressMoRIndex]
|
||||
console.log(this.adressMoRen, '默认')
|
||||
if(this.adressMoRen != {}){
|
||||
console.log('运费之前')
|
||||
this.getYunFei()
|
||||
}else{
|
||||
this.getUserAddress()
|
||||
@@ -429,18 +430,21 @@
|
||||
})
|
||||
},
|
||||
// 获取运费
|
||||
getYunFei(){
|
||||
getYunFei(){
|
||||
let key = []
|
||||
let dataToString = ''
|
||||
// console.log(this.adressMoRen, '默认地址')
|
||||
this.cartList.forEach((item, index) => {
|
||||
key.push({productsid: item.productId, productAmount:item.productAmount})
|
||||
dataToString = dataToString.concat(item.productId+"="+item.productAmount+"&")
|
||||
})
|
||||
})
|
||||
console.log(this.adressMoRen.areaidpath,dataToString,'this.adressMoRen.areaidpath')
|
||||
$http.request({
|
||||
url: "book/buyorder/getTransPrice/" + this.adressMoRen.areaidpath + "?" + dataToString,
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
// data: key,
|
||||
data:{
|
||||
loadAnimate:'none', // 请求加载动画
|
||||
} ,
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
@@ -511,7 +515,7 @@
|
||||
})
|
||||
},
|
||||
// 更改地址
|
||||
choseDizhi(e) {
|
||||
choseDizhi(e) {
|
||||
this.adressMoRIndex = e
|
||||
this.adressMoRen = this.addressList[this.adressMoRIndex]
|
||||
console.log(this.adressMoRen)
|
||||
@@ -619,9 +623,12 @@
|
||||
title: "支付成功"
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
uni.switchTab({
|
||||
url: './orderList'
|
||||
});
|
||||
// uni.navigateTo({
|
||||
// url: './orderList'
|
||||
// });
|
||||
}, 1000)
|
||||
} else {
|
||||
uni.showToast({
|
||||
@@ -629,11 +636,12 @@
|
||||
icon: "none",
|
||||
image: '../../static/icon/ic_close.png'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: './orderList'
|
||||
});
|
||||
}, 1000)
|
||||
// setTimeout(() => {
|
||||
|
||||
// uni.navigateTo({
|
||||
// url: './orderList'
|
||||
// });
|
||||
// }, 1000)
|
||||
}
|
||||
})
|
||||
}else if(this.payType == 1){
|
||||
@@ -649,7 +657,7 @@
|
||||
title: "支付成功"
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
uni.switchTab({
|
||||
url: './orderList'
|
||||
});
|
||||
}, 1000)
|
||||
@@ -677,7 +685,7 @@
|
||||
icon: "success"
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
uni.switchTab({
|
||||
url: './orderList'
|
||||
});
|
||||
}, 1000)
|
||||
|
||||
Reference in New Issue
Block a user