diff --git a/public/assets/wechat/acitivities.html b/public/assets/wechat/acitivities.html
new file mode 100644
index 000000000..87c697aba
--- /dev/null
+++ b/public/assets/wechat/acitivities.html
@@ -0,0 +1,220 @@
+
+
+
+ react js
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/public/javascripts/wechat/wechat-dev.js b/public/javascripts/wechat/wechat-dev.js
index 9c5704b8c..56a95ac72 100644
--- a/public/javascripts/wechat/wechat-dev.js
+++ b/public/javascripts/wechat/wechat-dev.js
@@ -15,11 +15,13 @@ $(document).ready(function(){
var html=bt('t:result-list',{issues: data});
$('#container').prepend(html);
+ descToggle();
+
}
- var loadDataFromServer = function(id){
+ var loadDataFromServer = function(page){
$.ajax({
- url: apiUrl + 'issues/' + id,
+ url: apiUrl + 'activities/' + page + "?openid=",
dataType: 'json',
success: function(data){
setTemplate(data.data);
@@ -31,24 +33,32 @@ $(document).ready(function(){
};
- loadDataFromServer(299);
+ loadDataFromServer(0);
+
+ var descToggle = function(){
+ 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);
+ });
+ }
+ });
+ }
+
+ var timeSpilt = function(){
+
+ }
+
- 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);
- });
- }
- });
});