老师 页面还是有bug
来源:8-18 延时加载预处理数据

一码丶平川
2019-07-04
当一个用户点击退出登录后
另一个用户在同设备登录后 会进入我的个人详情页面 而且 数据也是上个用户的
这个怎么处理?
写回答
2回答
-
Mui的问题,页面上的数据会被缓存,登录的时候对页面上的数据重新赋值
072019-07-05 -
慕斯6088333
2019-10-19
同问题。
我的解决方式也是在主页一旦登陆上就去调用登录后的webview去进行刷新。然后,还是要涉及延时。因为fire事件是异步的。
var accountWebView = plus.webview.getWebviewById("account.html"); var profileImgView = plus.webview.getWebviewById("profile_image.html"); var chatListView =plus.webview.getWebviewById("chatlist.html"); mui.fire(accountWebView,"refresh"); mui.fire(profileImgView,"refresh"); mui.fire(chatListView,"refresh"); plus.nativeUI.showWaiting("Loading"); setTimeout(function(){ // Routing to index page mui.openWindow("index.html", "index.html"); plus.nativeUI.closeWaiting(); },3000)
调用完所有需要refresh的事件后,等几秒再跳到主页去比较好。
10
Netty+Spring Boot仿微信-全栈开发高性能后台及客户端
SpringBoot/Netty+MUI全栈开发 同时搞定后台+ Android&iOS
1498 学习 · 684 问题
相似问题