Commit 278b9423 by zujiaozhang

'添加发帖需要审核功能'

parent 8ea9d6ef
......@@ -176,7 +176,7 @@ body {
color:#666;
}
.litst_item_headers_tools{
padding-top:0.46rem;
padding-top:0.3rem;
float:right;
}
.litst_item_headers_tools .tools img{
......
......@@ -162,9 +162,51 @@ define(['zepto', 'medtap'], function($, medtap) {
$('.no_list').hide();
myCard.hasMore = true;
var str = '';
// 新加发帖审核部分条件字符串
// 审核通过显示删除和编辑 对应字段 status'审核状态(2:审核拒绝,1:已审核;0:未审核)
var editIsshow = '<div class="litst_item_headers_tools clearfix">' +
'<div class="tools clearfix delete_btn">' +
'<img src="../images/post_ldelete_buttn@2x.png">' +
'<span class="tools_title">删除</span>' +
'</div>' +
'<div class="tools clearfix editor_btn">' +
'<img src="../images/post_leditor_buttn@2x.png">' +
'<span class="tools_title">编辑</span>' +
'</div>' +
'</div>'
// 状态0
var wartStr = '<div class="litst_item_headers_tools clearfix">' +
'<p>审核中</p>' +
'</div>'
// 状态2
var refuseStr = '<div class="litst_item_headers_tools clearfix">' +
'<p>审核未通过,请您修改或删除</p>' +
'<div class="tools clearfix delete_btn">' +
'<img src="../images/post_ldelete_buttn@2x.png">' +
'<span class="tools_title">删除</span>' +
'</div>' +
'<div class="tools clearfix editor_btn">' +
'<img src="../images/post_leditor_buttn@2x.png">' +
'<span class="tools_title">编辑</span>' +
'</div>' +
'</div>'
for (var i = 0; i < list.length; i++) {
var picUrl = list[i].picUrls || '';
//单张
// 最终显示的内容结构字符串
var showStr = ''
// 要显示的条件判断语句
switch (list[i].status){
case 0:
showStr = wartStr
break;
case 1:
showStr = editIsshow
break;
case 2:
showStr = refuseStr
break;
}
if (picUrl.length != 0 && picUrl.length < 2) {
str += '<div class="list_item" data-id="' + list[i].publishId + '">' +
'<div class="list_item_header clearfix">' +
......@@ -173,16 +215,17 @@ define(['zepto', 'medtap'], function($, medtap) {
'<p class="user_name">' + list[i].nickname + '</p>' +
'<p class="txt_gray post_card_time">' + list[i].updateTime.substring(5, 16) + '</p>' +
'</div>' +
'<div class="litst_item_headers_tools clearfix">' +
'<div class="tools clearfix delete_btn">' +
'<img src="../images/post_ldelete_buttn@2x.png">' +
'<span class="tools_title">删除</span>' +
'</div>' +
'<div class="tools clearfix editor_btn">' +
'<img src="../images/post_leditor_buttn@2x.png">' +
'<span class="tools_title">编辑</span>' +
'</div>' +
'</div>' +
// '<div class="litst_item_headers_tools clearfix">' +
// '<div class="tools clearfix delete_btn">' +
// '<img src="../images/post_ldelete_buttn@2x.png">' +
// '<span class="tools_title">删除</span>' +
// '</div>' +
// '<div class="tools clearfix editor_btn">' +
// '<img src="../images/post_leditor_buttn@2x.png">' +
// '<span class="tools_title">编辑</span>' +
// '</div>' +
// '</div>' +
showStr +
'</div>' +
'<div class="list_item_content">' +
'<div class="list_item_content_desc">' +
......@@ -219,16 +262,17 @@ define(['zepto', 'medtap'], function($, medtap) {
'<p class="user_name">' + list[i].nickname + '</p>' +
'<p class="txt_gray post_card_time">' + list[i].updateTime.substring(5, 16) + '</p>' +
'</div>' +
'<div class="litst_item_headers_tools clearfix">' +
'<div class="tools clearfix delete_btn">' +
'<img src="../images/post_ldelete_buttn@2x.png">' +
'<span class="tools_title">删除</span>' +
'</div>' +
'<div class="tools clearfix editor_btn">' +
'<img src="../images/post_leditor_buttn@2x.png">' +
'<span class="tools_title">编辑</span>' +
'</div>' +
'</div>' +
// '<div class="litst_item_headers_tools clearfix">' +
// '<div class="tools clearfix delete_btn">' +
// '<img src="../images/post_ldelete_buttn@2x.png">' +
// '<span class="tools_title">删除</span>' +
// '</div>' +
// '<div class="tools clearfix editor_btn">' +
// '<img src="../images/post_leditor_buttn@2x.png">' +
// '<span class="tools_title">编辑</span>' +
// '</div>' +
// '</div>' +
showStr +
'</div>' +
'<div class="list_item_content">' +
'<div class="list_item_content_desc">' +
......@@ -261,16 +305,17 @@ define(['zepto', 'medtap'], function($, medtap) {
'<p class="user_name">' + list[i].nickname + '</p>' +
'<p class="txt_gray post_card_time">' + list[i].updateTime.substring(5, 16) + '</p>' +
'</div>' +
'<div class="litst_item_headers_tools clearfix">' +
'<div class="tools clearfix delete_btn">' +
'<img src="../images/post_ldelete_buttn@2x.png">' +
'<span class="tools_title">删除</span>' +
'</div>' +
'<div class="tools clearfix editor_btn">' +
'<img src="../images/post_leditor_buttn@2x.png">' +
'<span class="tools_title">编辑</span>' +
'</div>' +
'</div>' +
// '<div class="litst_item_headers_tools clearfix">' +
// '<div class="tools clearfix delete_btn">' +
// '<img src="../images/post_ldelete_buttn@2x.png">' +
// '<span class="tools_title">删除</span>' +
// '</div>' +
// '<div class="tools clearfix editor_btn">' +
// '<img src="../images/post_leditor_buttn@2x.png">' +
// '<span class="tools_title">编辑</span>' +
// '</div>' +
// '</div>' +
showStr +
'</div>' +
'<div class="list_item_content">' +
'<div class="list_item_content_desc">' +
......
......@@ -159,7 +159,7 @@ define(['zepto', 'medtap'], function($, medtap) {
if (res.success == true) {
setTimeout(function() {
medtap.toast({
message: '发布成功',
message: '发布成功!请等待审核',
time: 2000
})
setTimeout(function(){
......@@ -200,7 +200,7 @@ define(['zepto', 'medtap'], function($, medtap) {
if (res.success == true) {
setTimeout(function() {
medtap.toast({
message: '发布成功',
message: '发布成功!请等待审核',
time: 2000
})
setTimeout(function(){
......
......@@ -32,7 +32,7 @@
<body>
<div id="content">
<div class="card_info">
<textarea rows="" cols="" placeholder="请输入内容" class="card_content"></textarea>
<textarea rows="" cols="" placeholder="请输入内容" class="card_content" maxlength="300"></textarea>
</div>
<div class="image_info clearfix">
<div class="image_upload" id="upload">
......
......@@ -291,7 +291,6 @@ define([ 'zepto', 'medtap' ], function($, medtap) {
orderSn: ''
},
success: function(res) {
console.log('消息列表',res)
medtap.loading(0);
var record = res.content.list;
var html = '';
......
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