]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Improve 统一营收格式 (#130)
authorqydysky <qydysky@foxmail.com>
Wed, 11 Dec 2024 13:56:32 +0000 (21:56 +0800)
committerGitHub <noreply@github.com>
Wed, 11 Dec 2024 13:56:32 +0000 (21:56 +0800)
Reply/Reply.go

index 523e225f494128966630cab1b06bbcfd3f835c88..1154b96bebe4a803a5f0b1fa793687a2b7dda16e 100644 (file)
@@ -440,7 +440,7 @@ func (t replyF) user_toast_msg(s string) {
                sh = append(sh, role_name)
        }
        if price != 0 {
-               sh_log = append(sh, "¥", price/1000) //不在界面显示价格
+               sh_log = append(sh, fmt.Sprintf("¥%d", price/1000)) //不在界面显示价格
                t.Common.Danmu_Main_mq.Push_tag(`c.Rev_add`, struct {
                        Roomid int
                        Rev    float64
@@ -1023,7 +1023,7 @@ func (t replyF) super_chat_message(s string) {
        logg := sh
        if price != 0 {
                sh = append(sh, "\n") //界面不显示价格
-               logg = append(logg, "¥", price)
+               logg = append(logg, fmt.Sprintf("¥%d", price))
                t.Common.Danmu_Main_mq.Push_tag(`c.Rev_add`, struct {
                        Roomid int
                        Rev    float64