Commit ac652260 by wangshuo

提现公众号

parent 7bfbb065
......@@ -18,11 +18,11 @@ class _Scholarship extends Component {
super(props);
this.state = {
un_affirm: 0,
affirm: 0.00,
account: 0.00,
drawCashHtml: false,
drawCashWechat: false,
waitMoneyDetail: false,
codeSrc: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_weixin.png',
codeSrc: '',
dataSource: new ListView.DataSource({
rowHasChanged: (row1, row2) => row1 !== row2,
}),
......@@ -61,15 +61,34 @@ class _Scholarship extends Component {
}
// 提现按钮 根据是否在微信环境中显示提示
drawCash = () => {
if (is_weixin()) {
this.setState({
drawCashWechat: true
});
} else {
this.setState({
drawCashHtml: true,
});
const {hasError, data = {}} = this.props.user;
if(hasError) {
Toast.info("请登录提现!", undefined, undefined, false);
return;
}
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 = () => {
......@@ -197,7 +216,7 @@ class _Scholarship extends Component {
);
const {
un_affirm,
affirm,
account,
drawCashHtml,
drawCashWechat,
waitMoneyDetail,
......@@ -233,7 +252,7 @@ class _Scholarship extends Component {
) : (
<>
<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>
</Flex>
<WhiteSpace></WhiteSpace>
......@@ -347,26 +366,6 @@ class _Scholarship extends Component {
</Flex>
</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
visible={drawCashHtml}
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