Skip to content
This repository has been archived by the owner on Nov 15, 2018. It is now read-only.

Commit

Permalink
fix(post): 修复发布文字动态不能的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
mutoe committed Oct 11, 2018
1 parent c6c3003 commit 7960ea5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/page/post/PostText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@

<script>
import bus from "@/bus.js";
import { mapGetters } from "vuex";
import TextareaInput from "@/components/common/TextareaInput.vue";
export default {
Expand All @@ -96,7 +95,6 @@ export default {
};
},
computed: {
...mapGetters(["compose"]),
currency_name() {
return (
(((this.$store.state.CONFIG || {}).site || {}).currency_name || {})
Expand All @@ -107,7 +105,7 @@ export default {
return this.$store.state.CONFIG.feed.paycontrol;
},
disabled() {
return !(this.compose.length > 0);
return !this.contentText.length;
},
items() {
return this.$store.state.CONFIG.feed.items || [];
Expand Down Expand Up @@ -150,7 +148,7 @@ export default {
this.pinned
? this.amount === 0
? this.$Message.error("请设置收费金额")
: this.compose.length <= this.limit
: this.contentText.length <= this.limit
? this.$Message.error(`正文内容不足${this.limit}字, 无法设置收费`)
: this.postText()
: ((this.amount = 0), this.postText());
Expand All @@ -162,7 +160,7 @@ export default {
.post(
"feeds",
{
feed_content: this.compose,
feed_content: this.contentText,
feed_from: 2,
feed_mark:
new Date().valueOf() + "" + this.$store.state.CURRENTUSER.id,
Expand Down

0 comments on commit 7960ea5

Please sign in to comment.