Google's Android OS used to have an annoying feature - smart network switch - which would inevitably lead to it sitting there, not using your wireless network, displaying the message "No network access".
This usually happened as you got home, because it had picked up your wifi at the very extreme edge of it's reach, and the test probes had failed as a result.
The functionality works by placing some test HTTP requests when connected to a wifi network - if those requests fail, it's considered that the wifi doesn't have network access. This (fairly flawed) methodology doesn't properly account for a range of possible failures in the test itself.
Unfortunately, Xiaomi appear to have felt the need to replicate this behaviour in MIUI - the only real difference is that Xiaomi's functionality displays "Can't Connect to Internet" on the wifi network.
The result is that having previously been to the margins of your coverage, you'll eventually notice that your phone is relying on mobile data instead of wifi, and has eaten your battery (and your data allowance) as a result.
Anecdotally, the issue seems to have become more prevalent recently.
Tapping on the wifi network will reconnect you, but having to do this periodically is an annoyance - particularly as your data allowance disappears in the periods you haven't yet noticed.
Luckily, the issue is quite easy to address - the functionality can be turned off:
Additional Settings ->
Wi-Fi assistant -> Turn off
Once disabled, the OS will use Wifi if it's available, rather than trying to assess connection quality via a single HTTP request.
Of course, the other option - recommended by some - is to turn Data off when you don't need it. Whilst effective, as a solution this really does ignore the fact that our phones are supposed to be smart and shouldn't need constant fiddling with.