
/**
 * 通过GET方式调用 SQL API
 * @param no 编号
 * @param data json 数据
 * @returns 
 */
SqlApi = {};
SqlApi.execute = function (no, data) {
    return new Promise((resolve, reject) => {
        $.ajax({
            type: "get",
            url: Common.getApi("/api/SqlApiResource/execute/" + no),
            data: data,
            beforeSend: function (request) {
                Common.addTokenToRequest(request);
            },
            success: function (data) {
                resolve(data);
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                reject(XMLHttpRequest);
            }
        });
    });
}