diff --git a/components/SquarePostCard.vue b/components/SquarePostCard.vue
index 829a1cd..1418256 100644
--- a/components/SquarePostCard.vue
+++ b/components/SquarePostCard.vue
@@ -6,18 +6,18 @@
- {{item.content}}
+ {{item.content ?item.content:'-'}}
{{item.user && item.user.nickname ? item.user.nickname : '匿名用户'}}
- {{item.comment}}
+ {{item.comment?item.comment:0}}
- {{item.like}}
+ {{item.like?item.like:0}}
@@ -37,7 +37,7 @@
},
fallbackImage: {
type: String,
- default: '/static/image/img.png'
+ default: ''
},
fallbackAvatar: {
type: String,
diff --git a/pages/publish/index.vue b/pages/publish/index.vue
index 2a5aac8..74e558c 100644
--- a/pages/publish/index.vue
+++ b/pages/publish/index.vue
@@ -287,6 +287,13 @@ export default {
});
return
}
+ if(this.form.content==''||this.form.media.length==0){
+ uni.showToast({
+ title: '发布内容或图片不能为空!',
+ icon: 'none'
+ });
+ return
+ }
if(uni.getStorageSync('is_login')){
request({
url:'common/post/store',
diff --git a/pages/square/detiles.vue b/pages/square/detiles.vue
index 6932179..a529303 100644
--- a/pages/square/detiles.vue
+++ b/pages/square/detiles.vue
@@ -29,6 +29,9 @@
{{detail.publishTime}}
+
{{detail.content}}
@@ -46,10 +49,6 @@
{{detail.comment}}
-
-
-
-
@@ -644,6 +643,7 @@
display: flex;
align-items: center;
margin-bottom: 20rpx;
+ position: relative;
}
.avatar {
@@ -932,10 +932,19 @@
border: 1px solid #fff;
height: 34px;
line-height: 34px;
+ width: 30px;
+ position: absolute;
+ right: 0px;
+ padding: 0px;
+ top: 8px;
}
.share:after{
border: 1px solid #fff;
}
+ .share image{
+ width: 24px;
+ height: 24px;
+ }
.cent{
display: flex;
align-items: center;