Commit 36ea4d3c by zujiaozhang

'修改分享帖子时间部分样式'

parent d638d8c1
...@@ -71,11 +71,11 @@ body { ...@@ -71,11 +71,11 @@ body {
margin-right:0rem; margin-right:0rem;
} }
.card_tools { .card_tools {
padding-left: 4.8rem; /* padding-left: 4.4rem; */
} }
.card_tools .tools { .card_tools .tools {
float: left; float: right;
font-size: 0.28rem font-size: 0.28rem
} }
...@@ -94,7 +94,7 @@ body { ...@@ -94,7 +94,7 @@ body {
} }
.card_tools .reply { .card_tools .reply {
margin-left: 0.4rem; margin-right: 0.4rem;
} }
div.fabulous.clearfix{ div.fabulous.clearfix{
......
...@@ -13,7 +13,6 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m ...@@ -13,7 +13,6 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m
// 贴子审核状态 // 贴子审核状态
status: '0', status: '0',
init: function() { init: function() {
card.getToken(); card.getToken();
card.checkUser(); card.checkUser();
card.getCardDetail(); card.getCardDetail();
...@@ -56,9 +55,9 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m ...@@ -56,9 +55,9 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m
$(this).hide(); $(this).hide();
$('.comment_btn').hide(); $('.comment_btn').hide();
}); });
$('.reply_btn').on('click', function() { $('.reply_btn').on('click', card.debounce(function() {
card.replyPublish(); card.replyPublish();
}) }))
}else { }else {
$('#showDialog').show() $('#showDialog').show()
} }
...@@ -87,6 +86,17 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m ...@@ -87,6 +86,17 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m
} }
}) })
}, },
// 防抖
debounce:function(fn){
let timeout = null
return function(){
clearTimeout(timeout)
var that = this
timeout = setTimeout(function(){
fn.apply(that,arguments)
},1000)
}
},
getToken:function(){ getToken:function(){
localStorage.wxLungToken = ''; localStorage.wxLungToken = '';
medtap.loading(1); medtap.loading(1);
...@@ -124,9 +134,7 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m ...@@ -124,9 +134,7 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m
wechatId:card.wechatId wechatId:card.wechatId
}, },
success:function(res){ success:function(res){
console.log(res)
medtap.loading(0); medtap.loading(0);
console.log(res.content.wechatUser)
var info = res.content.wechatUser var info = res.content.wechatUser
if(info.hasOwnProperty('userId')){ if(info.hasOwnProperty('userId')){
card.userId = info.userId card.userId = info.userId
...@@ -283,7 +291,7 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m ...@@ -283,7 +291,7 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m
if (res.success == true) { if (res.success == true) {
var detailInfo = res.content.publish; var detailInfo = res.content.publish;
$('.user_name').html(detailInfo.nickname); $('.user_name').html(detailInfo.nickname);
$('.card_time').html(detailInfo.updateTime.substring(5, 16)); $('.card_time').html(detailInfo.createTime.substring(5, 16));
$('.user_profile').attr('src', detailInfo.profile); $('.user_profile').attr('src', detailInfo.profile);
$('.cardDetail').html(detailInfo.content); $('.cardDetail').html(detailInfo.content);
$('.seenNum').html(detailInfo.viewCount); $('.seenNum').html(detailInfo.viewCount);
...@@ -370,13 +378,13 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m ...@@ -370,13 +378,13 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m
replyList[i].content + replyList[i].content +
'</div>' + '</div>' +
'<div class="comment_info">' + '<div class="comment_info">' +
'<span class="comment_time txt_gray">' + replyList[i].updateTime.substring(5, 16) + '</span>' + '<span class="comment_time txt_gray">' + replyList[i].createTime.substring(5, 16) + '</span>' +
'<span class="comment_reply_btn txt_blue">回复</span>' + '<span class="comment_reply_btn txt_blue">回复</span>' +
'</div>' + '</div>' +
'<div class="comment_reply" data-commentId="' + commentList[0].id + '">' + '<div class="comment_reply" data-commentId="' + commentList[0].id + '">' +
'<span class="comment_reply_name">' + commentList[0].nickname + ':</span>' + '<span class="comment_reply_name">' + commentList[0].nickname + ':</span>' +
'<span class="comment_reply_content">' + commentList[0].content + '</span>' + '<span class="comment_reply_content">' + commentList[0].content + '</span>' +
'<span class="comment_reply_time">' + commentList[0].updateTime.substring(5, 16) + '</span>' + '<span class="comment_reply_time">' + commentList[0].createTime.substring(5, 16) + '</span>' +
'<div class="comment_reply_more">查看全部' + '<div class="comment_reply_more">查看全部' +
secReplyNum + secReplyNum +
'条回复</div>' + '条回复</div>' +
...@@ -398,13 +406,13 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m ...@@ -398,13 +406,13 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m
replyList[i].content + replyList[i].content +
'</div>' + '</div>' +
'<div class="comment_info">' + '<div class="comment_info">' +
'<span class="comment_time txt_gray">' + replyList[i].updateTime.substring(5, 16) + '</span>' + '<span class="comment_time txt_gray">' + replyList[i].createTime.substring(5, 16) + '</span>' +
'<span class="comment_reply_btn txt_blue">回复</span>' + '<span class="comment_reply_btn txt_blue">回复</span>' +
'</div>' + '</div>' +
'<div class="comment_reply" data-commentId="' + commentList[i].id + '">' + '<div class="comment_reply" data-commentId="' + commentList[i].id + '">' +
'<span class="comment_reply_name">' + commentList[i].nickname + '</span>' + '<span class="comment_reply_name">' + commentList[i].nickname + '</span>' +
'<span class="comment_reply_content">' + commentList[i].content + '</span>' + '<span class="comment_reply_content">' + commentList[i].content + '</span>' +
'<span class="comment_reply_time">' + commentList[i].updateTime.substring(5, 16) + '</span>' + '<span class="comment_reply_time">' + commentList[i].createTime.substring(5, 16) + '</span>' +
'<div class="comment_reply_more">查看全部' + '<div class="comment_reply_more">查看全部' +
secReplyNum + secReplyNum +
'条回复</div>' + '条回复</div>' +
...@@ -428,7 +436,7 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m ...@@ -428,7 +436,7 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m
replyList[i].content + replyList[i].content +
'</div>' + '</div>' +
'<div class="comment_info">' + '<div class="comment_info">' +
'<span class="comment_time txt_gray">' + replyList[i].updateTime.substring(5, 16) + '</span>' + '<span class="comment_time txt_gray">' + replyList[i].createTime.substring(5, 16) + '</span>' +
'<span class="comment_reply_btn txt_blue">回复</span>' + '<span class="comment_reply_btn txt_blue">回复</span>' +
'</div>' + '</div>' +
'</div>'; '</div>';
...@@ -448,7 +456,7 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m ...@@ -448,7 +456,7 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m
replyList[i].content + replyList[i].content +
'</div>' + '</div>' +
'<div class="comment_info">' + '<div class="comment_info">' +
'<span class="comment_time txt_gray">' + replyList[i].updateTime.substring(5, 16) + '</span>' + '<span class="comment_time txt_gray">' + replyList[i].createTime.substring(5, 16) + '</span>' +
'<span class="comment_reply_btn txt_blue">回复</span>' + '<span class="comment_reply_btn txt_blue">回复</span>' +
'</div>' + '</div>' +
'</div>'; '</div>';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment