|
@@ -25,10 +25,17 @@
|
|
|
this.$http.post('trade/order/buyNow', [{
|
|
this.$http.post('trade/order/buyNow', [{
|
|
|
uuid: this.item.uuid,
|
|
uuid: this.item.uuid,
|
|
|
batchCode: this.item.batchCode,
|
|
batchCode: this.item.batchCode,
|
|
|
- number: this.item.minBuyQty
|
|
|
|
|
|
|
+ number: this.item.minBuyQty,
|
|
|
|
|
+ storeid: this.item.storeid,
|
|
|
|
|
+ currencyName: this.item.currencyName
|
|
|
}])
|
|
}])
|
|
|
.then(response => {
|
|
.then(response => {
|
|
|
- window.location.href = '/user#/order/pay/' + this.enidfilter(response.data.orderid)
|
|
|
|
|
|
|
+ // window.location.href = '/user#/order/pay/' + this.enidfilter(response.data.orderid)
|
|
|
|
|
+ if (response.data.message) {
|
|
|
|
|
+ this.$message.error(response.data.message)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ window.location.href = '/user#/order/pay/' + this.enidfilter(response.data.data.orderid)
|
|
|
|
|
+ }
|
|
|
}, err => {
|
|
}, err => {
|
|
|
console.log(err)
|
|
console.log(err)
|
|
|
})
|
|
})
|
|
@@ -37,15 +44,23 @@
|
|
|
this.$http.post('trade/cart/add', {
|
|
this.$http.post('trade/cart/add', {
|
|
|
uuid: this.item.uuid,
|
|
uuid: this.item.uuid,
|
|
|
batchCode: this.item.batchCode,
|
|
batchCode: this.item.batchCode,
|
|
|
- number: this.item.minBuyQty
|
|
|
|
|
|
|
+ number: this.item.minBuyQty,
|
|
|
|
|
+ storeid: this.item.storeid,
|
|
|
|
|
+ currencyName: this.item.currencyName
|
|
|
})
|
|
})
|
|
|
.then(response => {
|
|
.then(response => {
|
|
|
- console.log(response.data)
|
|
|
|
|
if (response.data.success) {
|
|
if (response.data.success) {
|
|
|
- this.$message({
|
|
|
|
|
- message: '添加购物车成功',
|
|
|
|
|
- type: 'success'
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if (response.data.message) {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: response.data.message,
|
|
|
|
|
+ type: 'success'
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: '添加购物车成功',
|
|
|
|
|
+ type: 'success'
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
this.$message.error(response.data.message)
|
|
this.$message.error(response.data.message)
|
|
|
// console.log(response.data.message)
|
|
// console.log(response.data.message)
|