import Utils from '../utils/Utils'
import BaseDirective from './BaseDirective'
class HomePageDirective extends BaseDirective {
static name = "返回首页"
match () {
const {text} = this
if(/首页/.test(text)) {
return true
}
return false
}
async excute ({
sendMsg = function() {}
}) {
if(!window.globalConfig.homepage) {
return sendMsg("没有配置首页")
}
Utils.openMenu({url : window.globalConfig.homepage})
return sendMsg("返回首页成功")
}
}
export default HomePageDirective
-
xuchaozou authored4effee3c