Compare commits
3 Commits
e8553ea12f
...
bukopin
| Author | SHA1 | Date | |
|---|---|---|---|
| 0abfb5245a | |||
| 5467d91085 | |||
| 1206c4f013 |
@@ -560,7 +560,7 @@ class App extends React.Component {
|
|||||||
<WithdrawDialog />
|
<WithdrawDialog />
|
||||||
|
|
||||||
<div className={classes.root}>
|
<div className={classes.root}>
|
||||||
<AppBar position="fixed">
|
<AppBar style={{ zIndex: 1 }} position="fixed">
|
||||||
<Toolbar className={classes.toolbar}>
|
<Toolbar className={classes.toolbar}>
|
||||||
<div className={classes.sectionMobile}>
|
<div className={classes.sectionMobile}>
|
||||||
<IconButton className={classes.menuButton} color="action" aria-label="Open drawer" onClick={this.toggleDrawerNew(true)}>
|
<IconButton className={classes.menuButton} color="action" aria-label="Open drawer" onClick={this.toggleDrawerNew(true)}>
|
||||||
|
|||||||
@@ -11,9 +11,11 @@
|
|||||||
background-color: white;
|
background-color: white;
|
||||||
border: #ccc 1px solid;
|
border: #ccc 1px solid;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 200px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|||||||
@@ -49,24 +49,34 @@ export default class ModalTopupComponent extends React.Component {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
var rightCode = {}
|
let rightCode = {};
|
||||||
|
|
||||||
codeList.map((cl) => {
|
codeList.map((cl) => {
|
||||||
if (cl.code === code){
|
if (cl.code === code){
|
||||||
rightCode = cl
|
rightCode = cl
|
||||||
this.props.appstate.wallet.data.wallet = this.props.appstate.wallet.data.wallet + cl.amount
|
}}
|
||||||
message.success("Voucher redeem success");
|
)
|
||||||
this.setState({
|
|
||||||
confirmLoading: false
|
this.setState({
|
||||||
});
|
inputCode1: '',
|
||||||
this.state.onOk()
|
inputCode2: '',
|
||||||
}else{
|
inputCode3: '',
|
||||||
this.setState({
|
inputCode4: ''
|
||||||
confirmLoading: false
|
});
|
||||||
});
|
|
||||||
message.warning("Voucher redeem failed")
|
if (rightCode.code){
|
||||||
}
|
message.success("Voucher redeem success");
|
||||||
})
|
this.props.appstate.wallet.data.wallet = this.props.appstate.wallet.data.wallet + rightCode.amount
|
||||||
|
this.setState({
|
||||||
|
confirmLoading: false
|
||||||
|
});
|
||||||
|
this.state.onOk()
|
||||||
|
}else{
|
||||||
|
this.setState({
|
||||||
|
confirmLoading: false
|
||||||
|
});
|
||||||
|
message.warning("Voucher redeem failed")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export class ItemStore extends BaseStore {
|
|||||||
@observable listImages = [];
|
@observable listImages = [];
|
||||||
constructor(context) {
|
constructor(context) {
|
||||||
super(context);
|
super(context);
|
||||||
this.url = "items";
|
this.url = "/categories/11936220-31f7-4f5e-8555-9110dbec4a5d/items";
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export default class Vouchers {
|
|||||||
getList(){
|
getList(){
|
||||||
console.log('res');
|
console.log('res');
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
return this.http.get("items")
|
return this.http.get("categories/11936220-31f7-4f5e-8555-9110dbec4a5d/items")
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.list = res.data;
|
this.list = res.data;
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user