getTimeStamp(dateString){ let stamp = '' if(dateString == '' || dateString == undefined){ stamp = new Date().getTime() }else{ if(dateString.indexOf('-') != -1){ dateString = dateString.replace(/-/g, '/') } stamp = new Date(dateString).getTime() } return stamp },
页面js调用
var time = app.getTimeStamp(time);