瀏覽代碼

chore: prompt user if redemption code not input

JustSong 2 年之前
父節點
當前提交
1cc7c20183
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      web/src/pages/TopUp/index.js

+ 2 - 1
web/src/pages/TopUp/index.js

@@ -1,6 +1,6 @@
 import React, { useEffect, useState } from 'react';
 import { Button, Form, Grid, Header, Segment, Statistic } from 'semantic-ui-react';
-import { API, showError, showSuccess } from '../../helpers';
+import { API, showError, showInfo, showSuccess } from '../../helpers';
 
 const TopUp = () => {
   const [redemptionCode, setRedemptionCode] = useState('');
@@ -9,6 +9,7 @@ const TopUp = () => {
 
   const topUp = async () => {
     if (redemptionCode === '') {
+      showInfo('请输入充值码!')
       return;
     }
     const res = await API.post('/api/user/topup', {