From d92607d816245468190de7b4c2388f691f991512 Mon Sep 17 00:00:00 2001 From: wangfuduo Date: Mon, 13 Jul 2026 17:58:17 +0800 Subject: [PATCH] fix: user payment count check --- app/api/service/user.go | 4 ++-- base/config/code.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/api/service/user.go b/app/api/service/user.go index bbdfd14..53b9286 100644 --- a/app/api/service/user.go +++ b/app/api/service/user.go @@ -98,11 +98,11 @@ func (u *User) VipCheck() *response.Response { // 首次支付使用 ServiceFirstPayWay,后续使用 ServicePayWay payWayKey := config.ServicePayWay - if u.sess.GetUserInfo().VipCreateTime == 0 { + if u.sess.GetUserInfo().VipExpireTime == 0 { payWayKey = config.ServiceFirstPayWay } - if u.params[payWayKey] == config.FirstRechargeByCoupon { + if u.params[payWayKey] == config.RechargeByCoupon { resp.Message(u.params.Str(config.ServerCouponNotice)). Button(NewButton(u.params).CouponButton()...) } else { diff --git a/base/config/code.go b/base/config/code.go index 66eb453..6786800 100644 --- a/base/config/code.go +++ b/base/config/code.go @@ -13,7 +13,7 @@ const ( ) const ( - FirstRechargeByCoupon = "coupon" + RechargeByCoupon = "coupon" ) const (