- 注释掉所有 BlankOpen/BlankClose 调用,启动不再关屏 - 将 xset 路径查找改为 init + sync.Once 缓存,避免重复执行 - 清理未使用的 utils 导入 Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
23 lines
388 B
Go
23 lines
388 B
Go
package standby
|
|
|
|
import (
|
|
"context"
|
|
"game-driver/internal/schema"
|
|
"game-driver/pkg/browser"
|
|
|
|
"go.uber.org/zap"
|
|
)
|
|
|
|
func Web(item schema.WaitItemModel) func(c context.Context) error {
|
|
return func(c context.Context) error {
|
|
zap.S().Infoln("打开待机网页")
|
|
|
|
// 控制背光
|
|
// utils.BlankOpen()
|
|
// defer utils.BlankClose()
|
|
|
|
browser.OpenApp(c, item.Data)
|
|
return nil
|
|
}
|
|
}
|