mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 08:09:19 +00:00
28 lines
666 B
JavaScript
28 lines
666 B
JavaScript
export default class base {
|
|
constructor (e = {}) {
|
|
this.e = e
|
|
this.userId = e?.user_id
|
|
this.model = 'rconsole-plugin'
|
|
this._path = process.cwd().replace(/\\/g, '/')
|
|
}
|
|
|
|
get prefix () {
|
|
return `Yz:rconsole-plugin:${this.model}:`
|
|
}
|
|
|
|
/**
|
|
* 截图默认数据
|
|
* @param saveId html保存id
|
|
* @param tplFile 模板html路径
|
|
* @param pluResPath 插件资源路径
|
|
*/
|
|
get screenData () {
|
|
return {
|
|
saveId: this.userId,
|
|
tplFile: `./plugins/rconsole-plugin/resources/html/${this.model}/${this.model}.html`,
|
|
/** 绝对路径 */
|
|
pluResPath: `${this._path}/plugins/rconsole-plugin/resources/`
|
|
}
|
|
}
|
|
}
|