qrcode.js
738 Bytes
/**
* 个人中心二维码 model
* @author: weiqingting<qingting.wei@yoho.cn>
* @date: 2016/05/16
*/
'use strict';
const logger = global.yoho.logger;
class qrcodeModel extends global.yoho.BaseModel {
constructor(ctx) {
super(ctx);
}
getQRcodeData(id, uid) {
return this.get({data: {
method: 'app.SpaceOrders.getQrByOrderCode',
order_code: id,
uid: uid
}}).then(result => {
if (result && result.code === 200) {
return result.data;
} else {
logger.error(`查看二维码ID: ${id} 接口返回数据错误`);
return false;
}
});
}
}
module.exports = qrcodeModel;