If you do something happily, you do it with feelings of pleasure.
Albert leaned back happily and lit a cigarette.
艾伯特开心地向后斜靠着,点着了一支香烟。
If you say that you will happily do something, you mean that you are very willing to do it.
If I've caused any offence over something I have written, I will happily apologize.
如果我的文字有冒犯他人之处,我将很乐意道歉。
You can add happily to a statement to indicate that you are glad that something happened.
Happily, his neck injuries were not serious.
幸运的是,他脖子上的伤并不严重。