/*************************************************************** * * * mui.ajax獲取數(shù)據(jù) * * */***************************************************************/var url = 'http://s.music.163.com/search/get/';mui.ajax(url, { data: { 'type': 1, 's': '喜歡你', 'limit': 10 }, dataType: 'json', type: 'post', timeout: 10000, success: function(response) { console.log(JSON.stringify(response)) }, error: function(xhr, type, errorThrown) { console.log(type) }})用segmentfault的有個mui教程去練習的時候,在瀏覽器打開總是報跨域的錯誤,是接口不能用了么?還是其它原因
mui開發(fā)網易云音樂,請求接口總是跨域
慕仙森
2018-11-16 14:15:32