Commit 584bb827 by wangshuo

用户账户接口调试

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