Generally, that message means you're connected to your router, but the router isn't connected to the Internet. My first thing would be to reboot the router. Second, I would check that a) my wifi password for the router was OK and that my username/password for the router to connect to the Internet were OK (occasionally, when my ISP goes down, it causes users to have to reset their security credentials). The third thing I'd do, if the first two didn't fix the problem, would be to call my ISP to see if they were aware of a service outage.
OnePlus 5 review