Commit f005d2dc by Seefs Committed by GitHub

Merge pull request #1977 from QuantumNous/fix/bills

 fix(topup): prevent nil-pointer in Epay callback; reset page on search
parents e74d8b99 33aeaf7b
...@@ -237,8 +237,8 @@ func EpayNotify(c *gin.Context) { ...@@ -237,8 +237,8 @@ func EpayNotify(c *gin.Context) {
_, err := c.Writer.Write([]byte("fail")) _, err := c.Writer.Write([]byte("fail"))
if err != nil { if err != nil {
log.Println("易支付回调写入失败") log.Println("易支付回调写入失败")
return
} }
return
} }
verifyInfo, err := client.Verify(params) verifyInfo, err := client.Verify(params)
if err == nil && verifyInfo.VerifyStatus { if err == nil && verifyInfo.VerifyStatus {
......
...@@ -102,6 +102,11 @@ const TopupHistoryModal = ({ visible, onCancel, t }) => { ...@@ -102,6 +102,11 @@ const TopupHistoryModal = ({ visible, onCancel, t }) => {
setPage(1); setPage(1);
}; };
const handleKeywordChange = (value) => {
setKeyword(value);
setPage(1);
};
// 管理员补单 // 管理员补单
const handleAdminComplete = async (tradeNo) => { const handleAdminComplete = async (tradeNo) => {
try { try {
...@@ -231,7 +236,7 @@ const TopupHistoryModal = ({ visible, onCancel, t }) => { ...@@ -231,7 +236,7 @@ const TopupHistoryModal = ({ visible, onCancel, t }) => {
prefix={<IconSearch />} prefix={<IconSearch />}
placeholder={t('订单号')} placeholder={t('订单号')}
value={keyword} value={keyword}
onChange={setKeyword} onChange={handleKeywordChange}
showClear showClear
/> />
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment