opt: clear space in the reward transfer number

This commit is contained in:
RockYang 2023-09-06 17:09:55 +08:00
parent 92eb67a2af
commit 5e673a9ee0
3 changed files with 11 additions and 6 deletions

View File

@ -8,6 +8,7 @@ import (
"chatplus/utils/resp"
"github.com/gin-gonic/gin"
"gorm.io/gorm"
"strings"
)
type RewardHandler struct {
@ -75,6 +76,9 @@ func (h *RewardHandler) Verify(c *gin.Context) {
return
}
// 移除转账单号中间的空格,防止有人复制的时候多复制了空格
data.TxId = strings.ReplaceAll(data.TxId, " ", "")
var item model.Reward
res := h.db.Where("tx_id = ?", data.TxId).First(&item)
if res.Error != nil {

View File

@ -58,7 +58,7 @@ const save = () => {
ElMessage.success({
message: '核销成功',
duration: 1000,
onClose: () => emits('hide', false)
onClose: () => location.reload()
})
}).catch(e => {
ElMessage.error({message: "核销失败:" + e.message});

View File

@ -235,13 +235,14 @@
title="参与众筹"
>
<el-alert type="info" :closable="false">
<p>您好ChatGPT-Plus 项目目前已经运行了快半年了一直免费给大家使用的然而免费服务始终难以维持服务器即将到期免费的
API KEY 也全部用完了因此我们准备开启众筹模式只需要打赏9.9就可以兑换 100 次对话以此来覆盖我们的 OpenAI
账单和服务器的费用</p>
<div style="font-size: 14px">您好众筹 9.9就可以兑换 100 次对话以此来覆盖我们的 OpenAI
账单和服务器的费用<strong
style="color: #f56c6c">由于本人没有开通微信支付付款后请凭借转账单号进入核销众筹核销菜单手动核销</strong>
</div>
</el-alert>
<p style="text-align: center">
<div style="text-align: center;padding-top: 10px;">
<el-image :src="rewardImg"/>
</p>
</div>
</el-dialog>
</div>