81,092
社区成员
发帖
与我相关
我的任务
分享
function showFundA(){
if(!tableFundA){
tableFundA = new SimpleTableBuilder({
tid: 'flex3',
rp: 50,
async:false,
dataURL: '/data/sfnew/funda_list/',
title: '#tableFundATitle',
cols: [
{display: '代码', title:'A类代码', name : 'funda_id', width : 35,nowrap:true,
link: {
url:'data/sfnew/detail/{{funda_id}}',
newpage: true,
type: self
}
},
{display: '名称', title:'A类名称', name : 'funda_name', width : 40,nowrap:true,formatter:sfFundNameFormatter},
{display: '现价', title:'A类现价', name : 'funda_current_price', width : 35, tooltip:'最后更新时间:{{last_time}}',nowrap:true,
link: {
url:'http://finance.sina.com.cn/fund/quotes/{{funda_id}}/bc.shtml',
newpage: true,
type: self
}
},
{display: '涨幅', title:'A类涨幅', name : 'funda_increase_rt', width : 35, color:true,nowrap:true},
{display: '成交额<br>(万元)', title:'A类成交金额', name : 'funda_volume', width : 35,nowrap:true},
{display: '净值', title:'A类净值', name : 'funda_value', width : 35,tooltip:'净值日期:{{funda_nav_dt}}',nowrap:true,
link: {
newpage: true,
url: 'http://www.cninfo.com.cn/information/fund/netvalue/{{funda_id}}.html',
type: 'self'
}
},
{display: '折价率', title:'A类折价率', name : 'funda_discount_rt', width : 30,nowrap:true},
{display: '利率<br>规则', name : 'coupon_descr_s', tooltip:'利率规则说明:{{coupon_descr}}', width : 35,nowrap:true},
{display: '本期<br>利率', name : 'funda_coupon', width : 35,nowrap:true},
{display: '下期<br>利率', name : 'funda_coupon_next', width : 35, bgcolor:"yellow",nowrap:true},
{display: '修正<br>收益率', title: '修正收益率', name : 'funda_profit_rt_next', width : 35, bgcolor:"yellow",nowrap:true},
{display: '剩余<br>年限', name : 'funda_left_year', width : 30, sorter : 'leftYear',nowrap:true},
{display: '参考指数', name : 'funda_index_name', width : 35, nowrap:true,formatter:sfIndexNameFormatter},
{display: '参考指数id', name : 'funda_index_id', hidden:true},
{display: '指数<br>涨幅', name : 'funda_index_increase_rt', width : 35, color:true,nowrap:true},
{display: '下折<br>母基需跌', title:'下折母基需跌', name : 'funda_lower_recalc_rt', width : 35, nowrap:true,formatter:sflowerRecalcFormatter, sorter:'percentSorter'},
{display: '理论<br>下折收益', title:'注意:参与下折也存在风险!', name : 'lower_recalc_profit_rt', width : 35, nowrap:true, bgcolor:"yellow"},
{display: '上折<br>母基需涨', title:'上折母基需涨', name : 'fundb_upper_recalc_rt', width : 35, nowrap:true,formatter:upperRecalcFormatter, sorter:'percentSorter'},
{display: '整体<br>溢价率', name : 'funda_base_est_dis_rt', width : 35, bgcolor:"yellow",nowrap:true,tooltip:'{{funda_base_est_dis_rt_tip}}'},
{display: 'T-1<br>溢价率', title:'T-1日整体溢价率', name : 'funda_base_est_dis_rt_t1', width : 35,nowrap:true},
{display: 'T-2<br>溢价率', title:'T-2日整体溢价率', name : 'funda_base_est_dis_rt_t2', width : 35,nowrap:true},
{display: 'A份额<br>(万份)', title:'A类份额', name : 'funda_amount', width : 35,nowrap:true},
{display: 'A新增<br>(万份)', title:'A类新增份额', name : 'funda_amount_increase', tooltip:'A份额增长{{funda_amount_increase_rt}}', width : 35, bgcolor:"yellow",nowrap:true},
{display: 'A:B', name : 'abrate', width : 30,nowrap:true},
{display: '净值日期', name: 'funda_nav_dt', hidden: true},
{display: '最后更新', name: 'last_time', hidden: true},
{display: '利率规则说明', name: 'coupon_descr', hidden: true},
{display: '下次定折', name: 'next_recalc_dt', width: 100, tooltip:'定折说明:{{fund_descr}}', nowrap:true, sorter:'recalcDateSorter'},
{display: '定期折算', name: 'fund_descr', width: 120, hidden: true},
{display: 'A份额增长', name: 'funda_amount_increase_rt', width: 10, hidden: true},
{display: '溢价率提示信息', name: 'funda_base_est_dis_rt_tip', width: 40, hidden: true},
{display: '操作', name: 'fundaOpt', formatter: fundaOptFormatter, width:10}
]
});
tableFundA.show($('#fundASearchForm').serializeObjectToJson());
autoReloadFundATable(tableFundA,'auto_reload_funda','auto_reload_funda');
}else{
doFundASearch();
}
};
数据这里展示的 A类
tableFundA.show($('#fundASearchForm').serializeObjectToJson());
autoReloadFundATable(tableFundA,'auto_reload_funda','auto_reload_funda');[/quote]
。。。。对了,是这里生成的。不过没学过JS,找到但不会搞啊。。。他那个数据画面没有的,是js 生成的,就是为了防止数据被抓取的,其次还有就是实时性显示。 这种情况就得模拟浏览器的动作执行。jsoup 类的框架是抓取最后生成的静态html 文件。 - -! 你页面加载完了,不就是静态的啦
function showFundA(){
if(!tableFundA){
tableFundA = new SimpleTableBuilder({
tid: 'flex3',
rp: 50,
async:false,
dataURL: '/data/sfnew/funda_list/',
title: '#tableFundATitle',
cols: [
{display: '代码', title:'A类代码', name : 'funda_id', width : 35,nowrap:true,
link: {
url:'data/sfnew/detail/{{funda_id}}',
newpage: true,
type: self
}
},
{display: '名称', title:'A类名称', name : 'funda_name', width : 40,nowrap:true,formatter:sfFundNameFormatter},
{display: '现价', title:'A类现价', name : 'funda_current_price', width : 35, tooltip:'最后更新时间:{{last_time}}',nowrap:true,
link: {
url:'http://finance.sina.com.cn/fund/quotes/{{funda_id}}/bc.shtml',
newpage: true,
type: self
}
},
{display: '涨幅', title:'A类涨幅', name : 'funda_increase_rt', width : 35, color:true,nowrap:true},
{display: '成交额<br>(万元)', title:'A类成交金额', name : 'funda_volume', width : 35,nowrap:true},
{display: '净值', title:'A类净值', name : 'funda_value', width : 35,tooltip:'净值日期:{{funda_nav_dt}}',nowrap:true,
link: {
newpage: true,
url: 'http://www.cninfo.com.cn/information/fund/netvalue/{{funda_id}}.html',
type: 'self'
}
},
{display: '折价率', title:'A类折价率', name : 'funda_discount_rt', width : 30,nowrap:true},
{display: '利率<br>规则', name : 'coupon_descr_s', tooltip:'利率规则说明:{{coupon_descr}}', width : 35,nowrap:true},
{display: '本期<br>利率', name : 'funda_coupon', width : 35,nowrap:true},
{display: '下期<br>利率', name : 'funda_coupon_next', width : 35, bgcolor:"yellow",nowrap:true},
{display: '修正<br>收益率', title: '修正收益率', name : 'funda_profit_rt_next', width : 35, bgcolor:"yellow",nowrap:true},
{display: '剩余<br>年限', name : 'funda_left_year', width : 30, sorter : 'leftYear',nowrap:true},
{display: '参考指数', name : 'funda_index_name', width : 35, nowrap:true,formatter:sfIndexNameFormatter},
{display: '参考指数id', name : 'funda_index_id', hidden:true},
{display: '指数<br>涨幅', name : 'funda_index_increase_rt', width : 35, color:true,nowrap:true},
{display: '下折<br>母基需跌', title:'下折母基需跌', name : 'funda_lower_recalc_rt', width : 35, nowrap:true,formatter:sflowerRecalcFormatter, sorter:'percentSorter'},
{display: '理论<br>下折收益', title:'注意:参与下折也存在风险!', name : 'lower_recalc_profit_rt', width : 35, nowrap:true, bgcolor:"yellow"},
{display: '上折<br>母基需涨', title:'上折母基需涨', name : 'fundb_upper_recalc_rt', width : 35, nowrap:true,formatter:upperRecalcFormatter, sorter:'percentSorter'},
{display: '整体<br>溢价率', name : 'funda_base_est_dis_rt', width : 35, bgcolor:"yellow",nowrap:true,tooltip:'{{funda_base_est_dis_rt_tip}}'},
{display: 'T-1<br>溢价率', title:'T-1日整体溢价率', name : 'funda_base_est_dis_rt_t1', width : 35,nowrap:true},
{display: 'T-2<br>溢价率', title:'T-2日整体溢价率', name : 'funda_base_est_dis_rt_t2', width : 35,nowrap:true},
{display: 'A份额<br>(万份)', title:'A类份额', name : 'funda_amount', width : 35,nowrap:true},
{display: 'A新增<br>(万份)', title:'A类新增份额', name : 'funda_amount_increase', tooltip:'A份额增长{{funda_amount_increase_rt}}', width : 35, bgcolor:"yellow",nowrap:true},
{display: 'A:B', name : 'abrate', width : 30,nowrap:true},
{display: '净值日期', name: 'funda_nav_dt', hidden: true},
{display: '最后更新', name: 'last_time', hidden: true},
{display: '利率规则说明', name: 'coupon_descr', hidden: true},
{display: '下次定折', name: 'next_recalc_dt', width: 100, tooltip:'定折说明:{{fund_descr}}', nowrap:true, sorter:'recalcDateSorter'},
{display: '定期折算', name: 'fund_descr', width: 120, hidden: true},
{display: 'A份额增长', name: 'funda_amount_increase_rt', width: 10, hidden: true},
{display: '溢价率提示信息', name: 'funda_base_est_dis_rt_tip', width: 40, hidden: true},
{display: '操作', name: 'fundaOpt', formatter: fundaOptFormatter, width:10}
]
});
tableFundA.show($('#fundASearchForm').serializeObjectToJson());
autoReloadFundATable(tableFundA,'auto_reload_funda','auto_reload_funda');
}else{
doFundASearch();
}
};
数据这里展示的 A类
tableFundA.show($('#fundASearchForm').serializeObjectToJson());
autoReloadFundATable(tableFundA,'auto_reload_funda','auto_reload_funda');- -! 你页面加载完了,不就是静态的啦