client-service.js
560 Bytes
/**
* 客服用户端 service
*
* @author: liqi <qi.li@yoho.cn>
* @date: 2016/11/4
*/
'use strict';
const Promise = require('bluebird');
const co = Promise.coroutine;
const clientAPI = require('./client-api');
/**
* 在线客服客服端页面
*/
const getServiceClient = (uid, imgSize) => {
return co(function * () {
// 获取最近十个订单
let result = yield clientAPI.getLastTenOrders(uid, imgSize);
return {
tenOrders: result.data
};
})();
};
module.exports = {
getServiceClient
};