update
This commit is contained in:
parent
9870609868
commit
de0a2da400
|
@ -29,7 +29,7 @@ const req = (method, url, params, responseType) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const handelResponse=(res, cb, errCb)=> {
|
export const handelResponse=(res, cb, errCb)=> {
|
||||||
console.log(res)
|
console.log(errCb);
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
cb(res.data,res.msg)
|
cb(res.data,res.msg)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { Button,Tag,Sweetalert,CombinedDateRangePicker} from 'zent';
|
import { Button,Tag,Sweetalert,CombinedDateRangePicker,Notify} from 'zent';
|
||||||
import "./list.less"
|
import "./list.less"
|
||||||
import { Switch } from 'zent';
|
import { Switch } from 'zent';
|
||||||
import "../../../assets/comm.css"
|
import "../../../assets/comm.css"
|
||||||
|
@ -10,7 +10,7 @@ import Grid from "../../../components/gird/main.js"
|
||||||
import TabPage from "../../../components/tabPage/main.js"
|
import TabPage from "../../../components/tabPage/main.js"
|
||||||
import Filterbar from "../../../components/filterbar/main.js"
|
import Filterbar from "../../../components/filterbar/main.js"
|
||||||
import menu from "../../../assets/enum.js"
|
import menu from "../../../assets/enum.js"
|
||||||
import {getCodesList} from "../../../assets/api.js"
|
import {getCodesList,handelResponse} from "../../../assets/api.js"
|
||||||
const Column = [
|
const Column = [
|
||||||
{
|
{
|
||||||
title: '兑换码-批次ID',
|
title: '兑换码-批次ID',
|
||||||
|
@ -203,12 +203,16 @@ export default class acclist extends React.Component{
|
||||||
let _self=this;
|
let _self=this;
|
||||||
let data={key_batch_id:93}
|
let data={key_batch_id:93}
|
||||||
getCodesList(data).then(res=>{
|
getCodesList(data).then(res=>{
|
||||||
const codeList_data=res.data.data;
|
handelResponse(res,(response,msg)=>{
|
||||||
const {total}=res.data;
|
const codeList_data=response.data;
|
||||||
_self.setState({codeList:codeList_data});
|
const {total}=response;
|
||||||
_self.setState({total:8});
|
_self.setState({codeList:codeList_data,total});
|
||||||
}).catch(err=>{
|
Notify.clear();
|
||||||
console.log('err',err);
|
Notify.success(msg);
|
||||||
|
},(err)=>{
|
||||||
|
|
||||||
|
})
|
||||||
|
}).catch(err=>{
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
componentWillMount(){
|
componentWillMount(){
|
||||||
|
|
Loading…
Reference in New Issue