mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
43 lines
1021 B
JavaScript
43 lines
1021 B
JavaScript
import base from './base.js'
|
|
import config from './index.js'
|
|
import cfg from '../../../lib/config/config.js'
|
|
|
|
export default class Help extends base {
|
|
constructor (e) {
|
|
super(e)
|
|
this.model = 'help'
|
|
}
|
|
|
|
static async get (e) {
|
|
let html = new Help(e)
|
|
return await html.getData()
|
|
}
|
|
|
|
async getData () {
|
|
let helpData = config.getConfig('help')
|
|
|
|
let groupCfg = cfg.getGroup(this.group_id)
|
|
|
|
if (groupCfg.disable && groupCfg.disable.length) {
|
|
helpData.map((item) => {
|
|
if (groupCfg.disable.includes(item.group)) {
|
|
item.disable = true
|
|
}
|
|
return item
|
|
})
|
|
}
|
|
|
|
let versionData = config.getConfig('version')
|
|
|
|
const version =
|
|
(versionData && versionData.length && versionData[0].version) || '1.0.0'
|
|
|
|
return {
|
|
...this.screenData,
|
|
saveId: 'help',
|
|
version,
|
|
helpData
|
|
}
|
|
}
|
|
}
|