售前信息平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1023 B

6 months ago
function () {
title = '';
url = '';
updateTime = '';
region = '';
announcementType = '';
results = {};
lists = new Array();
// 取列表的头
ul = $('#app > div > div.z_list_vue > div.ant-spin-nested-loading > div > div > div.z_content > div.z_detail_content > div:nth-child(5) > div.ant-spin-nested-loading > div > ul');
// 获取列表的第一个元素,获取成功的话,元素封装对象的length = 1
li = ul.children('li').first()
item = {}
while (li.length == 1)
{
a = li.find('div.ant-list-item-meta > div > h4 > span > a');
item.title = $(a.children()['2']).attr('title');
item.url = a.attr('href');
item.updateTime = $(li.children()[1]).text();
item.region = '宁波阳光采购';
item.announcementType = '{{$announcement_type}}'
lists.push(item)
// 取下一个列表元素
li = li.next()
}
results.count = lists.length
results.lists = lists
return results
}