php 后台传回前端日期字符串抓换成时间对象

老的js 页面                     
$.post(‘{:U("getNowTimeFormat")}‘, function(data){
                        let json = JSON.parse(data); 
                        let s = json.formatDate;
                        s = s.replace(/-/g,"/");
                        let date = new Date(s).getTime();
                    });
 
新的页面可以直接干
                    axios.get("{:U(‘getNowTimeFormat‘)}")
                        .then(response => {
                            let nowTime = new Date(response.data.formatDate).getTime()
                        })

php 后台传回前端日期字符串抓换成时间对象

上一篇:Thinkphp 5.0.x 变量覆盖导致的RCE 漏洞分析


下一篇:716 css flex布局:flex-flow,flex-direction,flex-wrap,justify-content,align-items,align-content,flex,order,align-sel