|
|
const api = global.yoho.API;
|
|
|
const service = global.yoho.ServiceAPI;
|
|
|
|
|
|
module.exports = class extends global.yoho.BaseModel {
|
|
|
constructor(ctx) {
|
|
|
super(ctx);
|
|
|
}
|
|
|
|
|
|
invitionData(uid) {
|
|
|
invitionText(uid) {
|
|
|
return api.get('', {
|
|
|
method: 'app.invitecode.my',
|
|
|
uid: uid
|
...
|
...
|
@@ -21,4 +22,27 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
resources() {
|
|
|
return service.get('operations/api/v5/resource/get', {
|
|
|
content_code: ' 29958987ef0c0f830fad03d7e5'
|
|
|
}, {
|
|
|
code: 200
|
|
|
}).then((result) => {
|
|
|
if (result && result.data) {
|
|
|
console.log(result);
|
|
|
return result;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
invitionData(uid) {
|
|
|
return api.all([this.invitionText(uid), this.resources()]).then((result) => {
|
|
|
let finaData = {};
|
|
|
|
|
|
finaData = Object.assign(finaData, result[0]);
|
|
|
|
|
|
return finaData;
|
|
|
});
|
|
|
}
|
|
|
}; |
...
|
...
|
|