parent
aaa2a0dea7
commit
4f7d698076
@ -1,13 +1,20 @@
|
|||||||
button:
|
button:
|
||||||
-
|
-
|
||||||
type: "click"
|
type: "view"
|
||||||
name: "最新动态"
|
name: "最新动态"
|
||||||
key: "MY_NEWS"
|
url: "http://wechat.trustie.net/assets/wechat/issue.html"
|
||||||
-
|
-
|
||||||
type: "click"
|
type: "click"
|
||||||
name: "意见返馈"
|
name: "意见返馈"
|
||||||
key: "FEEDBACK"
|
key: "FEEDBACK"
|
||||||
-
|
-
|
||||||
type: "view"
|
name: "更多"
|
||||||
name: "进入网站"
|
sub_button:
|
||||||
url: "http://www.trustie.net/"
|
-
|
||||||
|
type: "view"
|
||||||
|
name: "进入网站"
|
||||||
|
url: "http://www.trustie.net/"
|
||||||
|
-
|
||||||
|
type: "view"
|
||||||
|
name: "使用手册"
|
||||||
|
url: "https://www.trustie.net/organizations/1/downloads"
|
@ -0,0 +1,54 @@
|
|||||||
|
/**
|
||||||
|
* Created by root on 3/25/16.
|
||||||
|
*/
|
||||||
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
var bt=baidu.template;
|
||||||
|
bt.LEFT_DELIMITER='<!';
|
||||||
|
bt.RIGHT_DELIMITER='!>';
|
||||||
|
|
||||||
|
|
||||||
|
var apiUrl = '/api/v1/'
|
||||||
|
var setTemplate = function(data){
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
|
|
||||||
|
var html=bt('t:result-list',{issues: data});
|
||||||
|
$('#container').prepend(html);
|
||||||
|
}
|
||||||
|
|
||||||
|
var loadDataFromServer = function(id){
|
||||||
|
$.ajax({
|
||||||
|
url: apiUrl + 'issues/' + id,
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(data){
|
||||||
|
setTemplate(data.data);
|
||||||
|
},
|
||||||
|
error: function(xhr,status,err){
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
loadDataFromServer(299);
|
||||||
|
|
||||||
|
|
||||||
|
var postWidth = $(".post-wrapper").width();
|
||||||
|
var titleWidth = postWidth - 80;
|
||||||
|
$(".post-title").css("maxWidth",titleWidth);
|
||||||
|
|
||||||
|
$(".post-all-content").each(function(){
|
||||||
|
var postHeight = $(this).height();
|
||||||
|
if (postHeight > 90){
|
||||||
|
$(this).parent().next().css("display","block");
|
||||||
|
$(this).parent().next().toggle(function(){
|
||||||
|
$(this).text("点击隐藏");
|
||||||
|
$(this).prev().css("height",postHeight);
|
||||||
|
},function(){
|
||||||
|
$(this).text("点击展开");
|
||||||
|
$(this).prev().css("height",90);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in new issue