Browse Source

🐛 修复 [BUG#96](https://github.com/xkcoding/spring-boot-demo/issues/96)

moment.js 格式化问题
pull/1/head
Yangkai.Shen 4 years ago
parent
commit
7abae61f04
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      spring-boot-demo-websocket-socketio/src/main/resources/static/index.html

+ 3
- 3
spring-boot-demo-websocket-socketio/src/main/resources/static/index.html View File

@@ -84,7 +84,7 @@

function sendBroadcast() {
axios.post('/demo/send/broadcast', {
message: '系统广播通知: 当前时间 ' + moment().format('YYYY-MM-dd HH:mm:ss.SSS')
message: '系统广播通知: 当前时间 ' + moment().format('YYYY-MM-DD HH:mm:ss.SSS')
}).then((response) => {
const {flag, message} = response.data;
if (flag) {
@@ -156,7 +156,7 @@
}

function output(message) {
let currentTime = "<span class='time'>" + moment().format('YYYY-MM-dd HH:mm:ss.SSS') + "</span>";
let currentTime = "<span class='time'>" + moment().format('YYYY-MM-DD HH:mm:ss.SSS') + "</span>";
let element = $("<div>" + currentTime + " " + message + "</div>");
$('#console').prepend(element);
}
@@ -179,4 +179,4 @@
<button type="button" onClick="sendDisconnect()" class="btn">断开</button>
</form>
</body>
</html>
</html>

Loading…
Cancel
Save