2022-08-18 10:13:42 +00:00
|
|
|
import Cfg from './Cfg.js'
|
2023-03-08 21:29:30 +00:00
|
|
|
import Render from './common/Render.js'
|
2022-05-22 13:10:10 +00:00
|
|
|
|
2022-11-15 20:07:21 +00:00
|
|
|
const Common = {
|
2023-11-06 19:52:55 +00:00
|
|
|
render: async function (arg1, arg2, arg3, arg4) {
|
|
|
|
if (arguments.length === 4 && typeof (arguments[1]) === 'string') {
|
|
|
|
return Render.render(arg2, arg3, {
|
|
|
|
...arg4,
|
|
|
|
plugin: arg1
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
return Render.render(arg1, arg2, arg3)
|
|
|
|
}
|
|
|
|
},
|
2022-05-22 13:10:10 +00:00
|
|
|
cfg: Cfg.get,
|
2022-11-15 20:07:21 +00:00
|
|
|
sleep (ms) {
|
|
|
|
return new Promise((resolve) => setTimeout(resolve, ms))
|
|
|
|
},
|
|
|
|
|
2023-02-26 15:42:56 +00:00
|
|
|
async downFile () {
|
|
|
|
console.log('down file')
|
2022-11-15 20:07:21 +00:00
|
|
|
}
|
2023-06-03 12:31:13 +00:00
|
|
|
|
2022-07-23 20:32:10 +00:00
|
|
|
}
|
2022-11-15 20:07:21 +00:00
|
|
|
|
|
|
|
export default Common
|