api.js

ylbtech-JavaScript-util: api.js

API 代理接口

1.A,JS-效果图返回顶部
 
1.B,JS-Source Code(源代码)返回顶部
1.B.1, m.yintai
/*
调用接口
*/
function call(methodName, method, ver, data, successCallback) {
    data.methodName = methodName;
    data.method = method;
    data.ver = ver;
    url = "http://m.yintai.com/Services/Proxy.ashx?r=" + Math.random();
    $.ajax({
        url: url,
        dataType: "json",
        data: data,
        success: function (result) {
            if (result.isSuccessful) {
                successCallback(result);
            }
            else {
                if (result.data != undefined) {
                    alert(result.data.description);
                }
                else {
                    alert(result.description);
                }
            }
        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            //alert(errorThrown);
        }
    });
}
View Code

1.B.2,

1.C,JS-Relevent References(相关引用)返回顶部

 

warn 作者:ylbtech
出处:http://ylbtech.cnblogs.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
原文地址:https://www.cnblogs.com/ylbtech/p/3852606.html