From 605380ce7079aa156c696d85dc9d38c941bfdbfc Mon Sep 17 00:00:00 2001 From: feny Date: Wed, 7 Aug 2024 09:09:43 +0800 Subject: [PATCH] show third party vip info for who command --- internal/command/user_info.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/command/user_info.go b/internal/command/user_info.go index aecccbc..d941b32 100644 --- a/internal/command/user_info.go +++ b/internal/command/user_info.go @@ -129,7 +129,12 @@ func CmdWho() cli.Command { } activeUser := config.Config.ActiveUser() cloudName := activeUser.GetDriveById(activeUser.ActiveDriveId).DriveName - fmt.Printf("当前帐号UID: %s, 昵称: %s, 用户名: %s, 当前使用网盘:%s\n", activeUser.UserId, activeUser.Nickname, activeUser.AccountName, cloudName) + user, _ := GetActivePanClient().OpenapiPanClient().GetUserInfo() + thirdParty := "未开通" + if user.ThirdPartyVip { + thirdParty = "已开通(" + user.ThirdPartyVipExpire + ")" + } + fmt.Printf("当前帐号UID: %s, 昵称: %s, 三方权益包: %s, 当前使用网盘:%s\n", activeUser.UserId, activeUser.Nickname, thirdParty, cloudName) return nil }, }