unibest/src/pages/index/demo/request.vue

18 lines
335 B
Vue
Raw Normal View History

2024-01-08 21:24:39 +08:00
<template>
<view>
<button @click="handleRequest">请求</button>
</view>
</template>
<script lang="ts" setup>
import { http } from '@/utils/http'
import { UserItem } from '@/typings'
const handleRequest = () => {
const res = http<UserItem[]>({
url: '/getUserList',
method: 'GET',
})
console.log(res)
}
</script>