Test.vue 514 B

123456789101112131415161718192021222324252627
  1. <template>
  2. </template>
  3. <script setup lang="ts">
  4. import {huoQuXiangMu} from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
  5. import {onMounted} from "vue";
  6. import sleep from "@/utils/sleep";
  7. onMounted(async () => {
  8. huoQuXiangMu('12', '73').then((res) => {
  9. console.log('12 then', res)
  10. }).catch((res) => {
  11. console.log('12 catch', res)
  12. })
  13. await sleep(500)
  14. huoQuXiangMu('23', '73').then((res) => {
  15. console.log('23 then', res)
  16. }).catch((res) => {
  17. console.log('23 catch', res)
  18. })
  19. })
  20. </script>