Metadata
Title
活动日历-清华大学图书馆
Category
general
UUID
6201c6a9822c43a08332de7c2fa62498
Source URL
https://lib.tsinghua.edu.cn/hdrl.htm
Parent URL
https://lib.tsinghua.edu.cn/index.htm
Crawl Time
2026-03-10T04:10:39+00:00
Rendered Raw Markdown
# 活动日历-清华大学图书馆

**Source**: https://lib.tsinghua.edu.cn/hdrl.htm
**Parent**: https://lib.tsinghua.edu.cn/index.htm

- - 更多

var map = {}; //存储date-json:index对应关系
var tb = ["一","二","三","四","五","六","七","八","九","十","十一","十二",
"十三","十四","十五","十六","十七","十八","十九","二十","二十一",
"二十二","二十三","二十四","二十五","二十六","二十七","二十八","二十九","三十","三十一"];
var json = []; //请求的数据。
function getJson1031122(year,month){
var time=year+"-"+month;
var url="/system/resource/news/calendar/newsservices.jsp"; //文章数据请求地址
$.ajax({
url : url,
type: "post",
data:{"date":time,"owner":'1724308018',"contentid":'1035862',"is\_future":'true'},
dataType : "json",
contentType : "application/x-www-form-urlencoded; charset=UTF-8",
async : false,
success : function(data) {
json = data;
calUtil.init(json[0]);
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
//alert(textStatus);
},
complete: function(XMLHttpRequest, textStatus) {
this; // 调用本次AJAX请求时传递的options参数
}
});
}
//更新通知信息
function fillNotice1031122(i,item){
var url=item.url; //文章内容页地址。
var title=item.title; //文章标题
var summary=item.summary; //文章摘要
var hddd=item.hddd; //文章活动地点
var hdrq=item.hdrq; //文章活动时间
var wbdate=item.wbdate; //文章活动时间
var lll=wbdate.split('-'); //文章活动时间拆分
var YY=wbdate.split(' '); //文章活动时间拆分
var dd=YY[0].split('-'); //文章活动时间
var mm=YY[0].substr(8,2);
var titlelen=200;
var summarylen=20;
if(title.length>=parseInt(titlelen))
{
title=title.substr(0,titlelen)+"...";
}
if(summary.length>=parseInt(summarylen))
{
summary=summary.substr(0,summarylen)+"...";
}
$(".dqsj-title a.dqsj-link").eq(i).text(title);
$(".dqsj-title a.dqsj-link").eq(i).attr("href",url);
$(".dqsj-summary").eq(i).text(summary);
$(".daaa").eq(i).text(hdrq);
$(".rl-address").eq(i).text(hddd);
$(".rl-year").eq(i).text(lll[0]);
var nyr=dd[1]+'<span>/'+mm+'</span>';
$(".fl-date").eq(i).html(nyr);
}
//更新通知信息
function updateNotice1031122(date){
var htmls = "";
var news\_num=100-1; //显示num篇文章
var num = 0;
$(".rl-box").html("");
$.each(json[0], function(index,item){
if (item.date == date){
var url=item.url; //文章内容页地址。
var title=item.title; //文章标题
var summary=item.summary; //文章摘要
var hddd=item.hddd; //文章活动地点
var hdrq=item.hdrq; //文章活动时间
var wbdate=item.wbdate; //文章活动时间
var lll=wbdate.split('-'); //文章活动时间拆分
var YY=wbdate.split(' '); //文章活动时间拆分
var dd=YY[0].split('-'); //文章活动时间
var mm=YY[0].substr(8,2);
var titlelen=200;
var summarylen=20;
if(title.length>=parseInt(titlelen))
{
title=title.substr(0,titlelen)+"...";
}
if(summary.length>=parseInt(summarylen))
{
summary=summary.substr(0,summarylen)+"...";
}
htmls+="<div class='fl-box-left text-center'>";
htmls+="<div class='fl-date'>"+dd[1]+'<span>/'+mm+'</span>';
htmls+="</div>";
htmls+="<div class='rl-year'>"+lll[0];
htmls+="</div></div><ul class='rl-list'>";
htmls+="<li class='dqsj'>";
htmls+="<div class='dqsj-title'>";
htmls+="<a class='dqsj-link' href='"+url+"' target='\_blank'>"+title+"</a>";
htmls+="<span>";
htmls+="<a class='dqsj-more' href='' style='color:#005bac;'>更多</a>";
htmls+="</span>";
htmls+="</div><div class='rl-label'>";
htmls+="<span class='rl-date daaa'>"+hdrq;
htmls+="</span><span class='rl-date rl-address'>"+hddd;
htmls+="</span></div>";
if(false==true)
{
htmls+="<div class='dqsj-summary'>"+summary+"</div>";
}
htmls+="</li>";
htmls+="</ul>";
}
})
/// console.log(htmls);
$(".rl-box").html(htmls);
}
//显示更多文章
function newsmore1031122(num,time)
{
$(".dqsj-more").eq(num).show();
var urlMore="&calendarselecteddate="+time; //每天文章数量超过num篇,查看更多链接地址
$(".dqsj-more").attr("href",urlMore);
}
function updateCalName1031122(date){
var calendarName=calUtil.showYear+"-"+calUtil.showMonth+"-"+date;
$(".calendar\_month\_span").html(calendarName);
}

var calUtil = {
//当前日历显示的年份
showYear:2018,
//当前日历显示的月份
showMonth:4,
//当前日历显示的天数
showDate:19,
curYear:2018,
curMonth:4,
curDate:19,
eventName:"load",
curTab:0,
//初始化日历
init:function(signList){
calUtil.setMonthAndDay();
calUtil.draw(signList);
calUtil.bindEnvent();
}
,
draw:function(signList){
//绑定日历
var str = calUtil.drawCal(calUtil.showYear,calUtil.showMonth,signList);
$("#calendar").html(str);
//绑定日历表头
if (calUtil.isCurrent()){
updateCalName1031122(parseInt(calUtil.curDate));
}else{
$(".calendar\_month\_span").html(calUtil.showYear+"-"+calUtil.showMonth+"-"+calUtil.curDate);
$("#yuefen").attr("value",calUtil.showMonth);
}
},
//绑定事件
bindEnvent:function(){
//绑定上个月事件
$(".calendar\_month\_prev").click(function(){
//ajax获取日历json数据
calUtil.eventName="prev";
calUtil.init(json[calUtil.curTab]);
calUtil.eventName="current";
map=[];
var time=calUtil.showYear+"-"+calUtil.showMonth+"-"+calUtil.showDate;
getJson1031122(calUtil.showYear,calUtil.showMonth);
});
//绑定下个月事件
$(".calendar\_month\_next").click(function(){
//ajax获取日历json数据
calUtil.eventName="next";
calUtil.init(json[calUtil.curTab]);
calUtil.eventName="current";
map=[];
var time=calUtil.showYear+"-"+calUtil.showMonth+"-"+calUtil.showDate;
getJson1031122(calUtil.showYear,calUtil.showMonth);
});
//日期点击事件
$("#calendar tbody td").click(function(){
//ajax获取日历json数据
var date = $(this).text();
var time=calUtil.showYear+"-"+calUtil.showMonth+"-"+date;
if (date!=""){
//$(".calendar\_cur\_date").text(tb[calUtil.showMonth-1] + "月" + tb[date-1] + ((tb[date-1].length)>1?"":"日"));
}
//更新日历表头
updateCalName1031122(parseInt(date));
//更新活动通知
if ($(this).hasClass("on")){
updateNotice1031122(date);
document.getElementById("kzyc1").style.display="block";
document.getElementById("kzyc2").style.display="none";
$('td').removeAttr('id');
$(this).attr("id","id1");
$(".fl-box-left").show();
}
else {
$(".dqsj").hide();
$(".fl-box-left").hide();
}
});
},
//获取当前选择的年月
setMonthAndDay:function(){
switch(calUtil.eventName)
{
case "load":
var current = new Date();
calUtil.curYear=calUtil.showYear=current.getFullYear();
calUtil.curMonth=calUtil.showMonth=current.getMonth() + 1;
calUtil.curDate=calUtil.showDate=current.getDate();
break;
case "prev":
var nowMonth=calUtil.showMonth;
calUtil.showMonth=parseInt(nowMonth)-1;
if(calUtil.showMonth==0)
{
calUtil.showMonth=12;
calUtil.showYear-=1;
}
break;
case "next":
var nowMonth=calUtil.showMonth;
calUtil.showMonth=parseInt(nowMonth)+1;
if(calUtil.showMonth==13)
{
calUtil.showMonth=1;
calUtil.showYear+=1;
}
break;
case "current":
break;
}
},
getDaysInmonth : function(iMonth, iYear){
var dPrevDate = new Date(iYear, iMonth, 0);
return dPrevDate.getDate();
},
bulidCal : function(iYear, iMonth) {
var aMonth = new Array();
aMonth[0] = new Array(7);
aMonth[1] = new Array(7);
aMonth[2] = new Array(7);
aMonth[3] = new Array(7);
aMonth[4] = new Array(7);
aMonth[5] = new Array(7);
aMonth[6] = new Array(7);
var dCalDate = new Date(iYear, iMonth - 1, 1);
var iDayOfFirst = dCalDate.getDay();
if(iDayOfFirst==0)iDayOfFirst=7;
var iDaysInMonth = calUtil.getDaysInmonth(iMonth, iYear);
var iVarDate = 1;
var d, w;
aMonth[0][0] = "一";
aMonth[0][1] = "二";
aMonth[0][2] = "三";
aMonth[0][3] = "四";
aMonth[0][4] = "五";
aMonth[0][5] = "六";
aMonth[0][6] = "日";
for (d = iDayOfFirst-1; d < 7; d++) {
aMonth[1][d] = iVarDate;
iVarDate++;
}
for (w = 2; w < 7; w++) {
for (d = 0; d < 7; d++) {
if (iVarDate <= iDaysInMonth) {
aMonth[w][d] = iVarDate;
iVarDate++;
}
}
}
return aMonth;
},
ifHasSigned : function(signList,day){
var signed = false;
$.each(signList,function(index,item){
if(item.date == day) {
signed = true;
if(map[day]==undefined){
map[day]=index;
}else{//多个活动则在json中添加more字段
if(signList[map[day]].more==undefined){
signList[map[day]].more=[index];
}else {
signList[map[day]].more.push(index);
}
}
}
});
return signed ;
},
isCurrent :function(){
return (calUtil.curYear==calUtil.showYear && calUtil.curMonth==calUtil.showMonth);
},
drawCal : function(iYear, iMonth ,signList) {
var myMonth = calUtil.bulidCal(iYear, iMonth);
var htmls = new Array();
htmls.push("<div class='cal\_main' id='cal\_layer'>");
htmls.push("<div class='cal\_succ\_calendar\_title'>");
htmls.push("<div class='calendar\_cur\_date'></div>");
htmls.push("<div class='calendar\_top\_right'>");
htmls.push("<div class='calendar\_month\_next'><img src='/system/resource/news/calendar/images/right-jt.jpg'></div>");
htmls.push("<div class='calendar\_month\_prev'><img src='/system/resource/news/calendar/images/left-jt.jpg'></div>");
htmls.push("<div class='calendar\_month\_span'></div>");
htmls.push("</div></div>");
htmls.push("<div class='cal'>");
htmls.push("<table>");
htmls.push("<tr>");
htmls.push("<th>" + myMonth[0][0] + "</th>");
htmls.push("<th>" + myMonth[0][1] + "</th>");
htmls.push("<th>" + myMonth[0][2] + "</th>");
htmls.push("<th>" + myMonth[0][3] + "</th>");
htmls.push("<th>" + myMonth[0][4] + "</th>");
htmls.push("<th>" + myMonth[0][5] + "</th>");
htmls.push("<th>" + myMonth[0][6] + "</th>");
htmls.push("</tr>");
var d, w;
for (w = 1; w < 7; w++) {
htmls.push("<tr>");
for (d = 0; d < 7; d++) {
var ifHasSigned = calUtil.ifHasSigned(signList,myMonth[w][d]);
if(ifHasSigned){
htmls.push("<td class='on'>" + (!isNaN(myMonth[w][d]) ? myMonth[w][d] : " ") + "</td>");
} else if(myMonth[w][d]==calUtil.curDate){
htmls.push("<td class='cur'>" + (!isNaN(myMonth[w][d]) ? myMonth[w][d] : " ") + "</td>");
var str=tb[calUtil.showMonth-1] + "月" + tb[calUtil.showDate-1] + ((tb[calUtil.showDate-1].length)>1?"":"日");
htmls[2]="<div class=calendar\_cur\_date>"+str+"</div>"
} else {
if (!isNaN(myMonth[w][d]))
{
htmls.push("<td>" + myMonth[w][d] + "</td>");
}
else{
htmls.push("<td class='empty'></td>");
}
}
}
htmls.push("</tr>");
}
htmls.push("</table>");
htmls.push("</div>");
htmls.push("</div>");
return htmls.join('');
}
};
//默认初始化
calUtil.init([{"date":""}]);
function getdata1031122(){
//使用服务器期时间戳,校正本地日历时间
var url="/system/resource/news/calendar/newsservices.jsp?date=2018-04";
$.get(url,function(data,state,xhr){
var datestr=xhr.getResponseHeader("Date");
var date=new Date(datestr);
if(datestr!=null && date!=undefined){
calUtil.curYear=calUtil.showYear=date.getFullYear();
calUtil.curMonth=calUtil.showMonth=date.getMonth() + 1;
calUtil.curDate=calUtil.showDate=date.getDate();
}
getJson1031122(calUtil.showYear,calUtil.showMonth);
},"json")
}
$(function (){
getdata1031122();
var time=calUtil.showYear+"-"+calUtil.showMonth+"-"+calUtil.showDate;
})

- 03/05

  2026

  - [作者面对面43期 | 陆瑶:公司治理的“前世、今生与未来”](https://mp.weixin.qq.com/s/S0PaFeMCF0jJwo0Nqxuf3w)

    3月5日(星期四)15:00  
    邺架轩阅读体验书店
- 12/24

  2025

  - [活动报名|数字素养工作坊第6期:AI+Python数据分析上手实战指南](info/1068/7848.htm)

    12月25日(周四)15:30  
    图书馆西馆(逸夫馆)四层从游空间
- 12/11

  2025

  - [信息•资源•研究|第27讲:SPSS:从入门到深度应用](info/1068/7810.htm)

    12月11日(周四)晚7:00  
    西馆(逸夫馆)401培训教室
- 12/10

  2025

  - [活动报名|数字素养工作坊第5期:您的AI学术伙伴——图书馆AI工具实战指南](info/1068/7831.htm)

    12月10日(周三)15:30  
    图书馆西馆(逸夫馆)四层从游空间
- 12/09

  2025

  - [信息•资源•研究|第26讲:如何使用AI和PS制作高质量学术论文插图](info/1068/7809.htm)

    12月9日(周二)晚7:00  
    西馆(逸夫馆)401培训教室
- 12/06

  2025

  - [信息•资源•研究|第25讲:文献计量可视化分析工具—— CiteSpace 和 VOSviewer 的使用](info/1068/7808.htm)

    12月6日(周六)下午3:00  
    西馆(逸夫馆)401培训教室
- 12/04

  2025

  - [信息•资源•研究|第24讲:个人文献管理方法与工具:以EndNote和NoteExpress为例](info/1068/7807.htm)

    12月4日(周四)晚7:00  
    西馆(逸夫馆)401培训教室
- 12/02

  2025

  - [信息•资源•研究|第23讲:PPT的设计制作与科研汇报](info/1068/7806.htm)

    12月2日(周二)晚7:00  
    西馆(逸夫馆)401培训教室
  - [学在清华·真人图书馆72期(清华教职工特场第五场)| 徐婉玲:百年守护——从紫禁城到故宫博物院](https://mp.weixin.qq.com/s/i4S_AsOfyATwvrqx6_dtVw)

    12月2日(周二)19:00  
    图书馆音乐讲堂
- 11/29

  2025

  - [信息•资源•研究|第22讲:如何使用Word制作长文档——以学位论文写作为例](info/1068/7805.htm)

    11月29日(周六)下午3:00  
    西馆(逸夫馆)401培训教室

首页上页1[2](hdrl/54.htm)[3](hdrl/53.htm)[4](hdrl/52.htm)[5](hdrl/51.htm)...[55](hdrl/1.htm)[下页](hdrl/54.htm)[尾页](hdrl/1.htm) 第/55页 [跳转](javascript:;)

\_showDynClickBatch(['dynclicks\_u11\_7894','dynclicks\_u11\_7848','dynclicks\_u11\_7810','dynclicks\_u11\_7831','dynclicks\_u11\_7809','dynclicks\_u11\_7808','dynclicks\_u11\_7807','dynclicks\_u11\_7806','dynclicks\_u11\_7817','dynclicks\_u11\_7805'],[7894,7848,7810,7831,7809,7808,7807,7806,7817,7805],"wbnews", 1724308018)

中国 北京 海淀区 清华大学图书馆 100084 电话:62782137 传真:62781758

[联系我们](gk/lxwm.htm)

[CALIS](http://www.calis.edu.cn/)
[CADAL](http://cadal.edu.cn/index/home)
[CASHL](http://www.cashl.edu.cn/)
[NSTL](http://www.nstl.gov.cn/)
[BALIS](http://balis.ruc.edu.cn/)
[国内外图书馆](https://lib.tsinghua.edu.cn/kj/wzxq.htm?id=042c73c0-03de-45d8-9f92-f59dbcb44844)
[外国教材中心](https://ftc.lib.tsinghua.edu.cn/)
[北京图研会](http://bjtyh.ruc.edu.cn/)

图书馆微信公众号

版权所有:清华大学图书馆 [版权声明](info/1115/2624.htm)

.robot{display:none;} 

- 智能问答
- 咨询电话:62782137

  服务时间:

  周一至周日 8:00-22:00
- 请发送邮件至

  ref-desk@tsinghua.edu.cn

  答案通过E-mail发送给您
- 当面咨询 \
  服务时间:周一至周日 8:00-22:00

  服务地点:北馆一层总服务台

  联系电话:010-62788937
- 联络您的学科馆员,为您提供针对学科的深度咨询服务
- 清华图书馆

var znwdHtml = null;
function frameLoad(){
//console.log(window.frames['myframe'].document.getElementById("vsb\_content").innerHTML)
znwdHtml=window.frames['myframe'].document.getElementById("vsb\_content").innerHTML;
}
function post(url,data,callback,isForm){
$.ajax({
url: url,
type:'post',
headers:{
'Authorization':gettoken(10),
'owner':'1724308018'
},
contentType: isForm ? 'application/json':'application/x-www-form-urlencoded; charset=UTF-8' ,
data: isForm ? JSON.stringify(data) : data ,
success: function (res) {
if (res.code == '0000' && res.data) {
callback(res);
}
}
});
}
function send (\_this){
var message = $(\_this).find("h4").text();
vm1.question = message;
vm1.send();
}
function getQuestionList(type){
post("/openlab\_component/expand/robot/api/getQueListByType",{type:type},function(res){
var data = res.data;
$.each(data,function(index,item){
var dom = '<li>'
+ '<a href="javascript:void(0)" onclick="send(this)">'
+ '<em>' + (index+1) + '</em>'
+ '<h4>' + item.Question + '</h4>'
+ '</a></li> ';
$("#fixlist").append(dom);
})
});
}
//问题展开二级
function bindTree(){
$('.fix-problem li h3').click(function(event) {
$(this).parents('li').toggleClass('ok').siblings('li').removeClass('ok');
if($(this).parents('li').hasClass('ok')){
$(this).siblings('dl').stop().slideDown();
$(this).parents('li').siblings('li').find('dl').stop().slideUp();
}else{
$(this).siblings('dl').stop().slideUp();
}
if ($(this).parents('li').find("dl").length == 0) {
$("#fixlist").html("");
//$('.fix-con').addClass('open1');
$(".fix-problem").animate({right:"-10px"})
var type = $(this).parents('li').attr("data-id");
$(this).parents('li').addClass("on");
$(this).parents('li').siblings().removeClass("on");
getQuestionList(type);
}
});
$('.fix-problem dd a').click(function(event) {
$(this).parents('dl').find('dd').removeClass('on');
$(this).parents('dd').addClass('on');
$("#fixlist").html("");
//$('.fix-con').addClass('open1');
$(".fix-problem").animate({right:"-10px"})
//请求问题
var type = $(this).attr("data-id");
getQuestionList(type);
});
}
function bindZan(){
$('.fd-win .btn-ping .yes').click(function(event) {
$(this).parents('.fd-win .btn-ping').hide();
$(this).parents('.item-l').find('.txt-ping-yes').show();
//请求
var aId = $(this).parent().attr("data-aid");
var cluid = $(this).parent().attr("data-cid");
post("/openlab\_component/expand/robot/api/answerYes",{clientId: localStorage.getItem('clientId'), aId: aId, cluid: cluid}, function(res){
});
});
$('.fd-win .btn-ping .no').click(function(event) {
$(this).parents('.fd-win .btn-ping').hide();
$(this).parents('.item-l').find('.txt-ping-no').show();
//请求
var aId = $(this).parent().attr("data-aid");
var cluid = $(this).parent().attr("data-cid");
post("/openlab\_component/expand/robot/api/answerNo",{clientId: localStorage.getItem('clientId'), aId: aId, cluid: cluid}, function(res){
});
});
}
var vm1 = new Vue({
el: '#main1012307',
data: {
cId : localStorage.getItem('clientId'),
hotList: [],
question: "",
isRenGong:false,
num:1,
},
mounted: function() {
var that = this
this.init()
setTimeout(function () {
that.getHot()
setTimeout(function () {
that.getQuestionType()
}, 1000)
}, 1000)
},
methods:{
init:function(){
console.log(1111)
if(this.cId) {
}else{
post("/openlab\_component/expand/robot/api/initVisitor",{},function(res){
cId = res.data;
window.localStorage.setItem('clientId', cId);
});
}
//
var hello = '<div class="item item-l"> <div class="face"><img src="images/robot/face2.png" alt=""></div><div class="desc">'
+ '<p>' + "您好,我是智能客服机器人,我可以回答您相关的业务问题,有什么问题就问我吧! 很高兴为您服务!" + '</p>'
+ '</div></div>';
$("#win").append(hello);
},
getHot:function(){
var \_this = this;
post("/openlab\_component/expand/robot/api/getHotQuestion",{},function(res){
\_this.hotList = res.data;
});
},
getQuestionType:function(){
var \_this = this;
var subTypes = [];
post("/openlab\_component/expand/robot/api/getQuestionType",{},function(res){
var typelist = res.data;
$.each(typelist,function(index,item){
var type = '<li data-id="' + item.Id + '">'
+ '<h3 style="background:none;">' + item.Name + '</h3>'
'</li>'
if (item.ParentId == 0) {
$("#list").append(type);
}else{
var sub = {};
sub.content = '<dl>'
+ '<dd><a href="javascript:void(0);" data-id="' + item.Id + '">' + item.Name + '</a></dd>'
+ '</dl>'
sub.pid = item.ParentId;
subTypes.push(sub);
}
})
$.each(subTypes,function(index,item){
$("#list [data-id='"+ item.pid +"']").append(item.content);
$("#list [data-id='"+ item.pid +"']").find("h3").attr("style","");
})
bindTree();
});
},
send:function(fid){
var message = this.question;
if (message) {
post("/openlab\_component/expand/robot/api/textChat",{clientId: this.cId ,question: message,fid: typeof fid === 'string'?fid:null},function(res){
var text = res.data.robotReply[0].text;
var guide = res.data.robotReply[0].guide;
var richText = res.data.robotReply[0].richText;
var reply = "";
var comment = "";
var cstyle = "";
var cid = res.data.robotReply[0].cluid;
if (cid) {
comment = '<div class="btn-ping" data-cid="' + cid + '" data-aid="' + res.data.robotReply[0].aId + '">'
+ '<a href="javascript:void(0);" class="yes" title="满意"></a>'
+ '<a href="javascript:void(0);" class="no" title="不满意"></a>'
+ '</div>'
+ '<div class="txt-ping txt-ping-yes">谢谢您的支持哦~会更努力哒!</div>'
+ '<div class="txt-ping txt-ping-no">抱歉没能帮到您,希望下次能帮您排忧!</div>'
cstyle = "display:block";
}
if (text) {
if(res.data.robotReply[0].answerType===-2 && znwdHtml && znwdHtml.length){
reply = '<div class="item item-l"> <div> <div class="face"><img src="images/robot/face2.png" alt=""></div><div class="desc" style="' + cstyle + '">'
+ '<p>' + znwdHtml + '</p>'
+ '</div></div>' + comment + '</div>';
}else{
reply = '<div class="item item-l"> <div> <div class="face"><img src="images/robot/face2.png" alt=""></div><div class="desc" style="' + cstyle + '">'
+ '<p>' + text.content + '</p>'
+ '</div></div>' + comment + '</div>';
}
}else if (guide) {
if (guide.content){
reply = '<div class="item item-l"> <div><div class="face"><img src="images/robot/face2.png" alt=""></div><div class="desc">'
+ '<p>' + guide.content + '</p>'
+ '</div></div>' + comment + '</div>';
}else if (guide.list) {
var guideList = "";
$.each(guide.list,function(index,item){
guideList += "<p>" + item.seq + item.question + "<p>";
})
reply = '<div class="item item-l"> <div><div class="face"><img src="images/robot/face2.png" alt=""></div><div class="desc">'
+ '<p>' + guide.beforeWord + '</p>'
+ guideList
+ '<p>' + guide.afterWord + '</p>'
+ '</div></div>' + comment + '</div>';
}
}else if (richText) {
reply = '<div class="item item-l"> <div><div class="face"><img src="images/robot/face2.png" alt=""></div><div class="desc">'
+ '<p>' + richText.original + '</p>' //description
+ '</div></div>' + comment + '</div>';
}else {
reply = '<div class="item item-l"> <div> <div class="face"><img src="images/robot/face2.png" alt=""></div><div class="desc">'
+ '<p>[消息]</p>'
+ '</div></div></div>';
}
$("#win").append(reply);
if (res.data.robotReply[0].cluid) {bindZan();}
$("#win").scrollTop(10000);
});
var html = '<div class="item item-r"><div class="face"><img src="images/robot/face1.png" alt=""></div><div class="desc">'
+ '<p>' + message + '</p>'
+ '</div></div>'
$("#win").append(html);
this.question = "";
}
},
sendA :function(question){
this.question = question;
this.send();
},
rengongClick:function (){
if(this.num==1){
document.getElementById('rengong').innerHTML='<iframe src="https://ai.faqrobot.com/webvisitor/pc.html#/pc-chat?tenantId=2330&channelCode=6&channelName=清华图书馆&typeId=1&typeName=网页" name="myframe" style="width:100%;min-height:76vh;border:none;" ></iframe>'
}
this.num=2
this.isRenGong=true
$('.fd-win').addClass('rengong')
$('.rengong-new span').removeClass('activeBar')
$('.znwd-new span').removeClass('activeBar')
$('.rengong-new span').addClass('activeBar')
},
zhinengClick:function(){
this.isRenGong=false
$('.fd-win').removeClass('rengong')
$('.znwd-new span').removeClass('activeBar')
$('.rengong-new span').removeClass('activeBar')
$('.znwd-new span').addClass('activeBar')
}
}//methods
})
$(document).ready(function() {
//咨询
$('.link2').click(function() {
if ( $(window).width() < 700) {
// window.location.href = "https://znkf.vsbclub.com/robot/h5chat.html?sysNum=16100186094532511&receiveId=2177&sourceId=2443";
window.location.href = "https://wpa1.qq.com/eQSH9aPO?\_type=wpa&qidian=tru";
}else{
$('.fix-bg,.fix-nv').fadeIn();
$(".fix-con").show();
$(".fix-con").addClass("animated bounceInRight")
$("body").addClass('hidden')
}
});
// 弹出全部问题
$('.js-pro').click(function(event) {
//$('.fix-con').addClass('open');
$(".fix-wrap").show();
$(".fix-problem").animate({right:"-370px"},200);
});
//关闭问题界面
$('.fix-problem .tit .btn').click(function(event) {
//$('.fix-con').removeClass('open');
//$('.fix-con').removeClass('open1');
$(".fix-problem").animate({right:"-580px"});
setTimeout(function(){
$(".fix-wrap").hide();
},500)
});
// 关闭咨询台
$('.fix-bg').click(function(event) {
$('.fix-con').removeClass('open').fadeOut();;
$('.fix-con').removeClass('open1');
$(".fix-nv").hide();
$(".fix-con").removeClass("animated bounceInRight")
$(this).fadeOut();
//$("body").css("overflow","visible");
$("body").removeClass('hidden')
});
$('#win').on('click','.wflink',function(e){
e.preventDefault()
vm1.question = $(this).text();
vm1.send($(this).prop('rel'))
})
$('#win').on('click','.welcomeWords',function(e){
e.preventDefault()
vm1.question = $(this).text();
vm1.send()
})
});
$('#win').on('click','#znwz1234',function(){
//console.log(123);
vm1.rengongClick()
})