function test(){ var load = layer.load(1, { shade: [0.1,'#393D49'] }); setTimeout(function () { //ajax同步方法写这里面,layer.load正常加载 },1000) }