第四课:列表获取 #4
Replies: 22 comments 33 replies
-
想问一下 老师这样的请求会导致每次切换页面都会发送请求 |
Beta Was this translation helpful? Give feedback.
-
老师您好,为什么您本地请求https://public-api-v2.aspirantzhang.com/api/admins?X-API-KEY=antd,不会报跨域的问题呢?是进行了什么设置吗? |
Beta Was this translation helpful? Give feedback.
-
当columns={init?.data?.layout?.tableColumn}只写到这里时,表格渲染不出来,并且报错。好几个错误 |
Beta Was this translation helpful? Give feedback.
-
报错? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
分页组件的onChange可以在分页和size切换的时候都会调用,不用onShowSizeChange |
Beta Was this translation helpful? Give feedback.
-
使用useRequest,一个接口返回格式为[{"key":"value"}]就接收不到,{"data": [{"key":"value"}]},后面这种格式就能接收到,不知道为啥 (o^^o) |
Beta Was this translation helpful? Give feedback.
-
您好,我这边也是获取不到数据。但是直接通过浏览器是可以获取数据的。
浏览器检查:查询响应结果是{"success":false,"message":"Your session has expired, please log in again."} |
Beta Was this translation helpful? Give feedback.
-
现在index.tsx如下: const index = () => { 。。。 ); }; export default index; 但是页面直接报错: |
Beta Was this translation helpful? Give feedback.
-
谢谢。我把代码重新整理一遍后,OK了。 |
Beta Was this translation helpful? Give feedback.
-
所有的计算和数据组合都交了接口? 接口的管理是服务端完成的吗 ? 会不会造成多余的压力? 这是一种思想吗? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
老师,麻烦问一下,UseRquest 有什么方式处理调用接口的错误信息么,按状态码,最好是全局处理那种 |
Beta Was this translation helpful? Give feedback.
-
我现在遇到一个useRequest请求的问题,就是我有一个zabbix服务端的接口,第一步需要先通过用户名密码获取到用户sessionid(图一的sessionId代码已可以获取到sessionid的值,并打印到控制台),第二步再用sessionid去获取接口信息(图二init的代码的auth后面加上获取到的sessionid值即sessionId?.data?.result )。这两步单独执行都可以正常获取到返回的数据。 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
这是来自QQ邮箱的假期自动回复邮件。
您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
|
Beta Was this translation helpful? Give feedback.
-
这是来自QQ邮箱的假期自动回复邮件。
您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
|
Beta Was this translation helpful? Give feedback.
-
这是来自QQ邮箱的假期自动回复邮件。
您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
|
Beta Was this translation helpful? Give feedback.
-
本节学习手册:https://www.yuque.com/aspirantzhang/antdprov5/zwx8s6
本节代码
841af2c?branch=841af2cabb54a8c4edc711fdc41c28457c3908f6&diff=split
请发与本节课有关的讨论。
Beta Was this translation helpful? Give feedback.
All reactions