Can WeChat Mini Programs app.js quote the contents of other js files?

developed by WeChat Mini Programs

ask urgently whether the app.js file can refer to the contents of other js files, and how to quote it
Mar.28,2021

Yes, just require directly


you can first expose the method to be called in the js to be referenced. Put,get is the method name
module.exports = {
put: put,
get: get,
}
reference method
var cache = require ("path");
cache.put ();

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