Axios点击按钮查询

写个button按钮,然后绑定点击事件(@click=“ListCases”)


//查询按钮
ListCases (num,userPermission){
    //console. log("num is:" , num)
    let this = _this;
    _this. isLoading = true;
    _this .pageNo = num;
    let userName = this . $Global . getCookie( ' username ' );
    this $axios . post( '/url' ,{
        pageNum:_ this . pageNo,
        pageSize: _this. pageSize,
        batchNo:_ this. formValidate . batchNo,
    }). then( function (response) {
        this. tableData = response . data. data. list;
        // console. log( response. data . data.list+"============");
        _this. totalCount = response . data . data. total; 
        console.log('共多少条',_ this . totalCount) ; 
        _this. isLoading = false;
        _this. totalPage = response . data . data . pages;
})

 


版权声明:本文为weixin_45313093原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。