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

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e377e1-429ec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e377e1-429ec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?