Pārlūkot izejas kodu

fix:查看评论需要登录bug

zhengyingya 5 gadus atpakaļ
vecāks
revīzija
10d16ee66f

+ 3
- 1
lib/components/Editor/index.js Parādīt failu

@@ -144,7 +144,9 @@ var Editor = function (_React$Component) {
144 144
   _createClass(Editor, [{
145 145
     key: "componentDidMount",
146 146
     value: function componentDidMount() {
147
-      this.props.app.sOssSts();
147
+      if (this.props.app.currentUser && this.props.app.currentUser.user_id > 0) {
148
+        this.props.app.sOssSts();
149
+      }
148 150
       if ((0, _helper.isFunction)(this.props.onRef)) {
149 151
         this.props.onRef(this);
150 152
       }

+ 1
- 1
lib/components/Editor/index.js.map
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu


+ 4
- 4
lib/version.json Parādīt failu

@@ -1,8 +1,8 @@
1 1
 {
2 2
     "name":       "comment",
3
-    "buildDate":  1564888264706,
3
+    "buildDate":  1564979699301,
4 4
     "version":    "1.0.4",
5
-    "numCommits": 178,
6
-    "hash":       "088923c",
7
-    "dirty":      false
5
+    "numCommits": 179,
6
+    "hash":       "083abcb",
7
+    "dirty":      true
8 8
 }

+ 3
- 1
src/components/Editor/index.js Parādīt failu

@@ -72,7 +72,9 @@ class Editor extends React.Component {
72 72
   }
73 73
 
74 74
   componentDidMount() {
75
-    this.props.app.sOssSts();
75
+    if (this.props.app.currentUser && this.props.app.currentUser.user_id > 0) {
76
+      this.props.app.sOssSts();
77
+    }
76 78
     if (isFunction(this.props.onRef)) {
77 79
       this.props.onRef(this);
78 80
     }