Browse Source

支付打印

lifanagju_citu 1 tháng trước cách đây
mục cha
commit
2aa18e451b
1 tập tin đã thay đổi với 7 bổ sung1 xóa
  1. 7 1
      components/payPopup/index.vue

+ 7 - 1
components/payPopup/index.vue

@@ -218,7 +218,9 @@ const checkPayStatus = async (id) => {
     if (payLoading || !interTimer) return
     payLoading = true
     const res = await getOrderPayStatus({ id })
+    console.log('getOrderPayStatusApi:', res)
     if (res?.data?.status === 10) {
+      console.log('checkPayStatus-支付成功')
       handleClose()
       if (interTimer) clearInterval(interTimer)
       uni.hideLoading()
@@ -271,6 +273,7 @@ const weChatMiniProgramPay = async (data) => {
     paySign: payConfig.paySign,
     success: (res) => {
       // 用户支付成功
+      console.log('用户支付成功')
       initIntervalFun()
       // handleClose()
     },
@@ -324,9 +327,12 @@ const setOrderCreated = async () => {
 }
 
 onShow(() => {
-  if (orderInfo && orderInfo.value?.id) initIntervalFun()
+  const id = orderInfo.value?.payOrder?.id || orderInfo.value?.order?.payOrderId
+  console.log('onShow:', id)
+  if (id) initIntervalFun()
 })
 onHide(() => {
+  console.log('onHide:', 789)
   if (interTimer) clearInterval(interTimer)
 })