当可以设置src时,不必发ajax请求,如果没有参数设置src即可

时间:2021-09-10 21:29:44
var params = (function(obj){
var string = [];
for(var key in obj){
string.push(window.encodeURI(key)+'='+window.encodeURI(obj[key]));
}
return string.join("&");
})(iframePara); !!!!!! container.find('#map').attr('src',constant.serverUrl + 'mws/sell_map?'+params); $.ajax({
url: constant.serverUrl + 'storage/sku',
method: 'get',
data: {
"start_time": start.datetimepicker('getUTCDate').getTime() / 1000 + parseInt(container.find('#timezone').val()) * 60 * 60,
"end_time": end.datetimepicker('getUTCDate').getTime() / 1000 + parseInt(container.find('#timezone').val()) * 60 * 60,
"sku": row.sku
},
success: function (data) {
data = JSON.parse(data);
storgeInfo(data)
}
});
});