From 588ec4c17e2900e35742dccdc154bdafc970ec45 Mon Sep 17 00:00:00 2001
From: wangxiaowei <1121133807@qq.com>
Date: Mon, 16 Sep 2024 17:30:49 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=A7=84=E6=A0=BC=E6=94=AF?=
=?UTF-8?q?=E4=BB=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
bundle_b/pages/local_shop/local_pay.vue | 36 +++++-----
bundle_b/pages/local_shop/local_shop_buy.vue | 76 ++++++++++++++++----
2 files changed, 81 insertions(+), 31 deletions(-)
diff --git a/bundle_b/pages/local_shop/local_pay.vue b/bundle_b/pages/local_shop/local_pay.vue
index 199ed29..3127fd9 100644
--- a/bundle_b/pages/local_shop/local_pay.vue
+++ b/bundle_b/pages/local_shop/local_pay.vue
@@ -92,7 +92,7 @@
import {wxpay} from '@/utils/pay'
import {localShopPay, localShopLogin, localShopPayWeixin, localBalance} from '@/api/user.js'
import {getLocalShopById} from "@/api/shop"
- import {getLocalGoodsDetails} from '@/api/store'
+ import {localOrderDetails} from '@/api/store'
export default {
data() {
@@ -114,7 +114,6 @@
goods: [],
showPay: false,
payInfo: '',
- payMoney: '',
spec_item_id: 0
};
},
@@ -129,7 +128,8 @@
if (query?.type && query?.goods_id) {
this.goods_id = query.goods_id
this.spec_item_id = query.spec_item_id
- this.getLocalGoodsDetailsFun()
+ this.lsg_order_id = query.lsg_order_id
+ this.localOrderDetailsFun()
}
this.login()
@@ -153,23 +153,23 @@
}
},
- async getLocalGoodsDetailsFun() {
- const {data, code} = await getLocalGoodsDetails({
- id: this.goods_id,
- lstore_id: this.lstore_id,
- spec_item_id: this.spec_item_id,
- buy_shop_num: 1
+ async localOrderDetailsFun(){
+ const {data, code} = await localOrderDetails({
+ lsg_order_id: this.lsg_order_id
})
-
+
if (code == 1) {
- this.goods = data
- if (this.spec_item_id > 0) {
- this.money = data.spec.price
- } else {
- this.money = data.price
+ this.info = data.local_msg
+ this.goods = data.goods_msg
+ this.goods.goods_num = data.goods_num
+ this.money = data.goods_total_price
+ if (data.sku_msg) {
+ this.goods.spec = data.sku_msg
}
} else {
- this.$toast({title: '商品获取失败'})
+ return this.$toast({
+ title: '订单信息获取错误,请重新提交'
+ })
}
},
@@ -251,12 +251,14 @@
title: '支付中',
mask: true
})
+
localShopPayWeixin({
money: this.money,
lid: this.lstore_id,
user_id: this.user_id,
spec_item_id: this.spec_item_id,
- buy_shop_num: 1
+ goods_num: this.goods ? this.goods.goods_num : 1,
+ lsg_order_id: this.lsg_order_id
}).then((result) => {
if (result.code == 1) {
const pay = {
diff --git a/bundle_b/pages/local_shop/local_shop_buy.vue b/bundle_b/pages/local_shop/local_shop_buy.vue
index 71f9e11..f987520 100644
--- a/bundle_b/pages/local_shop/local_shop_buy.vue
+++ b/bundle_b/pages/local_shop/local_shop_buy.vue
@@ -17,9 +17,9 @@
-
+
- 选规格:{{active == -1 ? '默认' : shop_spec}}
+ 选规格:{{active == -1 ? '默认' : shop_spec}},数量:x {{shop_num}}
@@ -30,9 +30,9 @@
@@ -57,12 +57,24 @@
-
+
+
+ 库存:
+ {{shop_stock}}
+
+
+
+
规格说明:
- {{active == -1 ? '无' : shop_note}}
+ {{shop_note}}
+
+
+ 数量:{{shop_num}}
+
+
@@ -70,7 +82,8 @@