Bug fix
This commit is contained in:
BIN
src/assets/a_web.png
Normal file
BIN
src/assets/a_web.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -15,7 +15,7 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
font-size: 0.6rem;
|
||||
font-size: 0.8rem;
|
||||
color: @hint-color;
|
||||
|
||||
:global {
|
||||
|
||||
@@ -11,6 +11,7 @@ export default {
|
||||
// baseURL: 'http://yapi.faronear.org/mock/20/v1',
|
||||
linkAndroid: 'https://fivhome.github.io/app/fiv.apk',
|
||||
linkIOS: 'https://fivapp.github.io',
|
||||
linkWeb: 'https://fivapp.github.io',
|
||||
linkTelegram: 'https://t.me/fivhome',
|
||||
linkEmail: 'team-fiv@outlook.com',
|
||||
};
|
||||
|
||||
@@ -65,6 +65,7 @@ export default {
|
||||
'home.mine.status0': 'Pending',
|
||||
'home.mine.status1': 'Mining',
|
||||
'home.mine.status2': 'Exhausted',
|
||||
'home.mine.none': '还没有收益,快去获取矿晶吧',
|
||||
|
||||
'home.fund.total': 'Total',
|
||||
'home.fund.totalVIC': 'VIC Balance: ',
|
||||
@@ -114,6 +115,7 @@ export default {
|
||||
'draw.draw': 'Withdraw',
|
||||
'draw.qrPrompt': 'Please install App to scan QR code',
|
||||
'draw.qrError': 'Scanning QR code fails',
|
||||
'draw.coin': '请选择提币币种',
|
||||
'draw.targetPrompt': 'Please input destination address',
|
||||
'draw.amountLt': 'Withdrawal amount can\'t be less than 10000',
|
||||
'draw.amountGt': 'Withdrawal amount exceeds your balance',
|
||||
|
||||
@@ -65,6 +65,7 @@ export default {
|
||||
'home.mine.status0': '等待确认',
|
||||
'home.mine.status1': '正在挖矿',
|
||||
'home.mine.status2': '已耗尽能源',
|
||||
'home.mine.none': '还没有收益,快去获取矿晶吧',
|
||||
|
||||
'home.fund.total': '总资金',
|
||||
'home.fund.totalVIC': '当前VIC余额:',
|
||||
@@ -114,6 +115,7 @@ export default {
|
||||
'draw.draw': '提币',
|
||||
'draw.qrPrompt': '请安装 App 扫描二维码',
|
||||
'draw.qrError': '扫描二维码错误',
|
||||
'draw.coin': '请选择提币币种',
|
||||
'draw.targetPrompt': '请填写目标地址',
|
||||
'draw.amountLt': '提币金额最低1000起',
|
||||
'draw.amountGt': '提币金额超出余额',
|
||||
|
||||
@@ -13,17 +13,19 @@ import config from '@/config';
|
||||
import logo from '@/assets/bg_login.png';
|
||||
import pAndroid from '@/assets/a_android.png';
|
||||
import pIOS from '@/assets/a_ios.png';
|
||||
import pWeb from '@/assets/a_web.png';
|
||||
import pTelegram from '@/assets/a_telegram.png';
|
||||
|
||||
import styles from './style.less';
|
||||
|
||||
const AboutPage: React.FC = () => {
|
||||
const [info, setInfo] = useState('');
|
||||
const [title, setTitle] = useState('');
|
||||
|
||||
const showInfo = (
|
||||
<Modal
|
||||
visible={Boolean(info)}
|
||||
title={formatMessage({ id: 'common.prompt' })}
|
||||
title={title}
|
||||
footer={null}
|
||||
onCancel={() => setInfo('')}
|
||||
>
|
||||
@@ -49,19 +51,47 @@ const AboutPage: React.FC = () => {
|
||||
<span className="app-desc">{formatMessage({ id: 'about.desc' })}</span>
|
||||
|
||||
<div className={styles.content}>
|
||||
{(config.linkAndroid || config.linkIOS) && (
|
||||
{(config.linkAndroid || config.linkIOS || config.linkWeb) && (
|
||||
<div className="section">
|
||||
<span className="title">{formatMessage({ id: 'about.appTitle' })}</span>
|
||||
<span className="desc">{formatMessage({ id: 'about.appDesc' })}</span>
|
||||
<div className="icon-list">
|
||||
{config.linkAndroid && <div className="icon-item" onClick={() => setInfo(config.linkAndroid)}>
|
||||
<div className="icon-icon"><FittedImage src={pAndroid} /></div>
|
||||
<span className="icon-name">Android</span>
|
||||
</div>}
|
||||
{config.linkIOS && <div className="icon-item" onClick={() => setInfo(config.linkIOS)}>
|
||||
<div className="icon-icon"><FittedImage src={pIOS} /></div>
|
||||
<span className="icon-name">iOS</span>
|
||||
</div>}
|
||||
{config.linkAndroid && (
|
||||
<div
|
||||
className="icon-item"
|
||||
onClick={() => {
|
||||
setInfo(config.linkAndroid);
|
||||
setTitle('Android');
|
||||
}}
|
||||
>
|
||||
<div className="icon-icon"><FittedImage src={pAndroid} /></div>
|
||||
<span className="icon-name">Android</span>
|
||||
</div>
|
||||
)}
|
||||
{config.linkIOS && (
|
||||
<div
|
||||
className="icon-item"
|
||||
onClick={() => {
|
||||
setInfo(config.linkIOS);
|
||||
setTitle('iOS');
|
||||
}}
|
||||
>
|
||||
<div className="icon-icon"><FittedImage src={pIOS} /></div>
|
||||
<span className="icon-name">iOS</span>
|
||||
</div>
|
||||
)}
|
||||
{config.linkWeb && (
|
||||
<div
|
||||
className="icon-item"
|
||||
onClick={() => {
|
||||
setInfo(config.linkWeb);
|
||||
setTitle('Web');
|
||||
}}
|
||||
>
|
||||
<div className="icon-icon"><FittedImage src={pWeb} /></div>
|
||||
<span className="icon-name">Web</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
@@ -70,7 +100,13 @@ const AboutPage: React.FC = () => {
|
||||
<span className="title">{formatMessage({ id: 'about.comTitle' })}</span>
|
||||
<span className="desc">{formatMessage({ id: 'about.comDesc' })}</span>
|
||||
<div className="icon-list">
|
||||
<div className="icon-item" onClick={() => setInfo(config.linkTelegram)}>
|
||||
<div
|
||||
className="icon-item"
|
||||
onClick={() => {
|
||||
setInfo(config.linkTelegram);
|
||||
setTitle('Telegram');
|
||||
}}
|
||||
>
|
||||
<div className="icon-icon"><FittedImage src={pTelegram} /></div>
|
||||
<span className="icon-name">Telegram</span>
|
||||
</div>
|
||||
|
||||
@@ -157,7 +157,7 @@ const model: Model = {
|
||||
if (!verifyCode) return message.warn(formatMessage({ id: 'check.msgCode' }));
|
||||
if (!validPwd(password)) return message.warn(formatMessage({ id: 'check.msgPwd' }));
|
||||
if (password !== pwdConfirm) return message.warn(formatMessage({ id: 'check.msgConfirm' }));
|
||||
// if (!inviter) return message.warn(formatMessage({ id: 'check.msgInviter' }));
|
||||
if (!inviter) return message.warn(formatMessage({ id: 'check.msgInviter' }));
|
||||
|
||||
yield put({ type: 'onUpdateState', submitting: true });
|
||||
try {
|
||||
|
||||
@@ -113,17 +113,16 @@ const model: Model = {
|
||||
address,
|
||||
balance,
|
||||
} = (yield select((state: any) => state.draw)) as DrawModelState;
|
||||
if (!coin || !balance) return;
|
||||
if (!coin) return message.warn(formatMessage({ id: 'draw.coin' }));
|
||||
if (!address) return message.warn(formatMessage({ id: 'draw.targetPrompt' }));
|
||||
const inputAmount = new BigNumber(amount || 0);
|
||||
if (inputAmount.lt(1000)) return message.warn(formatMessage({ id: 'draw.amountLt' }));
|
||||
if (inputAmount.gt(balance)) return message.warn(formatMessage({ id: 'draw.amountGt' }));
|
||||
if (inputAmount.gt(balance || 0)) return message.warn(formatMessage({ id: 'draw.amountGt' }));
|
||||
yield put({
|
||||
type: 'onUpdateState',
|
||||
confirmVisible: true,
|
||||
confirmLoading: false,
|
||||
password: '',
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
*draw(_, { put, select, call }) {
|
||||
|
||||
@@ -75,6 +75,25 @@ const MinePage: React.FC<HomeMineModelState & DispatchProp> = ({
|
||||
</div>
|
||||
);
|
||||
|
||||
let body;
|
||||
if (data) {
|
||||
if (data.length) {
|
||||
body = data.map(renderItem);
|
||||
} else {
|
||||
body = (
|
||||
<div className={styles.message}>
|
||||
{formatMessage({ id: 'home.mine.none' })}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
} else {
|
||||
body = (
|
||||
<div className={styles.message}>
|
||||
{formatMessage({ id: errorList ? 'common.loadError' : 'common.loading' })}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
{renderBanner}
|
||||
@@ -87,11 +106,7 @@ const MinePage: React.FC<HomeMineModelState & DispatchProp> = ({
|
||||
</div>
|
||||
|
||||
<Spin className={styles.list} spinning={refreshingList}>
|
||||
{!data ? (
|
||||
<div className={styles.message}>
|
||||
{formatMessage({ id: errorList ? 'common.loadError' : 'common.loading' })}
|
||||
</div>
|
||||
) : data.map(renderItem)}
|
||||
{body}
|
||||
</Spin>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -43,18 +43,18 @@ const FundPage: React.FC<HomeFundModelState & DispatchProp> = ({
|
||||
<div className="bg" />
|
||||
<span className="title">{formatMessage({ id: 'home.fund.total' })}</span>
|
||||
<span className="content">
|
||||
<span className="large">{info ? info.sum : 0}</span>
|
||||
<span className="large">{info ? (info.sum || 0) : 0}</span>
|
||||
VIC
|
||||
</span>
|
||||
<div className={styles.card}>
|
||||
<div className="left">
|
||||
<span className="line">
|
||||
<span className="title2">{formatMessage({ id: 'home.fund.totalVIC' })}</span>
|
||||
<span className="value">+{info ? info.vic : 0} VIC</span>
|
||||
<span className="value">+{info ? (info.vic || 0) : 0} VIC</span>
|
||||
</span>
|
||||
<span className="line">
|
||||
<span className="title2">{formatMessage({ id: 'home.fund.totalUSDT' })}</span>
|
||||
<span className="value">+{info ? info.usdt : 0} USDT</span>
|
||||
<span className="value">+{info ? (info.usdt || 0) : 0} USDT</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -30,18 +30,18 @@ const tabItems: TabItemModels = [
|
||||
icon: estateIcon,
|
||||
iconSelected: estateIconS,
|
||||
},
|
||||
{
|
||||
key: '/home/fund',
|
||||
name: 'home.tabFund',
|
||||
icon: fundIcon,
|
||||
iconSelected: fundIconS,
|
||||
},
|
||||
{
|
||||
key: '/home/market',
|
||||
name: 'home.tabMarket',
|
||||
icon: marketIcon,
|
||||
iconSelected: marketIconS,
|
||||
},
|
||||
{
|
||||
key: '/home/fund',
|
||||
name: 'home.tabFund',
|
||||
icon: fundIcon,
|
||||
iconSelected: fundIconS,
|
||||
},
|
||||
{
|
||||
key: '/home/profile',
|
||||
name: 'home.tabProfile',
|
||||
|
||||
@@ -44,12 +44,13 @@ const model: Model = {
|
||||
submitting,
|
||||
} = (yield select((state: any) => state.lgpwd)) as LgpwdModelState;
|
||||
if (submitting) return;
|
||||
if (!origin) return message.warn(formatMessage({ id: 'lgpwd.originPrompt' }))
|
||||
if (!validPwd(newPwd)) return message.warn(formatMessage({ id: 'check.msgPwd' }));
|
||||
if (confirm !== newPwd) return message.warn(formatMessage({ id: 'check.msgConfirm' }));
|
||||
yield put({ type: 'onUpdateState', submitting: true });
|
||||
try {
|
||||
yield call(changeLgpwd, newPwd, origin);
|
||||
yield put(routerRedux.goBack());
|
||||
yield put({ type: 'user/logout' });
|
||||
message.success(formatMessage({ id: 'lgpwd.success' }));
|
||||
} catch (e) {
|
||||
message.error(e.message);
|
||||
|
||||
Reference in New Issue
Block a user