千牛 Mobile SDK

千牛应用平台(Qianniu Application Platform)前端开发 SDK。

Getting start

Install

tnpm install QAP-SDK --save

Usage

import QN from 'QAP-SDK';

// 回调函数形式
QN.top.invoke({
    query: {
        method: 'taobao.time.get', // TOP 接口名称
    },
    success(result) {
        console.log(result);
    },
    error(error) {
        console.log(error);
    }
});

// Promise 形式
QN.top.invoke({
    query: {
        method: 'taobao.time.get', // TOP 接口名称
    },
}).then(result => {
    console.log(result);
}, error => {
    console.log(error);
});