From dd09baa75a1f24d7e9e28bf912f9755a91161193 Mon Sep 17 00:00:00 2001
From: HXY <2479895356@qq.com>
Date: Tue, 8 Aug 2023 16:26:01 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B3=A8=E5=86=8C=E8=B5=A0?=
=?UTF-8?q?=E9=80=81bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
internal/dao/jinzhu/user.go | 7 ++++---
internal/servants/web/alipay.go | 2 +-
web/src/components/compose.vue | 6 +++---
web/src/router/index.ts | 2 +-
web/src/views/User.vue | 22 +++++++++++-----------
web/src/views/Wallet.vue | 2 +-
6 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/internal/dao/jinzhu/user.go b/internal/dao/jinzhu/user.go
index d6f2691a..18df1ec5 100644
--- a/internal/dao/jinzhu/user.go
+++ b/internal/dao/jinzhu/user.go
@@ -80,7 +80,7 @@ func (s *userManageSrv) UpdateUser(user *ms.User) error {
//获取用户的账单,判断是否赠送过
bills, err := (&dbr.WalletStatement{}).List(tx, &dbr.ConditionsT{
"user_id = ?": user.ID,
- "reason = ?": "手机号绑定赠送",
+ "reason = ?": "注册赠送",
}, 0, 1)
if err != nil {
return err
@@ -103,7 +103,8 @@ func (s *userManageSrv) UpdateUser(user *ms.User) error {
//获取当前时间戳并加上14天
user.Balance = time.Now().Unix() + 1209600
} else {
- user.Balance = oldUser.Balance + user.Balance
+ //更新当前用户的balance时间戳,增加14天
+ user.Balance = oldUser.Balance + 1209600
}
err = user.Update(s.db)
@@ -116,7 +117,7 @@ func (s *userManageSrv) UpdateUser(user *ms.User) error {
UserID: user.ID,
ChangeAmount: 1400,
BalanceSnapshot: user.Balance,
- Reason: "手机号绑定赠送",
+ Reason: "注册赠送",
}).Error; err != nil {
return err
}
diff --git a/internal/servants/web/alipay.go b/internal/servants/web/alipay.go
index e86f127e..0cc36926 100644
--- a/internal/servants/web/alipay.go
+++ b/internal/servants/web/alipay.go
@@ -97,7 +97,7 @@ func (s *alipayPrivSrv) UserRechargeLink(req *web.UserRechargeLinkReq) (*web.Use
p.TotalAmount = fmt.Sprintf("%.2f", float64(recharge.Amount)/100.0*a)
p.NotifyURL = "https://" + req.Host + "/v1/alipay/notify"
//支付宝回调,如果是内网环境的话,需要增加内网穿透
- //p.NotifyURL = "http://uszkjc.natappfree.cc/v1/alipay/notify"
+ //p.NotifyURL = "http://bgqsmb.natappfree.cc/v1/alipay/notify"
rsp, err := s.alipayClient.TradePreCreate(p)
if err != nil {
logrus.Errorf("client.TradePreCreate err: %v\n", err)
diff --git a/web/src/components/compose.vue b/web/src/components/compose.vue
index 49963152..8b009c42 100644
--- a/web/src/components/compose.vue
+++ b/web/src/components/compose.vue
@@ -20,7 +20,7 @@
:options="optionsRef"
@search="handleSearch"
@update:value="changeContent"
- placeholder="讲讲今天和AI聊的工具吧"
+ placeholder="讲讲今天和AiMo AI聊天的新发现吧"
/>
@@ -147,7 +147,7 @@
-