This commit is contained in:
结发受长生 2018-05-16 08:44:28 +08:00
parent b28fc08f0a
commit a2c9824a6a
8 changed files with 7590 additions and 10 deletions

View File

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

View File

@ -1,5 +1,6 @@
<!-- 这里放网站js脚本 -->
<%- js('js/main') %>
<%- js('js/lib/polyfill.min') %>
<%- js('js/lib/vue.min') %>
<%- js('js/lib/axios.min') %>
<%- js('js/local_search') %>

View File

@ -21,12 +21,13 @@
font-size 16px
flex-grow 1
line-height 48px
display flex
position relative
.icon
position absolute
.input-box
box-sizing border-box
padding 0 3px
flex-grow 1
margin-left 20px
> #search-input
border none
border-bottom 1px solid #9e9e9e

View File

@ -379,7 +379,6 @@ var JELON = window.JELON || {};
var userId = userInfo.id;
for (var i = 0, len = reactions.length; i < len; i++) {
if (userId === reactions[i].user.id) {
console.log(userId, reactions[i].user.id);
addClass($('JELON__comment_' + commentId + '_reactions').getElementsByClassName('like')[0], 'liked');
$('JELON__comment_' + commentId + '_reactions').getElementsByClassName('like')[0].innerHTML = '已赞';
break;

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -16,16 +16,16 @@ new Vue({
var parser = new DOMParser()
xmlDoms = parser.parseFromString(response.data, "application/xml")
} else {
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = false;
xmlDoms = xmlDoc.loadXML(response.data);
xmlDoms = new ActiveXObject("Microsoft.XMLDOM");
xmlDoms.async = false;
xmlDoms.loadXML(response.data);
}
//找出所有文章的标题 正文 URL
articleDatas = Array.prototype.map.call(xmlDoms.getElementsByTagName("entry"), function(item){
return {
title: item.getElementsByTagName("title")[0].innerHTML,
content: item.getElementsByTagName("content")[0].innerHTML,
url: item.getElementsByTagName("url")[0].innerHTML,
title: item.getElementsByTagName("title")[0].textContent,
content: item.getElementsByTagName("content")[0].textContent,
url: item.getElementsByTagName("url")[0].textContent,
}
})
resultDiv = document.getElementById("search-result-box")
@ -34,6 +34,7 @@ new Vue({
watch: {
queryText: function(newVal, oldVal) {
this.searchResult.length = 0;
if(!resultDiv) return;
if(newVal && newVal.trim() && articleDatas) {
resultDiv.style.display = "block"
} else {

View File

@ -160,7 +160,7 @@ JELON = deepCopy(JELON, {
throttle: 250,
unload: false,
callback: function(element, op) {
console.log(element, 'has been', op + 'ed')
//console.log(element, 'has been', op + 'ed')
}
});
},