HI投顾页面 后台数据请求步骤
- 启动 D:\apache-tomcat-7.0.42\bin\startup.bat
- 启动 eclipse -- servers -- tomcat 7.0 启动 (建一个mvn工程)
3. 浏览器 localhost:8080/hiiap/page/index3.html
后台数据 localhost:8080/hiiap/analogStock/listTopSimAccount
HI投顾首页 : 请求数据地址 :
url : "/hiiap/analogStock/listTopSimAccount",
$.
ajax({
url : "/hiiap/analogStock/listTopSimAccount",
type : "post",
data : 'json',
success : function(data) {
topSimAccounts = data.topSimAccounts;
for( var index in topSimAccounts){
ACCOUNT_ID = topSimAccounts[ index].ACCOUNT_ID;
TOTAL_EARNINGS = topSimAccounts[ index].TOTAL_YIELD;
for( var i = 0; i < 4; i ++){
);
}
}
console. log(data);
},
error : function(){
console. log( '请求后台出错!');
}
});
url : "/hiiap/analogStock/listTopSimAccount",
type : "post",
data : 'json',
success : function(data) {
topSimAccounts = data.topSimAccounts;
for( var index in topSimAccounts){
ACCOUNT_ID = topSimAccounts[ index].ACCOUNT_ID;
TOTAL_EARNINGS = topSimAccounts[ index].TOTAL_YIELD;
for( var i = 0; i < 4; i ++){
);
}
}
console. log(data);
},
error : function(){
console. log( '请求后台出错!');
}
});