在uniapp中使用axios请求接口,出现adapter is not a function:
大致就是说适配问题不兼容,因为我们这里是引用的axios插件,在兼容方面还需要做相应处理。

我这里呢是请求自己一个接口,获取图书信息
结构:
<template>
<view class="content">
<!-- <image class="logo" src="/static/logo.png"></image> -->
<view class="text-area">
<text class="title">{
{title}}</text>
</view>
<view class="booksList">
<view class="books" v-for="(item,index) in books" :key="index">
<view class

在uniapp中使用axios请求接口时遇到adapter is not a function错误。问题根源在于axios适配器不兼容。解决方案包括使用uniapp原生的uni.request()或自定义适配器。推荐使用原生的uni.request(),以减少因平台差异带来的问题。两种方法均可有效解决问题。
最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



