javascript将时间HH:mm:ss转为时间戳

		//时间处理-将时分秒转为时间戳
		dealDateToUnix(time) {
			if (time !== null) {
            let s = "";
            let hour = time.split(":")[0];
            var min = time.split(":")[1];
            var sec = time.split(":")[2];
            s = Number(hour * 3600) + Number(min * 60) + Number(sec);
            return s;
            }
		},

你可能感兴趣的:(前端,javascript)