seckill.js 525 Bytes
'use strict';

const API = global.yoho.API;

/**
 *  获取 获取秒杀信息接口
 *  doc: http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/%E5%95%86%E5%93%81%E5%88%97%E8%A1%A8/seckill.md
 */
exports.skillData = product_skn => {
    let queryData = {
        method: 'app.seckill.data',
        product_skn
    };

    return API.post('', queryData)

        // mock
        .catch()
        .then(()=> {
            let mock = require('./_seckill-mock').seckillData;

            return mock;
        });

};