1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/rainbond-rainbond-ui

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
PayMoneyTip.js 1.5 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
songyg Отправлено 3 лет назад c91b2bd
import React, {Fragment} from 'react';
import { formatMessage, FormattedMessage } from 'umi-plugin-locale';
import globalUtil from '../utils/global';
import {Layout, Icon, message, notification, Modal, Button} from 'antd';
//提示充值
export default class PayMoneyTip extends React.PureComponent {
handleCancel = () => {
this.props.dispatch({
type: 'global/hideNoMoneyTip'
})
}
handleClick = () => {
window.open('https://www.goodrain.com/spa/#/personalCenter/my/recharge')
this.handleCancel();
}
getRegionId = () => {
var regionName = globalUtil.getCurrRegionName();
let regionId = '';
if(regionName == 'ali-hz') {
regionId = 2;
}
if(regionName == 'ali-sh'){
regionId = 1;
}
return regionId;
}
handleBuySource = () => {
const regionId = this.getRegionId();
if(regionId){
window.open(`https://www.goodrain.com/spa/#/resBuy/${regionId}`)
}else{
notification.warning({message: formatMessage({id:'notification.warn.purchase'})})
}
this.handleCancel();
}
componentDidMount(){
}
render(){
const regionId = this.getRegionId();
return <Modal
visible={true}
title="提示"
onCancel={this.handleCancel}
footer={[<Button onClick={this.handleClick} size="sm">去充值</Button>]}
>
<h4 style={{textAlign: 'center'}}>企业账户余额不足</h4>
</Modal>;
}
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://gitlife.ru/oschina-mirror/rainbond-rainbond-ui.git
git@gitlife.ru:oschina-mirror/rainbond-rainbond-ui.git
oschina-mirror
rainbond-rainbond-ui
rainbond-rainbond-ui
main