moment.js 格式化问题
This commit is contained in:
Yangkai.Shen 2020-01-19 10:01:16 +08:00
parent f586b8060a
commit 7abae61f04
1 changed files with 3 additions and 3 deletions

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>