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)=> {
|
||||
console.log(res)
|
||||
console.log(errCb);
|
||||
if (res.code == 200) {
|
||||
cb(res.data,res.msg)
|
||||
} else {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import ReactDOM from 'react-dom';
|
||||
import React, { Component } from 'react';
|
||||
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 { Switch } from 'zent';
|
||||
import "../../../assets/comm.css"
|
||||
|
@ -10,7 +10,7 @@ import Grid from "../../../components/gird/main.js"
|
|||
import TabPage from "../../../components/tabPage/main.js"
|
||||
import Filterbar from "../../../components/filterbar/main.js"
|
||||
import menu from "../../../assets/enum.js"
|
||||
import {getCodesList} from "../../../assets/api.js"
|
||||
import {getCodesList,handelResponse} from "../../../assets/api.js"
|
||||
const Column = [
|
||||
{
|
||||
title: '兑换码-批次ID',
|
||||
|
@ -203,12 +203,16 @@ export default class acclist extends React.Component{
|
|||
let _self=this;
|
||||
let data={key_batch_id:93}
|
||||
getCodesList(data).then(res=>{
|
||||
const codeList_data=res.data.data;
|
||||
const {total}=res.data;
|
||||
_self.setState({codeList:codeList_data});
|
||||
_self.setState({total:8});
|
||||
}).catch(err=>{
|
||||
console.log('err',err);
|
||||
handelResponse(res,(response,msg)=>{
|
||||
const codeList_data=response.data;
|
||||
const {total}=response;
|
||||
_self.setState({codeList:codeList_data,total});
|
||||
Notify.clear();
|
||||
Notify.success(msg);
|
||||
},(err)=>{
|
||||
|
||||
})
|
||||
}).catch(err=>{
|
||||
});
|
||||
}
|
||||
componentWillMount(){
|
||||
|
|
Loading…
Reference in New Issue