浏览代码

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

lifanagju_citu 1 月之前
父节点
当前提交
79271abb03
共有 1 个文件被更改,包括 3 次插入3 次删除
  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)