小程序数据比较多,放在data段会导致function被放到很下面,有没有办法单独将data放到一个js中,由主js调用?
这个方法我试过,编译报错
util.js 中怎么写,
episodeListT:
[
{
title: ‘S01E01’,
},
{
title: ‘S01E02’,
}
]
module.exports = {
formatTime: formatTime
}
编译报错如下。
WAService.js:1 Uncaught ReferenceError: episodeListT is not defined
at season_info.js:13
at require (WAService.js:1)
at WAService.js:1
at season.js:4
at require (WAService.js:1)
at <anonymous>:35:7
at HTMLScriptElement.scriptLoaded (appservice?t=1567840945601:1184)
at HTMLScriptElement.script.onload (appservice?t=1567840945601:1196)