获取网络时间,减轻自己服务器的请求压力

淘宝

http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp

苏宁

http://quan.suning.com/getSysTime.do

腾讯获取当前时间API2
https://otheve.beacon.qq.com/analytics/upload?tp=js

腾讯获取当前时间API
http://vv.video.qq.com/checktime?otype=json
————————————————
版权声明:本文为CSDN博主「老白_」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_35129925/article/details/110637822

 

1、通过苏宁的网络接口获取事件    

http://quan.suning.com/getSysTime.do
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$.ajax({
                method: 'get',
                url: 'http://quan.suning.com/getSysTime.do',
                data: {},
                // contentType: false,
                // processData: false,
                // dataType: "jsonp",
                // jsonp: "callback",
                success: function (res) {
                    // console.log(JSON.parse(res))
                    // console.log(JSON.parse(res).sysTime2)
                    var aa = res.replace(/\-/g,"\/");
                    console.log(aa)
                    resolve(JSON.parse(aa).sysTime2)
                },  
            });
posted @ 2021-09-15 16:36  China Soft  阅读(456)  评论(0编辑  收藏  举报