lauirf

Results 9 comments of lauirf

maa的小工具里有干员识别,可以导出json文件,或许可以用这个来判断,就是需要手动上传。 改OperatorTags试了一下,或许可以使用这种表现? ![Image](https://github.com/user-attachments/assets/5209f219-5398-4066-b52e-eca6f0fe858d)

> Also, another problem is that the state of the button requires refreshes, which requires the whole page of opeartions from the server side if my manual tests are undergoing...

> 把 `useOperation()` 放在 `OperationCard` 里的做法会导致大量的额外请求 > > `mutate()` 的使用方式有误,可以参考上面的解释 > > 另外,代码看起来没有经过格式化,建议运行 `yarn lint:check:eslint` 或者在 IDE 里装个 eslint 插件来检查一下 感谢反馈!我来研究一下该怎么修改

@guansss 改了`mutate`使用key,目前这样行吗? 之前`useOperation()` 放在 `OperationCard` 里导致大量的额外请求是`mutate`造成的,它本身还会有问题吗?

> 现在 `mutate` 的用法就没问题了 > > 大量请求不仅仅是 `mutate` 造成的,列表里每个 `useOperation()` 都会发送一次请求,比如一页有 10 个作业,本来只需要发 1 个请求,现在要发 11 个 (之前的 `mutate` 导致每次点赞还会额外发 20 多个) 啊,了解了,我再改改

@guansss 将更新operation的逻辑移到了OperationList中,现在是纯前端表现了,没有同步后端的ratingType,这种表现能接受吗。 另外,`useOperations`中获得的`operations`的ratingType都是0,尝试使用getOperation获得到的operation能带有正确的ratingType,这是后端的问题吗,我对排查这个问题没有头绪

@martinwang2002 感谢解答!看来我需要多了解token、cache相关的知识

Windows试了,上传和下载都行。代码没看。 如果同步按钮要放在具体页面的话,或许历史记录中也可以放个同步按钮?

也有这个道理,那先保持现状吧