Browse Source

打开支付时才调用支付列表

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

+ 3 - 3
components/payPopup/index.vue

@@ -95,7 +95,6 @@ const getPayMethodsList = async () => {
     console.log(error)
   }
 }
-getPayMethodsList()
 
 const channelValue = ref('')
 const radioChange = (e) => {
@@ -119,8 +118,9 @@ const handleClose = () => {
 
 const query = ref(null)
 const amount = ref('') // 支付金额
-const handleOpen = (val) => {
-  console.log('handleOpen:', )
+const handleOpen = async (val) => {
+  console.log('handleOpen打开支付:', )
+  await getPayMethodsList()
   query.value = val
   amount.value = Number(val?.price) ? Number(val?.price)/100 : 0
   tabBarShow(false)