|
@@ -422,6 +422,7 @@ import {CustomToast} from '@/components/custom-toast.vue';
|
|
|
async pay() {
|
|
async pay() {
|
|
|
// 直播订单,使用productId校验限购
|
|
// 直播订单,使用productId校验限购
|
|
|
let productId = null;
|
|
let productId = null;
|
|
|
|
|
+ let num = this.order.totalNum || 1; // 获取订单数量
|
|
|
if(this.order.productId){
|
|
if(this.order.productId){
|
|
|
productId = this.order.productId;
|
|
productId = this.order.productId;
|
|
|
} else if(this.product && this.product.productId){
|
|
} else if(this.product && this.product.productId){
|
|
@@ -438,7 +439,7 @@ import {CustomToast} from '@/components/custom-toast.vue';
|
|
|
// 如果获取到 productId,检查限购
|
|
// 如果获取到 productId,检查限购
|
|
|
if(productId){
|
|
if(productId){
|
|
|
try {
|
|
try {
|
|
|
- const res = await checkPurchaseLimit({ productId: productId });
|
|
|
|
|
|
|
+ const res = await checkPurchaseLimit({ productId: productId, num: num });
|
|
|
if (res.code !== 200) {
|
|
if (res.code !== 200) {
|
|
|
this.$refs.customToast.show({
|
|
this.$refs.customToast.show({
|
|
|
title: res.msg || '该商品限购,目前剩余可购买数量不足',
|
|
title: res.msg || '该商品限购,目前剩余可购买数量不足',
|