Browse Source

fix: 前端新评论时间显示,配合后端修改ws地址

ChenYangfan 6 years ago
parent
commit
8219258fa4
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/components/CComment.vue
  2. 1 1
      src/config/server-info.js

+ 1 - 1
src/components/CComment.vue

@@ -8,7 +8,7 @@
         主题:{{comment.title}}
       </div>
       <div class="comment-content">{{comment.content}}</div>
-      <div class="comment-author">{{isNew ? '刚刚' : createTime}} | 作者:{{comment.userName}} <span
+      <div class="comment-author">{{ createTime }} | 作者:{{comment.userName}} <span
         class="role">{{role}}</span></div>
       <comment-tool-bar
         :top-number="comment.topNumber || ''"

+ 1 - 1
src/config/server-info.js

@@ -27,7 +27,7 @@ const replyUrl = host + '/api/reply'
 
 const useReplyServer = postfix => postfix ? replyUrl + postfix : replyUrl
 
-const commentWsUrl = wsHost + '/api/websocket/comment'
+const commentWsUrl = wsHost + '/api/ws/comment'
 
 const useCommentWsServer = postfix => postfix ? commentWsUrl + postfix : commentWsUrl