There are a lot of if else in js and there is not much relationship between these if else. How do you optimize the code?

The

code has more than 3, 000 lines, and many if else are careful and error-prone every time they make a version judgment. Are there any optimization ideas and methods? The code cannot be copied and the smart photo is taken

.


how about a different way of thinking?

  

I feel that the code needs to be refactored, and it doesn't make much sense to simplify simply on this basis

Menu