const d = Fri Sep 20 2019 16:37:39 GMT+0800 (中国标准时间); const d = res.data[0].time const resDate = d.getFullYear() + '-' + this.p((d.getMonth() + 1)) + '-' + this.p(d.getDate()) const resTime = this.p(d.getHours()) + ':' + this.p(d.getMinutes()) + ':' + this.p(d.getSeconds()) console.log(resDate); console.log(resTime);