Commit 584bb827 by wangshuo

用户账户接口调试

parent adc1bc16
......@@ -7,15 +7,13 @@ import SortItem from './SortItem/SortItem.js';
import { connect } from 'react-redux';
const Item = List.Item;
const Brief = Item.Brief;
class _Scholarship extends Component {
constructor(props) {
super(props);
this.state = {
waitMoney: 0,
cash: 123.45,
listType: 0,
un_affirm: 0,
affirm: 0.00,
drawCashHtml: false,
drawCashWechat: false,
waitMoneyDetail: false,
......@@ -38,13 +36,6 @@ class _Scholarship extends Component {
{ title: '课程列表', sub: '1' },
{ title: '分销榜单', sub: '2' },
];
// 切换tab页签的时候触发
// changeTab = (tab, listType) => {
// this.setState({
// listType
// });
// this.onEndReached();
// }
// 返回上一页
goback = () => {
this.props.history.push('/my');
......@@ -101,7 +92,6 @@ class _Scholarship extends Component {
if (this.tabIndex === 1) { apiUrl = `${api.home}/m/dist/commission_ranking_list` };
http.get(apiUrl).then((res) => {
console.log(res);
if (res.data.code !== 200) {
this.setState({ isLoading: false });
return;
......@@ -143,6 +133,13 @@ class _Scholarship extends Component {
} else {
document.body.style.overflow = 'hidden';
}
http.get(`${api.home}/m/user_account`).then(res=>{
if(res.data.code === 200) {
this.setState({
...res.data.data
});
}
});
this.onEndReached();
}
render() {
......@@ -166,9 +163,8 @@ class _Scholarship extends Component {
</div>
);
const {
waitMoney,
cash,
listType,
un_affirm,
affirm,
drawCashHtml,
drawCashWechat,
waitMoneyDetail,
......@@ -204,7 +200,7 @@ class _Scholarship extends Component {
) : (
<>
<Flex justify='center' align='baseline' style={{ height: '20px', lineHeight: '20px' }}>
<span className={'common-ft-25'}>{cash}</span>
<span className={'common-ft-25'}>{affirm}</span>
<span className={'common-ft-15'}></span>
</Flex>
<WhiteSpace></WhiteSpace>
......@@ -229,7 +225,7 @@ class _Scholarship extends Component {
>
<Flex direction='row' justify='between'>
<span className={'common-ft-15'}>待确认金额</span>
<span className={'money'}>{waitMoney}</span>
<span className={'money'}>{un_affirm}</span>
</Flex>
</Item>
</List>
......@@ -337,7 +333,6 @@ class _Scholarship extends Component {
<Flex justify='center'>
<img src={codeSrc} style={{ width: '90px', height: '90px' }} alt="二维码" />
</Flex>
{/* <a crossOrigin='true' href={codeSrc} download='七月在线服务号' onClick={(e)=>{console.log(e)}} ref={this.downImage} ></a> */}
</Modal>
<Modal
......
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