import ajax from 'jquery/src/ajax/xhr.js' import $ from 'jquery/src/ajax'; var addressList=[]; module.exports={ getProvinceList:function(){ $.ajax({ method: "post", dataType: "json", crossDomain: false, async:false, url: globalConfig.context + "/open/listAllProvince", data: { }, success:function(data){ if (!data.data) { if (data.error && data.error.length) { message.warning(data.error[0].message); return; }; }; addressList=data.data; return addressList; } }) return addressList; } }