Thanks for your question. I will try to help.
You are not really allowed to marry whilst in the UK on a visit visa, so it would be less controversial if you married outside the UK.
Once married you would then have to apply for an EEA family permit in order to allow you to travel to the UK for the purpose of settling here with your then-spouse:
Once you have arrived in the UK you can then apply for an EEA residence card, which confirms your right to stay in the UK to work provided that you remain married to your EEA spouse and that they remain working in the UK.
Your spouse has to be exercising their treaty rights by working in the UK, but income is not as much as an issue as it would be if your spouse were a UK citizen and not an EEa citizen.
If you remain in the UK for 5 years on the residence card with your spouse also working then you can apply for “permanent residence” which is the right to remain permanently in the UK without having to be married to your spouse.
My goal is to provide you with a good service. If you feel you have received anything less, please reply back. Please remember to leave positive feedback using the stars at the top of the page.