Skip to content

Commit 7abae61

Browse files
committed
🐛 修复 [BUG#96](xkcoding#96)
moment.js 格式化问题
1 parent f586b80 commit 7abae61

File tree

1 file changed

+3
-3
lines changed
  • spring-boot-demo-websocket-socketio/src/main/resources/static

1 file changed

+3
-3
lines changed

Diff for: spring-boot-demo-websocket-socketio/src/main/resources/static/index.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484

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

158158
function output(message) {
159-
let currentTime = "<span class='time'>" + moment().format('YYYY-MM-dd HH:mm:ss.SSS') + "</span>";
159+
let currentTime = "<span class='time'>" + moment().format('YYYY-MM-DD HH:mm:ss.SSS') + "</span>";
160160
let element = $("<div>" + currentTime + " " + message + "</div>");
161161
$('#console').prepend(element);
162162
}
@@ -179,4 +179,4 @@ <h1>spring-boot-demo-websocket-socketio</h1>
179179
<button type="button" onClick="sendDisconnect()" class="btn">断开</button>
180180
</form>
181181
</body>
182-
</html>
182+
</html>

0 commit comments

Comments
 (0)