jQuery ajax 使用同步模式(禁用异步模式)

$.ajaxSettings.async = false
$.getJSON('__MODULE__/Echart/l_hjcate_cun', { cun_id: '{:I("cun_id")}' }, function (res) {
	res.forEach(i => {
		option.xAxis.data.push(i.name)
		option.series[0].data.push(i.value)
	})
})
$.ajaxSettings.async = true

posted on 2022-09-08 11:16  小馬過河﹎  阅读(97)  评论(0)    收藏  举报

导航