在关闭浏览器而不刷新时注销用户
postrotate
/usr/lib/newlog/new > /dev/null 2>&1 || true
BUCKET=logging-bucket
INSTANCE_ID=`curl --silent http://169.254.169.254/latest/meta-data/instance-id | sed -e "s/i-//"`
/usr/bin/s3cmd -m text/plain sync /var/log/messages-* s3://${BUCKET}/${INSTANCE_ID}/var/log/
endscript
@HostListener('window:beforeunload', [ '$event' ])
unloadHandler(event) {
this.logout()
}
我使用它,它可以工作,但用户也注销刷新浏览器
答案 0 :(得分:0)
在您的app.component.ts
中在构造函数()之前添加
project.Binaries = new[]
{
new Binary(new Id("StartAdmin"), "xxx.exe")
};
project.Actions = new WixSharp.Action[]
{
new BinaryFileAction("StartAdmin", "Executing ...", Return.check, When.After, Step.InstallExecute, Condition.NOT_Installed)
{
Execute = Execute.commit
}