var m1 = moment('2018-08-14 11:00:00'), m2 = moment('2018-08-14 12:10:00');
console.log(m1)console.log(m2)console.log(m2.diff(m1, 'minute'));minute为分钟,可更改为秒或毫秒,具体看官方说明