|
同事另外写了php放在了网上,我用x5开发了静态页面,现在想要访问php请求数据该怎么访问呢,东西现在在本地,也打算传到服务器,php页面另外也要支持另外一个同事的ios,现在该怎么处理
//加载数据
Model.prototype.productDataCustomRefresh = function(event){
var newsData = event.source;
$.ajax({
type: "GET",
url: require.toUrl('http://27.0.193.212/shop/interface.php/Home/index/ajaxGetRecentDisGoods
'),
dataType: 'json',
async: false,
cache: false,
success: function(data){
newsData.loadData(data);//将返回的数据加载到data组件
},
error: function(){
throw justep.Error.create("加载数据失败");
}
});
}; |
|