ajax 调用 JSON.parse();

时间:2021-05-10 12:29:34

$.ajax({
           type : "POST",
           data:{
            createStartTime:createStartTimes,
            createEndTime:createEndTimes
           },
           url : "<%=request.getContextPath()%>/numericalController/customerPer",
           dataType : "json",
           async: false,//同步
           success : function(result) {
            option.xAxis.data =JSON.parse(result.retDate);
            option.series[0].data = JSON.parse(result.cArr);
            option.series[1].data = JSON.parse(result.iArr);
            option.title.text = "会员使用率,会员总数"+JSON.parse(result.count);
                $("#createEndTime").datebox("setValue","");
                $("#createStartTime").datebox("setValue","");
            
           }
       });