Commit 36ea4d3c by zujiaozhang

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

parent d638d8c1
......@@ -71,11 +71,11 @@ body {
margin-right:0rem;
}
.card_tools {
padding-left: 4.8rem;
/* padding-left: 4.4rem; */
}
.card_tools .tools {
float: left;
float: right;
font-size: 0.28rem
}
......@@ -94,7 +94,7 @@ body {
}
.card_tools .reply {
margin-left: 0.4rem;
margin-right: 0.4rem;
}
div.fabulous.clearfix{
......
......@@ -13,7 +13,6 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m
// 贴子审核状态
status: '0',
init: function() {
card.getToken();
card.checkUser();
card.getCardDetail();
......@@ -56,9 +55,9 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m
$(this).hide();
$('.comment_btn').hide();
});
$('.reply_btn').on('click', function() {
$('.reply_btn').on('click', card.debounce(function() {
card.replyPublish();
})
}))
}else {
$('#showDialog').show()
}
......@@ -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(){
localStorage.wxLungToken = '';
medtap.loading(1);
......@@ -124,9 +134,7 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m
wechatId:card.wechatId
},
success:function(res){
console.log(res)
medtap.loading(0);
console.log(res.content.wechatUser)
var info = res.content.wechatUser
if(info.hasOwnProperty('userId')){
card.userId = info.userId
......@@ -283,7 +291,7 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m
if (res.success == true) {
var detailInfo = res.content.publish;
$('.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);
$('.cardDetail').html(detailInfo.content);
$('.seenNum').html(detailInfo.viewCount);
......@@ -370,13 +378,13 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m
replyList[i].content +
'</div>' +
'<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>' +
'</div>' +
'<div class="comment_reply" data-commentId="' + commentList[0].id + '">' +
'<span class="comment_reply_name">' + commentList[0].nickname + ':</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">查看全部' +
secReplyNum +
'条回复</div>' +
......@@ -398,13 +406,13 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m
replyList[i].content +
'</div>' +
'<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>' +
'</div>' +
'<div class="comment_reply" data-commentId="' + commentList[i].id + '">' +
'<span class="comment_reply_name">' + commentList[i].nickname + '</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">查看全部' +
secReplyNum +
'条回复</div>' +
......@@ -428,7 +436,7 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m
replyList[i].content +
'</div>' +
'<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>' +
'</div>' +
'</div>';
......@@ -448,7 +456,7 @@ define(['zepto', 'medtap','../javaScript/beforeSubmitForLung.js'], function($, m
replyList[i].content +
'</div>' +
'<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>' +
'</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