|
名称 | 类型 | 说明 |
fws_seach | 文件夹 | 检索使用的文件夹 |
main.htm | 文件 | 首页文件(调用插件) |
<script type='text/javascript' src='fws_seach/common.js'></script>
<link rel='stylesheet' href='fws_seach/style.css' type='text/css'/>
提供了丰富的属性设置和方法调用,开发者可以根据fwsSearch提供的API快速完成一个师资检索的开发,
1 2 3 4 5 6 | $(function(){ $('.fws_search').fwsSearch({ siteId:'234',//站点号 showType:'1'//输出结构方式 }); }); |
属性 | 描述 | 默认值 | 类型 |
url | 检索接口 师资队伍检索接口: /_wp3services/generalQuery?queryObj=teacherHome 文章检索服务接口: /_wp3services/generalQuery?queryObj=articles | /_wp3services/generalQuery?queryObj=teacherHome | string |
lang | 语言类型: 中文:1,英文:2 | 1 | string |
level | 校级:0,部门:1 | 1 | string |
json | 文章的json数据 | null | string |
siteId | 站点Id | null | string |
columnId | 栏目Id 注: 1、文章检索时,需要写值; 2、全站检索时,值为'',给空值; | null | string |
category | 展开分类(除筛选条件(filter)外) | false | string |
displayType | 展示类型, 'list':栏目列表, 'select':下拉框, 'filter':条件筛选, 混搭时设置false, | 'filter' | string |
framebox | 字段属性(位置,类名) | { 'list':{ active: true, //是否显示导航 boxCon: '.fws_nav'//导航放置位置 }, 'select':{ active: true, widthNum: 1,//设置一行下拉的数量 caption: 'top', //文字显示位置 captionWidth: 195, //文字宽度 boxCon: '.fws_select' }, 'filter':{ active: true, unlimitText: '不限', boxCon: '.fws_fliter' }, 'searchBox':{ active: true, boxCon: '.fws_searchbox' } } | object |
sortWay | 功能按钮(最新、最热、首字母) | { active: false, sortReverse: true, //反向排序开关 sortField:[ {field: 'letter', type: 'asc', describe:'首字母排序'}, {field: 'visiCount', type: 'desc', describe:'访问次数排序'}, {field: 'new', type: 'desc', describe:'最新'} ], boxCon: '.fws_sortway' } | object |
fieldData | 字段数据 //格式: {title:'一级名称', name:'点击一级时检索内容,已','号链接', children:'下拉菜单数据,已','号链接', type:检索字段编码(参数conditFeild)的序号,已0开头, ways:字段显示的方式 textType:true, 开启文本框类型 searchBtn: true 添加搜索按钮 category: 自定义输出分类 } | [ {title:'中国科学院院士',name:'副教授,副研究员,高级工程师,副研究馆员,高级实验师',children:'教授1,副教授,讲师',type:'1',ways:'select',category:'教授1,副教授,讲师' }, ] | 数组 |
fieldJson | 文章的json数据 | null | 数组 |
pageIndex | 默认第一页开始 | 1 | string |
rows | 每页显示多少篇文章 | 20 | string |
orderData | 排序方式 | [ {field: 'firstLetter', type: 'asc'} ] | 数组 |
conditFeild | 检索需要的字段||检索查询条件 | [ {type:'0', field:'career', judge:'='}, {type:'1', field:'firstLetter', judge:'like'}, ] | 数组 |
returnInfosdata | 检索返回的字段 | [ {field: 'title', name: 'title'}, {field: 'headerPic', name: 'headerPic'}, {field: 'exField1', name: 'exField1'}, {field: 'exField2', name: 'exField2'}, {field: 'career', name: 'career'}, {field: 'cnUrl', name: 'cnUrl'}, {field: 'visitCount', name: 'visitCount'} ] | 数组 |
showType | 输出显示方式 (以下面tpl参数设置优先) 1:人名+浏览次数 2:上图下文 | 1 | string |
tpl | 自定义输出结构 | function(data){ return '<li class='news'><span class='news_title'>'+data.title+'</span></li>'; } | function |
pageType | 分页样式 | { active: true, showType: 1 } | object |
waterFall | 是否显示瀑布流方式 | false | boolean |
callback | 回调函数(参数为当前结构,检索结果,配置项) | function |
注:orderData、conditFeild、returnInfosdata,关于参数请查看:参数说明;
2018-07-02:修复已知bug及使用文章检索时,会提交多余的检索项;
2019-03-06:添加自定义组合功能(列表,下拉,复选混搭组合);
2019-05-22:添加时间检索、瀑布流展示、功能按键(最新、最热);
.....................................................................................................................
.....................................................................................................................
4、时间范围(三天内、本周、本月、本年、不限),方便后续增加指定时间;
.....................................................................................................................
增加功能按钮(排序方式,如常见的访问量、最热、最新、首字母);
.....................................................................................................................
.....................................................................................................................
.....................................................................................................................
版权所有 © Copyright 2010 SUDYTECH 版权所有 苏ICP备05026256号-2 |