Commit 41fa5eff by xuzhenghua

Merge branch 'master' of gitlab.julyedu.com:baiguangyao/mr-julyedu

parents 449af4e9 143b4e37
...@@ -18,11 +18,11 @@ class _Scholarship extends Component { ...@@ -18,11 +18,11 @@ class _Scholarship extends Component {
super(props); super(props);
this.state = { this.state = {
un_affirm: 0, un_affirm: 0,
affirm: 0.00, account: 0.00,
drawCashHtml: false, drawCashHtml: false,
drawCashWechat: false, drawCashWechat: false,
waitMoneyDetail: false, waitMoneyDetail: false,
codeSrc: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_weixin.png', codeSrc: '',
dataSource: new ListView.DataSource({ dataSource: new ListView.DataSource({
rowHasChanged: (row1, row2) => row1 !== row2, rowHasChanged: (row1, row2) => row1 !== row2,
}), }),
...@@ -61,15 +61,34 @@ class _Scholarship extends Component { ...@@ -61,15 +61,34 @@ class _Scholarship extends Component {
} }
// 提现按钮 根据是否在微信环境中显示提示 // 提现按钮 根据是否在微信环境中显示提示
drawCash = () => { drawCash = () => {
if (is_weixin()) { const {hasError, data = {}} = this.props.user;
this.setState({ if(hasError) {
drawCashWechat: true Toast.info("请登录提现!", undefined, undefined, false);
}); return;
} else {
this.setState({
drawCashHtml: true,
});
} }
http.get(`${API['base-api']}/wx/user_temporary_qrcode/${data.uid}`).then(res => {
console.log(res)
if(res.data.errno === 0) {
if (is_weixin()) {
this.setState({
drawCashWechat: true,
codeSrc: res.data.data.qr_image
});
} else {
this.setState({
drawCashHtml: true,
codeSrc: res.data.data.qr_image
});
}
}else{
Toast.info(res.data.data.msg, 2);
}
});
}; };
// 去登陆 // 去登陆
toLogin = () => { toLogin = () => {
...@@ -197,7 +216,7 @@ class _Scholarship extends Component { ...@@ -197,7 +216,7 @@ class _Scholarship extends Component {
); );
const { const {
un_affirm, un_affirm,
affirm, account,
drawCashHtml, drawCashHtml,
drawCashWechat, drawCashWechat,
waitMoneyDetail, waitMoneyDetail,
...@@ -233,7 +252,7 @@ class _Scholarship extends Component { ...@@ -233,7 +252,7 @@ class _Scholarship extends Component {
) : ( ) : (
<> <>
<Flex justify='center' align='baseline' style={{ height: '20px', lineHeight: '20px' }}> <Flex justify='center' align='baseline' style={{ height: '20px', lineHeight: '20px' }}>
<span className={'common-ft-25'}>{affirm}</span> <span className={'common-ft-25'}>{account}</span>
<span className={'common-ft-15'}></span> <span className={'common-ft-15'}></span>
</Flex> </Flex>
<WhiteSpace></WhiteSpace> <WhiteSpace></WhiteSpace>
...@@ -347,26 +366,6 @@ class _Scholarship extends Component { ...@@ -347,26 +366,6 @@ class _Scholarship extends Component {
</Flex> </Flex>
</Modal> </Modal>
{/* <Modal
visible={drawCashHtml}
transparent
maskClosable={true}
onClose={this.closeModal}
title="提现"
footer={[
{ text: '取消', onPress: () => { this.closeModal() } },
{ text: '保存二维码', onPress: () => { this.saveImage() } }
]}
style={{ width: '300px' }}
>
<p style={{ fontSize: '13px', color: '#666666' }}>
提现金额将通过微信零钱转账给您,请微信扫码关注【七月在线】服务号后申请提现。
</p>
<WhiteSpace size='sm'></WhiteSpace>
<Flex justify='center'>
<img src={codeSrc} style={{ width: '90px', height: '90px' }} alt="二维码" />
</Flex>
</Modal> */}
<Modal <Modal
visible={drawCashHtml} visible={drawCashHtml}
transparent transparent
......
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 to comment