I would like to ask WeChat Mini Programs how to take apart the bloated single-page js file and write it into multiple

because some pages have very complex functions
the result code has more than 3000 lines of code that are confused every time I modify it.

there is an article about how to disassemble https://www.jianshu.com/p/4b2., but I don"t understand

.

how do you open it?

Mar.28,2021

you can use custom components to extract some functional logic.


consider using https://tencent.github.io/wepy/


you can see the component tutorial documentation on the official website: https://developers.weixin.qq.

.

in addition to extracting components, extract some request logic and tool logic into a file, and then use require to introduce

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-1b3b662-2c283.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-1b3b662-2c283.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?