index.js
560 Bytes
/**
* 发送站内信 model
* @author: bikai<kai.bi@yoho.cn>
*/
var API = require('../../library/api');
var api = new API();
exports.sendSingleMessage = (data) => {
var defaultParam = {
method: 'web.inbox.setSingleMessage',
type: 1,
verify_key: '', // eslint-disable-line camelcase
send_uid: 0, // eslint-disable-line camelcase
callback: '' // eslint-disable-line camelcase
};
return api.post('/', Object.assign(defaultParam, data)); // 所有数据返回一个 Promise,方便 Promise.all 调用
};