Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

你好,在下拉回调时,可否将lastUpdatedTime返回 #41

Open
jiangsumadai opened this issue Jun 11, 2019 · 4 comments
Open

你好,在下拉回调时,可否将lastUpdatedTime返回 #41

jiangsumadai opened this issue Jun 11, 2019 · 4 comments

Comments

@jiangsumadai
Copy link

No description provided.

@2534290808
Copy link
Member

这个可以在js端生成啊,当执行完成刷新是获取当前时间,那么下一次会掉时显示的最后更新时间就前一次刷新时获取的时间

@jiangsumadai
Copy link
Author

这个可以在js端生成啊,当执行完成刷新是获取当前时间,那么下一次会掉时显示的最后更新时间就前一次刷新时获取的时间

感谢您的回复,但您的方案可能不够:
MJRefresh本身的时间是有存储的,在当前页面刷新后,即使退出页面,再次进入页面刷新,时间显示的是之前的时间。
1.您说在js端生成时间,下一次刷新的时候显示前一次获取的时间,但您未考虑退出页面的情况,如果不主动保存时间,是无法做到MJRefresh的效果的。

@2534290808
Copy link
Member

可以使用AsyncStorage进行存储

@jiangsumadai
Copy link
Author

可以使用AsyncStorage进行存储

可是MJRefresh已经做好了存储,现在仅需要通过你们的接口返回即可。
我提了一个PR,在下拉的时候,把时间返回了,可能有更好的方案,我觉着最好在组件里直接返回。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants