Bootstrap-table failed to load json data

problem description

failed to load json using bootstrap-table

the environmental background of the problems and what methods you have tried

the choice of parameter configuration has been tried, and onLoadSuccess can execute

.

related codes

/ / Please paste the code text below (do not replace the code with pictures)

$(function () {
            //1.Table
            var oTable = new TableInit();
            oTable.Init();
        });
        var TableInit = function () {
            this.Init = function () {
                showGrid();
            };
        };
        function showGrid() {
            var strURL = " ../../Model/HYSTJ/data.json";
            $("-sharpdyxxtable").bootstrapTable({
                url: strURL,
                method: "GET", //*
                ////dataType:"json",
                ////contentType: "application/x-www-form-urlencoded",
                //cache: true, //true*
                //sortable: false, //
                //sortOrder: "asc", //
                queryParamsType: "limit", //,RESTFul  
                sidePagination: "server", //:clientserver*
                //strictSearch: true,
                /////  height: 200, //height
                //singleSelect: false,
                columns: [{
                    field: "XH",
                    title: "",
                    align: "center"
                }, {
                    field: "DYH",
                    title: "",
                    align: "center"
                }],
                responseHandler: function (res) {
                    return {
                        "total": res.total, //
                        "rows": res.rows   //
                    };
                },
                onLoadSuccess: function (data) {//
                    alert("data success");
                    //
                    //setEmptyValue();
                },
                onLoadError: function (data) {
                    alert(data);
                }
            });
        }

my json data

{
  "total": 1,
  "rows": [
    {
      "XH": 1,
      "DYH": "hello"
    }
  ]
}

clipboard.png

clipboard.png this is the result, and the data is not loaded.


is a version problem. If you change the version of bootstrap-table, it will be loaded

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bd8a82-31133.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bd8a82-31133.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?