moment.js 格式化问题
This commit is contained in:
parent
f586b8060a
commit
7abae61f04
|
@ -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…
Reference in New Issue